[WIP] Fix orderpoint
bzr revid: jco@openerp.com-20140418121426-bebr3h2l96hf1ro7
This commit is contained in:
@@ -386,6 +386,7 @@ class procurement_order(osv.osv):
|
||||
if op.product_id.type not in ('consu'):
|
||||
qty -= orderpoint_obj.subtract_procurements(cr, uid, op, context=context)
|
||||
|
||||
print op.product_id.name, qty
|
||||
if qty > 0:
|
||||
proc_id = procurement_obj.create(cr, uid,
|
||||
self._prepare_orderpoint_procurement(cr, uid, op, qty, context=context),
|
||||
|
||||
@@ -3860,11 +3860,13 @@ class stock_warehouse_orderpoint(osv.osv):
|
||||
'''
|
||||
qty = 0
|
||||
for procurement in orderpoint.procurement_ids:
|
||||
if procurement in ('cancel', 'done'):
|
||||
if procurement.state in ('cancel', 'done'):
|
||||
continue
|
||||
qty2 = procurement.product_qty
|
||||
for move in procurement.move_ids:
|
||||
if move.state not in ('draft', 'cancel'):
|
||||
qty += move.product_qty
|
||||
qty2 -= move.product_qty
|
||||
qty += qty2
|
||||
return qty
|
||||
|
||||
def _check_product_uom(self, cr, uid, ids, context=None):
|
||||
|
||||
Reference in New Issue
Block a user