[FIX] account: avoid 0.0 tax lines

Don't create useless journal entries for taxes whose amount is 0.0.
Keep tax code lines creation unmodified.
Fixes #5036, opw 627055
This commit is contained in:
Arthur Maniet 2015-02-16 14:20:55 +01:00 committed by Martin Trigaux
parent 058a010456
commit 51e9f90981
1 changed files with 2 additions and 0 deletions

View File

@ -1374,6 +1374,8 @@ class account_move_line(osv.osv):
}
self.create(cr, uid, data, context)
#create the Tax movement
if not tax['amount']:
continue
data = {
'move_id': vals['move_id'],
'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''),