bug fix
bzr revid: dsh-20090123134530-ky0y8cyj36nwxqoj
This commit is contained in:
@@ -452,6 +452,8 @@ class purchase_order_line(osv.osv):
|
||||
partner_id, date_order=False, fiscal_position=False):
|
||||
if not pricelist:
|
||||
raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the purchase form !\nPlease set one before choosing a product.'))
|
||||
if not partner_id:
|
||||
raise osv.except_osv(_('No Partner!'), _('You have to select a partner in the purchase form !\nPlease set one partner before choosing a product.'))
|
||||
if not product:
|
||||
return {'value': {'price_unit': 0.0, 'name':'','notes':'', 'product_uom' : False}, 'domain':{'product_uom':[]}}
|
||||
prod= self.pool.get('product.product').browse(cr, uid,product)
|
||||
|
||||
+2
-2
@@ -851,8 +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.'))
|
||||
if not partner_id:
|
||||
raise osv.except_osv(_('No Partner !'), _('You have to select a partner 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')
|
||||
|
||||
Reference in New Issue
Block a user