diff --git a/stock_picking_customer_ref/tests/test_stock_picking_customer_ref.py b/stock_picking_customer_ref/tests/test_stock_picking_customer_ref.py index d27a8056d982..5c488516bd72 100755 --- a/stock_picking_customer_ref/tests/test_stock_picking_customer_ref.py +++ b/stock_picking_customer_ref/tests/test_stock_picking_customer_ref.py @@ -10,13 +10,15 @@ class TestStockPickingCustomerRef(common.SavepointCase): @classmethod def setUpClass(cls): super(TestStockPickingCustomerRef, cls).setUpClass() + cls.SaleOrderObj = cls.env['sale.order'] + cls.product = cls.env['product.product'].create({ 'name': 'Test stuff', }) cls.partner = cls.env['res.partner'].create({ 'name': 'Mr. Odoo', }) - cls.sale_order = cls.env['sale.order'].create({ + cls.sale_order = cls.SaleOrderObj.create({ 'partner_id': cls.partner.id, 'order_line': [(0, 0, {'product_id': cls.product.id})], }) @@ -38,7 +40,7 @@ def test_stock_picking_customer_ref(self): 'Order ref of picking not equal to client order ref in sale') def test_stock_picking_customer_ref_on_sale_creation(self): - sale_order = self.env['sale.order'].create({ + sale_order = self.SaleOrderObj.create({ 'partner_id': self.partner.id, 'client_order_ref': 'CREATE123456', 'order_line': [(0, 0, {'product_id': self.product.id})], diff --git a/stock_picking_customer_ref/views/stock_picking_view.xml b/stock_picking_customer_ref/views/stock_picking_view.xml index 6d21099a20cc..f9e653a8f1be 100644 --- a/stock_picking_customer_ref/views/stock_picking_view.xml +++ b/stock_picking_customer_ref/views/stock_picking_view.xml @@ -18,9 +18,7 @@ - +