You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

38 lines
1.5 KiB

# -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp.tests.common import TransactionCase
class TestPartnerStocklRisk(TransactionCase):
def setUp(self):
super(TestPartnerStocklRisk, self).setUp()
self.partner = self.env['res.partner'].create({
'name': 'Partner test',
'customer': True,
})
self.product = self.env.ref('product.product_product_36')
self.quant = self.env['stock.quant'].create({
'qty': 100,
'location_id': self.env.ref('stock.stock_location_stock').id,
'product_id': self.product.id,
})
self.picking = self.env['stock.picking'].create({
'picking_type_id': self.env.ref('stock.picking_type_out').id,
'location_id': self.env.ref('stock.stock_location_stock').id,
'location_dest_id':
self.env.ref('stock.stock_location_customers').id,
})
self.move = self.env['stock.move'].create({
'name': '/',
'picking_id': self.picking.id,
'product_uom': self.product.uom_id.id,
'location_id': self.env.ref('stock.stock_location_stock').id,
'location_dest_id':
self.env.ref('stock.stock_location_customers').id,
'product_id': self.product.id,
})
def test_stock_move(self):
self.move.action_done()