summaryrefslogtreecommitdiff
path: root/addons/sale_mrp
diff options
context:
space:
mode:
authorDebauche Stéphane <std@odoo.com>2019-12-02 14:47:07 +0000
committerDebauche Stéphane <std@odoo.com>2019-12-06 10:58:03 +0000
commit42d3a82a809b15652ee3dd61ff3ec414fe7a76cb (patch)
tree0cfeb33d37ec2e0877852de917f90231b2e69f85 /addons/sale_mrp
parentd6458e68df909898818ed3699c49f917ee3b561f (diff)
[IMP] stock_account: remove the wizard which change the ``standard_price``
Overwrite the method ``write`` of the model ``product.product``. When we write on ``standard_price``, if - the context key ``disable_auto_svl`` is not set - the ``cost_method`` is not "fifo" We automatically compute ``stock.valuation.layer`` (before we needed to manually call ``_change_standard_price``) Task #2031422 closes odoo/odoo#41265 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons/sale_mrp')
-rw-r--r--addons/sale_mrp/tests/test_sale_mrp_procurement.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/sale_mrp/tests/test_sale_mrp_procurement.py b/addons/sale_mrp/tests/test_sale_mrp_procurement.py
index 8c411bfb55f..1f321e634d4 100644
--- a/addons/sale_mrp/tests/test_sale_mrp_procurement.py
+++ b/addons/sale_mrp/tests/test_sale_mrp_procurement.py
@@ -39,9 +39,7 @@ class TestSaleMrpProcurement(TransactionCase):
product.route_ids.add(warehouse0.mto_pull_id.route_id)
product_template_slidermobile0 = product.save()
- std_price_wiz = Form(self.env['stock.change.standard.price'].with_context(active_id=product_template_slidermobile0.id, active_model='product.template'))
- std_price_wiz.new_price = 189
- std_price_wiz.save()
+ product_template_slidermobile0.standard_price = 189
product_component = Form(self.env['product.product'])
product_component.name = 'Battery'