add exception on SO when no partner
bzr revid: nel@tinyerp.com-20090123130736-mmbwyibbn2lo9o7j
This commit is contained in:
parent
bd0148a496
commit
8e3e534bef
|
@ -851,6 +851,8 @@ class sale_order_line(osv.osv):
|
|||
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
|
||||
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
|
||||
lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False):
|
||||
if not pricelist:
|
||||
raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the sale form !\nPlease set one partner before choosing a product.'))
|
||||
warning={}
|
||||
product_uom_obj = self.pool.get('product.uom')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
|
|
Loading…
Reference in New Issue