[FIX] Match reserved package should be correct
bzr revid: jco@openerp.com-20140307092953-zg05xusw9xctol8b
This commit is contained in:
parent
63763ef224
commit
146f04cff0
|
@ -3582,8 +3582,9 @@ class stock_pack_operation(osv.osv):
|
|||
def _check_quants_reserved(ops):
|
||||
if ops.package_id and not ops.product_id:
|
||||
qty_op_rem[ops.id] = {}
|
||||
for quant in self.get_contents(cr, uid, ops.package_id):
|
||||
if quant.reservation_id and quant.reservation_id.id in [x.id for x in ops.picking_id.move_lines] and (not quants_done.get(quant.id)):
|
||||
package_obj.get_contents(cr, uid, ops.package_id)
|
||||
for quant in package_obj.get_contents(cr, uid, ops.package_id):
|
||||
if quant.id in quants_done.keys() and (quants_done[quant.id] == quant.qty):
|
||||
#Entire packages means entire quants from those packages
|
||||
if not quants_done.get(quant.id):
|
||||
quants_done[quant.id] = 0
|
||||
|
|
|
@ -57,6 +57,7 @@ class stock_history(osv.osv):
|
|||
def _get_inventory_value(self, cr, uid, ids, name, attr, context=None):
|
||||
product_obj = self.pool.get("product.product")
|
||||
res = {}
|
||||
#Browse takes an immense amount of time because it seems to reload the report
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if line.product_id.cost_method == 'real':
|
||||
res[line.id] = line.quantity * line.price_unit_on_quant
|
||||
|
|
Loading…
Reference in New Issue