diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:35:46 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:35:46 +0200 |
| commit | 96595772e0859cc272bc022ab8c22852ba3d06f3 (patch) | |
| tree | 0ed8d8431740b6c3d24827f98b678b213b8ce1cd /addons/sale_margin/tests | |
| parent | 89fdd259accb20008ba98f99072572edcb7c7c60 (diff) | |
| parent | dc8b473a0332fa4b0e06a53a393abccc4b88c18a (diff) | |
[MERGE] forward port branch 10.0 up to dc8b473a033
Diffstat (limited to 'addons/sale_margin/tests')
| -rw-r--r-- | addons/sale_margin/tests/test_sale_margin.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/addons/sale_margin/tests/test_sale_margin.py b/addons/sale_margin/tests/test_sale_margin.py index 46cf3561aec..8252fd7f390 100644 --- a/addons/sale_margin/tests/test_sale_margin.py +++ b/addons/sale_margin/tests/test_sale_margin.py @@ -23,14 +23,22 @@ class TestSaleMargin(common.TransactionCase): sale_order_so11 = self.SaleOrder.create({ 'date_order': datetime.today(), 'name': 'Test_SO011', - 'order_line': [(0, 0, { - 'name': '[CARD] Graphics Card', - 'purchase_price': 700.0, - 'price_unit': 1000.0, - 'product_uom': self.product_uom_id, - 'product_uom_qty': 10.0, - 'state': 'draft', - 'product_id': self.product_id})], + 'order_line': [ + (0, 0, { + 'name': '[CARD] Graphics Card', + 'purchase_price': 700.0, + 'price_unit': 1000.0, + 'product_uom': self.product_uom_id, + 'product_uom_qty': 10.0, + 'state': 'draft', + 'product_id': self.product_id}), + (0, 0, { + 'name': 'Line without product_uom', + 'price_unit': 1000.0, + 'purchase_price': 700.0, + 'product_uom_qty': 10.0, + 'state': 'draft', + 'product_id': self.product_id})], 'partner_id': self.partner_id, 'partner_invoice_id': self.partner_invoice_address_id, 'partner_shipping_id': self.partner_invoice_address_id, @@ -38,4 +46,4 @@ class TestSaleMargin(common.TransactionCase): # Confirm the sales order. sale_order_so11.action_confirm() # Verify that margin field gets bind with the value. - self.assertEqual(sale_order_so11.margin, 3000.00, "Sales order margin should be 3000.00") + self.assertEqual(sale_order_so11.margin, 6000.00, "Sales order margin should be 6000.00") |
