improve the message in account_id not found during creating invoice

bzr revid: mga@tinyerp.com-20090309110946-ehxaixkpoitbaagw
This commit is contained in:
mga (Tiny/Axelor)
2009-03-09 16:39:46 +05:30
parent e44cc62ef9
commit d9e235f049
+3
View File
@@ -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,