Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="markup">50</field>
<field name="name">Normal Margin (33%)</field>
<field name="price_round">0.05</field>
<field name="company_id" eval="False" />

</record>

Expand All @@ -18,6 +19,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="name">Big Margin (50%, with 95 cents)</field>
<field name="price_round">1</field>
<field name="price_surcharge">-0.05</field>
<field name="company_id" eval="False" />
</record>

</odoo>
1 change: 1 addition & 0 deletions product_margin_classification/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ProductProduct(models.Model):
margin_classification_id = fields.Many2one(
comodel_name="product.margin.classification",
string="Margin Classification",
check_company=True,
)

theoretical_price = fields.Float(
Expand Down
1 change: 1 addition & 0 deletions product_margin_classification/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ProductTemplate(models.Model):
inverse="_inverse_margin_classification_id",
search="_search_margin_classification_id",
comodel_name="product.margin.classification",
check_company=True,
)

theoretical_price = fields.Float(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def test_06_create_product_template(self):
{
"name": "Template Name",
"margin_classification_id": self.classification_big_margin,
"company_id": False,
}
)
self.assertEqual(
Expand Down
Loading