[IMP] purchase: error message linked to product, not company
authorMartin Trigaux <mat@odoo.com>
Thu, 13 Nov 2014 17:01:25 +0000 (18:01 +0100)
committerMartin Trigaux <mat@odoo.com>
Fri, 14 Nov 2014 11:24:31 +0000 (12:24 +0100)
addons/purchase/purchase.py

index d1bb845..e6f4989 100644 (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