improve the message in account_id not found during creating invoice
bzr revid: mga@tinyerp.com-20090309110946-ehxaixkpoitbaagw
This commit is contained in:
@@ -125,6 +125,9 @@ class hr_expense_expense(osv.osv):
|
||||
tax_id = [x.id for x in l.product_id.supplier_taxes_id]
|
||||
else:
|
||||
acc = self.pool.get('ir.property').get(cr, uid, 'property_account_expense_categ', 'product.category')
|
||||
if not acc:
|
||||
raise osv.except_osv(_('Error !'), _('Please configure Default Expanse account for Product purchase, `property_account_expense_categ`'))
|
||||
|
||||
lines.append((0, False, {
|
||||
'name': l.name,
|
||||
'account_id': acc,
|
||||
|
||||
Reference in New Issue
Block a user