Skip to content

Commit

Permalink
[IMP] sale_margin_percentage: make purchase price editable
Browse files Browse the repository at this point in the history
This module was originally created in v11 for a specific customer, and
the purchase price needed to be non-editable for some reason. Now 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.
  • Loading branch information
xmglord authored and luisg123v committed Jul 15, 2024
1 parent 34fc9e8 commit 5d0d154
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion sale_margin_percentage/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ 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")

@api.depends("price_subtotal", "product_uom_qty", "purchase_price")
def _compute_margin(self):
Expand Down

0 comments on commit 5d0d154

Please sign in to comment.