[9.0][FIX] mrp_bom_dismantling: fix tests

This commit is contained in:
lreficent
2017-04-26 13:17:06 +02:00
parent da58a28c00
commit c811009c2e
2 changed files with 3 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
{
"name": "BOM Dismantling",
"summary": "Ability to create a dismantling BOM by reversing a BOM.",
"version": "9.0.1.0.0",
"version": "9.0.1.0.1",
"category": "Manufacturing",
"website": "http://www.camptocamp.com/",
"author": "Camptocamp, Odoo Community Association (OCA)",

View File

@@ -16,7 +16,7 @@ class TestTemplate(TransactionCase):
# Create a BoM for this template
bom_model = self.env['mrp.bom']
bom_model.create({'product_tmpl_id': tmpl1.id})
tmpl1._bom_count()
self.assertEqual(1, tmpl1.bom_count)
# Create a dismantling BoM
@@ -34,9 +34,7 @@ class TestTemplate(TransactionCase):
# Check count on another template
tmpl2 = tmpl_model.create({'name': 'Template 2'})
self.assertEqual(0, tmpl2
.bom_count)
self.assertEqual(0, tmpl2.bom_count)
# And on dismantled product
self.assertEqual(0, other_product.product_tmpl_id.bom_count)