[FIX] account: analytic account on write-off

When an analytic account is specified on a write-off move, it should be
written on the move line linked to the write-off account, as it was the
case in v8.

opw-688635
This commit is contained in:
Nicolas Martinelli
2016-10-10 17:01:21 +02:00
parent 2990060b7d
commit d60354aaf7
+2 -2
View File
@@ -916,8 +916,8 @@ class AccountMoveLine(models.Model):
# Writeoff line in the account of self
first_line_dict = vals.copy()
first_line_dict['account_id'] = self[0].account_id.id
if 'analytic_account_id' in vals:
del vals['analytic_account_id']
if 'analytic_account_id' in first_line_dict:
del first_line_dict['analytic_account_id']
# Writeoff line in specified writeoff account
second_line_dict = vals.copy()