Remove tax lines from on_change vals instead of only those in the database for

issue923
This commit is contained in:
Cédric Krier committed 2009-04-12 16:14:53 +02:00
1 parent 4cf5b10e21
commit 5825e10caf
1 file changed
+2 -4
+2 -4
View File
@@ -766,10 +766,8 @@ class Line(ModelSQL, ModelView):
if vals.get('move'):
#Only for first line
return res
if ids:
line = self.browse(cursor, user, ids[0], context=context)
if line.tax_lines:
res['remove'] = [x.id for x in line.tax_lines]
if vals.get('tax_lines'):
res['remove'] = [x['id'] for x in vals['tax_lines']]
if vals.get('account'):
account = account_obj.browse(cursor, user, vals['account'],
context=context)