From 6681590a798148c3dace3c5c4f8c0f32b7156d1a Mon Sep 17 00:00:00 2001 From: "German Loredo [Vauxoo]" Date: Mon, 15 Jul 2024 18:36:45 +0000 Subject: [PATCH] [IMP] sale_margin_percentage: make purchase price editable This module was originally created in v11 for a specific customer, and the purchase price needed to be non-editable for some reason. Since this customer is now in v15, the purchase price does not need to be non-editable. If it is needed, it should be managed in the view because the field is natively editable. --- sale_margin_percentage/models/sale_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_margin_percentage/models/sale_order_line.py b/sale_margin_percentage/models/sale_order_line.py index c53a3a61c0c..dba97ca5630 100644 --- a/sale_margin_percentage/models/sale_order_line.py +++ b/sale_margin_percentage/models/sale_order_line.py @@ -7,7 +7,7 @@ class SaleOrderLine(models.Model): margin_threshold = fields.Float( default=lambda self: self.env.user.company_id.margin_threshold, help="Limit margin set in sales configuration" ) - purchase_price = fields.Float(readonly=True, help="Price purchase of product") + purchase_price = fields.Float(help="Price purchase of product") @api.depends("price_subtotal", "product_uom_qty", "purchase_price") def _compute_margin(self):