[IMP] purchase: error message linked to product, not company

This commit is contained in:
Martin Trigaux 2014-11-13 18:01:25 +01:00
parent 1a826e07fe
commit 7f4c4a5e8a
1 changed files with 1 additions and 1 deletions

View File

@ -471,7 +471,7 @@ class purchase_order(osv.osv):
if not acc_id:
acc_id = po_line.product_id.categ_id.property_account_expense_categ.id
if not acc_id:
raise osv.except_osv(_('Error!'), _('Define expense account for this company: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))
raise osv.except_osv(_('Error!'), _('Define expense account for this product: "%s" (id:%d).') % (po_line.product_id.name, po_line.product_id.id,))
else:
acc_id = property_obj.get(cr, uid, 'property_account_expense_categ', 'product.category', context=context).id
fpos = po_line.order_id.fiscal_position or False