[IMP]: Improve sale stock action_wait method
bzr revid: atp@tinyerp.com-20120917062100-pb6msmh01t4kirca
This commit is contained in:
parent
87e8b0ea51
commit
eef634b3dc
|
@ -594,6 +594,8 @@ class sale_order(osv.osv):
|
|||
noprod = self.test_no_product(cr, uid, o, context)
|
||||
if (o.order_policy == 'manual') or noprod:
|
||||
self.write(cr, uid, [o.id], {'state': 'manual', 'date_confirm': fields.date.context_today(self, cr, uid, context=context)})
|
||||
else:
|
||||
self.write(cr, uid, [o.id], {'state': 'progress', 'date_confirm': fields.date.context_today(self, cr, uid, context=context)})
|
||||
self.pool.get('sale.order.line').button_confirm(cr, uid, [x.id for x in o.order_line])
|
||||
self.confirm_send_note(cr, uid, ids, context)
|
||||
return True
|
||||
|
|
|
@ -217,8 +217,6 @@ class sale_order(osv.osv):
|
|||
noprod = self.test_no_product(cr, uid, o, context)
|
||||
if noprod and o.order_policy=='picking':
|
||||
self.write(cr, uid, [o.id], {'order_policy': 'manual'}, context=context)
|
||||
if not (o.order_policy == 'manual') or not noprod:
|
||||
self.write(cr, uid, [o.id], {'state': 'progress', 'date_confirm': fields.date.context_today(self, cr, uid, context=context)})
|
||||
return res
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False, context=None):
|
||||
|
|
Loading…
Reference in New Issue