Skip to content

Commit

Permalink
[FIX] use lst_price for _compute_margin in product.product
Browse files Browse the repository at this point in the history
  • Loading branch information
anhvu-sg committed Jan 4, 2024
1 parent 6dd3cfc commit 990ba8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion product_standard_margin/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Product Margin and Margin Rate",
"version": "16.0.1.0.1",
"version": "16.0.1.0.2",
"author": "Camptocamp,GRAP,Odoo Community Association (OCA)",
"category": "Product",
"depends": ["account"],
Expand Down
4 changes: 2 additions & 2 deletions product_standard_margin/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ProductProduct(models.Model):

# Compute Section
@api.depends(
"list_price",
"lst_price",
"product_tmpl_id.list_price",
"standard_price",
"taxes_id.price_include",
Expand All @@ -62,7 +62,7 @@ class ProductProduct(models.Model):
def _compute_margin(self):
for product in self:
product.list_price_vat_excl = product.taxes_id.compute_all(
product.list_price, product=product
product.lst_price, product=product
)["total_excluded"]
product.standard_margin = (
product.list_price_vat_excl - product.standard_price
Expand Down

0 comments on commit 990ba8f

Please sign in to comment.