Skip to content

Commit 523d47b

Browse files
committed
[MIG] mrp_bom_attribute_match: Migration to 16.0
1 parent 2a79460 commit 523d47b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

mrp_bom_attribute_match/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "BOM Attribute Match",
3-
"version": "15.0.1.0.0",
3+
"version": "16.0.1.0.0",
44
"category": "Manufacturing",
55
"author": "Ilyas, Ooops, Odoo Community Association (OCA)",
66
"summary": "Dynamic BOM component based on product attribute",

mrp_bom_attribute_match/tests/common.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,23 @@ def _create_products(self):
9292

9393
def _create_boms(self):
9494
mrp_bom_form = Form(self.env["mrp.bom"])
95+
96+
category = self.env["uom.category"].create(
97+
{
98+
"name": "Custom UoM category",
99+
}
100+
)
101+
102+
self.env["uom.uom"].create(
103+
{
104+
"name": "Bigger UoM of my category",
105+
"factor_inv": 42,
106+
"uom_type": "bigger",
107+
"rounding": 0.5,
108+
"category_id": category.id,
109+
}
110+
)
111+
mrp_bom_form.bom_line_ids.product_uom_id = self.env["uom.uom"].search([])[0].id
95112
mrp_bom_form.product_tmpl_id = self.product_sword
96113
with mrp_bom_form.bom_line_ids.new() as line_form:
97114
line_form.component_template_id = self.product_plastic

0 commit comments

Comments
 (0)