[IMP] improved code.
bzr revid: tpa@tinyerp.com-20120514115013-6fofhsvmmrjfj707
This commit is contained in:
parent
3536f26779
commit
6246bd0401
|
@ -110,10 +110,11 @@ class sale_advance_payment_inv(osv.osv_memory):
|
|||
context=context)
|
||||
account_id = prop and prop.id or False
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, sale.fiscal_position.id or False, account_id)
|
||||
res['account_id'] = account_id
|
||||
if not res.get('account_id'):
|
||||
if not account_id:
|
||||
raise osv.except_osv(_('Configuration Error !'),
|
||||
_('There is no income account defined as global property.'))
|
||||
else:
|
||||
res['account_id'] = account_id
|
||||
|
||||
if not res.get('account_id'):
|
||||
raise osv.except_osv(_('Configuration Error !'),
|
||||
|
|
Loading…
Reference in New Issue