diff options
| author | Josse Colpaert <jco@odoo.com> | 2014-09-10 19:11:21 +0200 |
|---|---|---|
| committer | Josse Colpaert <jco@odoo.com> | 2014-09-12 13:49:42 +0200 |
| commit | aabebbbc6c80a82d533924cd05bd4e685a5285d1 (patch) | |
| tree | 46309aab6ae5d7cf6fc82e38be112b66dbc91977 | |
| parent | ae2eb43e30e1b1c555b5e952cdacbc2a601f66b1 (diff) | |
[FIX] Bom qty
| -rw-r--r-- | addons/mrp/mrp.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index bc5b7608eec..83794c2c4ba 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -321,7 +321,7 @@ class mrp_bom(osv.osv): raise osv.except_osv(_('Invalid Action!'), _('BoM "%s" contains a BoM line with a product recursion: "%s".') % (master_bom.name,bom_line_id.product_id.name_get()[0][1])) all_prod.append(bom_line_id.product_id.id) - + quantity = _factor(bom_line_id.product_qty * factor, bom_line_id.product_efficiency, bom_line_id.product_rounding) bom_id = self._bom_find(cr, uid, bom_line_id.product_uom.id, product_id=bom_line_id.product_id.id, properties=properties, context=context) #If BoM should not behave like PhantoM, just add the product, otherwise explode further @@ -329,14 +329,13 @@ class mrp_bom(osv.osv): result.append({ 'name': bom_line_id.product_id.name, 'product_id': bom_line_id.product_id.id, - 'product_qty': bom_line_id.product_qty * factor, + 'product_qty': quantity, 'product_uom': bom_line_id.product_uom.id, 'product_uos_qty': bom_line_id.product_uos and bom_line_id.product_uos_qty * factor or False, 'product_uos': bom_line_id.product_uos and bom_line_id.product_uos.id or False, }) elif bom_id: bom2 = self.browse(cr, uid, bom_id, context=context) - quantity = _factor(bom_line_id.product_qty * factor, bom_line_id.product_efficiency, bom_line_id.product_rounding) res = self._bom_explode(cr, uid, bom2, bom_line_id.product_id, quantity, properties=properties, level=level + 10, previous_products=all_prod, master_bom=master_bom, context=context) result = result + res[0] |
