[IMP] account_move_line: improved account selection when partner changes

bzr revid: ara@tinyerp.com-20110705061954-15qtmkg029ptdnn2
This commit is contained in:
Stéphane Bidoul 2011-07-05 11:49:54 +05:30 committed by ARA (OpenERP)
parent 097962f9f9
commit 5f02988765
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ class account_move_line(osv.osv):
elif jt in ('general', 'bank', 'cash'):
if part.customer and not part.supplier:
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id2)
else:
elif part.supplier and not part.customer:
val['account_id'] = fiscal_pos_obj.map_account(cr, uid, part and part.property_account_position or False, id1)
if val.get('account_id', False):
d = self.onchange_account_id(cr, uid, ids, val['account_id'])