[MERGE] set context when None on sale.order
bzr revid: fp@tinyerp.com-20121113080908-jb73ee8q5vpfmxmf
This commit is contained in:
commit
c2495fa308
|
@ -281,6 +281,7 @@ class sale_order(osv.osv):
|
||||||
}
|
}
|
||||||
|
|
||||||
def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context=None):
|
def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context=None):
|
||||||
|
context = context or {}
|
||||||
if not pricelist_id:
|
if not pricelist_id:
|
||||||
return {}
|
return {}
|
||||||
value = {
|
value = {
|
||||||
|
@ -617,6 +618,7 @@ class sale_order(osv.osv):
|
||||||
}
|
}
|
||||||
|
|
||||||
def action_wait(self, cr, uid, ids, context=None):
|
def action_wait(self, cr, uid, ids, context=None):
|
||||||
|
context = context or {}
|
||||||
for o in self.browse(cr, uid, ids):
|
for o in self.browse(cr, uid, ids):
|
||||||
if not o.order_line:
|
if not o.order_line:
|
||||||
raise osv.except_osv(_('Error!'),_('You cannot confirm a sale order which has no line.'))
|
raise osv.except_osv(_('Error!'),_('You cannot confirm a sale order which has no line.'))
|
||||||
|
|
Loading…
Reference in New Issue