FIX product_catch_weight if line moved doesn't have a lot, then the ratio is implicitly 0 despite having a default ratio.

This commit is contained in:
Jared Kipe
2018-10-16 11:40:31 -07:00
parent 0dd740138d
commit e705aa8ef1
2 changed files with 4 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ class TestPicking(TransactionCase):
'uom_po_id': self.product_uom_id.id,
'catch_weight_uom_id': self.ref_uom_id.id,
})
self.pricelist = self.env.ref('product.list0')
# def test_creation(self):
@@ -69,6 +70,7 @@ class TestPicking(TransactionCase):
'partner_invoice_id': self.partner1.id,
'partner_shipping_id': self.partner1.id,
'order_line': [(0, 0, {'product_id': self.product1.id})],
'pricelist_id': self.pricelist.id,
})
so.action_confirm()
self.assertTrue(so.state in ('sale', 'done'))
@@ -104,6 +106,7 @@ class TestPicking(TransactionCase):
'partner_invoice_id': self.partner1.id,
'partner_shipping_id': self.partner1.id,
'order_line': [(0, 0, {'product_id': self.product1.id, 'product_uom_qty': 2.0})],
'pricelist_id': self.pricelist.id,
})
so.action_confirm()
self.assertTrue(so.state in ('sale', 'done'))