Skip to content

Commit

Permalink
Merge PR OCA#179 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Dec 3, 2023
2 parents 6049d41 + 9aba92c commit 1ffeee1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions product_standard_margin/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

from odoo import api, fields, models

import odoo.addons.decimal_precision as dp


class ProductProduct(models.Model):
_inherit = "product.product"
Expand All @@ -17,14 +15,14 @@ class ProductProduct(models.Model):
compute="_compute_margin",
string="Sale Price VAT Excluded",
store=True,
digits=dp.get_precision("Product Price"),
digits="Product Price",
)

standard_margin = fields.Float(
compute="_compute_margin",
string="Theorical Margin",
store=True,
digits=dp.get_precision("Product Price"),
digits="Product Price",
help="Theorical Margin is [ sale price (Wo Tax) - cost price ] "
"of the product form (not based on historical values). "
"Take care of tax include and exclude. If no sale price, "
Expand All @@ -35,7 +33,7 @@ class ProductProduct(models.Model):
compute="_compute_margin",
string="Theorical Margin (%)",
store=True,
digits=dp.get_precision("Product Price"),
digits="Product Price",
help="Markup rate is [ Theorical Margin / sale price (Wo Tax) ] "
"of the product form (not based on historical values)."
"Take care of tax include and exclude.. If no sale price "
Expand All @@ -45,7 +43,7 @@ class ProductProduct(models.Model):
compute="_compute_margin",
string="Theorical Markup (%)",
store=True,
digits=dp.get_precision("Product Price"),
digits="Product Price",
help="Markup rate is [ Theorical Margin / cost price (Wo Tax) ] "
"of the product form (not based on historical values)."
"Take care of tax include and exclude.. If no cost price "
Expand Down
10 changes: 4 additions & 6 deletions product_standard_margin/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

from odoo import api, fields, models

import odoo.addons.decimal_precision as dp


class ProductTemplate(models.Model):
_inherit = "product.template"
Expand All @@ -16,13 +14,13 @@ class ProductTemplate(models.Model):
list_price_vat_excl = fields.Float(
compute="_compute_margin",
string="Sale Price VAT Excluded",
digits=dp.get_precision("Product Price"),
digits="Product Price",
)

standard_margin = fields.Float(
compute="_compute_margin",
string="Theorical Margin",
digits=dp.get_precision("Product Price"),
digits="Product Price",
help="Theorical Margin is [ sale price (Wo Tax) - cost price ] "
"of the product form (not based on historical values). "
"Take care of tax include and exclude. If no sale price, "
Expand All @@ -32,7 +30,7 @@ class ProductTemplate(models.Model):
standard_margin_rate = fields.Float(
compute="_compute_margin",
string="Theorical Margin (%)",
digits=dp.get_precision("Product Price"),
digits="Product Price",
help="Margin rate is [ Theorical Margin / sale price (Wo Tax) ] "
"of the product form (not based on historical values)."
"Take care of tax include and exclude.. If no sale price "
Expand All @@ -41,7 +39,7 @@ class ProductTemplate(models.Model):
standard_markup_rate = fields.Float(
compute="_compute_margin",
string="Theorical Markup (%)",
digits=dp.get_precision("Product Price"),
digits="Product Price",
help="Markup rate is [ Theorical Margin / cost price (Wo Tax) ] "
"of the product form (not based on historical values)."
"Take care of tax include and exclude.. If no cost price "
Expand Down

0 comments on commit 1ffeee1

Please sign in to comment.