Put logic in the object
bzr revid: ced-78b140c1e7a94bf6ac37b6fbff048640b3d23e3d
This commit is contained in:
parent
9f25a3dce3
commit
2fc1c2f265
|
@ -569,7 +569,9 @@ class stock_picking(osv.osv):
|
|||
self.pool.get('sale.order').write(cr, uid, [p.sale_id.id], {
|
||||
'invoiced': True
|
||||
})
|
||||
self.write(cr, uid, res.keys(), {'invoice_state': 'invoiced'})
|
||||
return res
|
||||
|
||||
stock_picking()
|
||||
|
||||
class stock_production_lot(osv.osv):
|
||||
|
|
|
@ -100,12 +100,8 @@ def _create_invoice(obj, cr, uid, data, context):
|
|||
journal_id=data['form']['journal_id'],group=data['form']['group'],
|
||||
type=type, context= context)
|
||||
|
||||
pick_ids = res.keys()
|
||||
invoice_ids = res.values()
|
||||
|
||||
pool.get('stock.picking').write(cr, uid, pick_ids,
|
||||
{'invoice_state': 'invoiced'})
|
||||
|
||||
if not invoice_ids:
|
||||
return {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue