summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-01-10 18:04:38 +0100
committerChristophe Simonis <chs@odoo.com>2018-01-10 18:04:38 +0100
commitf6ef0c776096774fc4c6821449ab42cfc2f53e62 (patch)
treeb254006004b5367e7810420df489730e5b256174 /addons
parent228ecdbe28246b0031a9cf7e63b90f4ae11131df (diff)
[FIX] sale_mrp: correct test when `delivery` is installed
Diffstat (limited to 'addons')
-rw-r--r--addons/sale_mrp/tests/test_sale_mrp_flow.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/addons/sale_mrp/tests/test_sale_mrp_flow.py b/addons/sale_mrp/tests/test_sale_mrp_flow.py
index c67f41660b9..f6268534ef7 100644
--- a/addons/sale_mrp/tests/test_sale_mrp_flow.py
+++ b/addons/sale_mrp/tests/test_sale_mrp_flow.py
@@ -335,8 +335,15 @@ class TestSaleMrpFlow(common.TransactionCase):
product.invoice_policy = 'delivery'
# Remove the MTO route as purchase is not installed and since the procurement removal the exception is directly raised
product.write({'route_ids': [(6, 0, [self.warehouse.manufacture_pull_id.route_id.id])]})
+
+ partner = self.env.ref('base.res_partner_1')
+ # if `delivery` module is installed, a default property is set for the carrier to use
+ # However this will lead to an extra line on the SO (the delivery line), which will force
+ # the SO to have a different flow (and `invoice_state` value)
+ partner.property_delivery_carrier_id = False
+
f = Form(self.env['sale.order'])
- f.partner_id = self.env.ref('base.res_partner_1')
+ f.partner_id = partner
with f.order_line.new() as line:
line.product_id = product
line.product_uom_qty = 5