From 23c07f0b1eda40e8f22908f21f2ced52b714cfbe Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Mon, 12 Dec 2022 16:58:38 +0000 Subject: [PATCH] [REV] sale_margin: revert f5310d21c4a54adf05262c1df4e4a9e0778fc55c With the previous commit fixing the forced purchase_price recomputation on all lines caused by the dependencies added by sale_stock_margin, we can now safely allow manual edition of the cost. closes odoo/odoo#107909 X-original-commit: 9c51daaa58c403778861ec484e0493698bacbc92 Signed-off-by: Victor Feyens (vfe) --- addons/sale_margin/models/sale_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_margin/models/sale_order_line.py b/addons/sale_margin/models/sale_order_line.py index 0130ec81451..c99f5e71850 100644 --- a/addons/sale_margin/models/sale_order_line.py +++ b/addons/sale_margin/models/sale_order_line.py @@ -14,7 +14,7 @@ class SaleOrderLine(models.Model): "Margin (%)", compute='_compute_margin', store=True, groups="base.group_user", precompute=True) purchase_price = fields.Float( string="Cost", compute="_compute_purchase_price", - digits='Product Price', store=True, precompute=True, + digits='Product Price', store=True, readonly=False, precompute=True, groups="base.group_user") @api.depends('product_id', 'company_id', 'currency_id', 'product_uom')