mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_bom_attribute_match_duplicate_kit: use correct uom
This commit is contained in:
@@ -26,6 +26,7 @@ class TestProductTemplateKitWizard(TestProductTemplateKitCommon):
|
|||||||
def test_action_confirm_flow(self):
|
def test_action_confirm_flow(self):
|
||||||
"""Test flow that run full workflow"""
|
"""Test flow that run full workflow"""
|
||||||
product = self.product_template_two_attributes
|
product = self.product_template_two_attributes
|
||||||
|
product.uom_id = self.env.ref("uom.product_uom_dozen")
|
||||||
context = {
|
context = {
|
||||||
"default_product_tmpl_id": product.id,
|
"default_product_tmpl_id": product.id,
|
||||||
"default_new_product_template_name": "{} 1".format(product.name),
|
"default_new_product_template_name": "{} 1".format(product.name),
|
||||||
@@ -60,6 +61,7 @@ class TestProductTemplateKitWizard(TestProductTemplateKitCommon):
|
|||||||
)
|
)
|
||||||
self.assertEqual(boms.type, "phantom")
|
self.assertEqual(boms.type, "phantom")
|
||||||
self.assertEqual(boms.product_qty, 1, "Product Qty must be equal to 1")
|
self.assertEqual(boms.product_qty, 1, "Product Qty must be equal to 1")
|
||||||
|
self.assertEqual(boms.product_uom_id, product.uom_id)
|
||||||
self.assertTrue(boms.bom_line_ids, "BOM must have Lines")
|
self.assertTrue(boms.bom_line_ids, "BOM must have Lines")
|
||||||
self.assertEqual(len(boms.bom_line_ids), 1, msg="BOM must have one line")
|
self.assertEqual(len(boms.bom_line_ids), 1, msg="BOM must have one line")
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class ProductTemplateKitWizard(models.TransientModel):
|
|||||||
"product_tmpl_id": new_product.id,
|
"product_tmpl_id": new_product.id,
|
||||||
"type": "phantom",
|
"type": "phantom",
|
||||||
"product_qty": 1,
|
"product_qty": 1,
|
||||||
|
"product_uom_id": new_product.uom_id.id,
|
||||||
"bom_line_ids": [
|
"bom_line_ids": [
|
||||||
(
|
(
|
||||||
0,
|
0,
|
||||||
|
|||||||
Reference in New Issue
Block a user