Skip to content
Snippets Groups Projects
Commit 1bb51b55 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[MERGE] forward port branch saas-12 up to 9dc383e8

parents 59c410ac 9dc383e8
Branches
Tags
No related merge requests found
Showing
with 2 additions and 0 deletions
......@@ -885,6 +885,8 @@ class AccountMoveLine(models.Model):
vals['date'] = self._context.get('date_p') or time.strftime('%Y-%m-%d')
if 'name' not in vals:
vals['name'] = self._context.get('comment') or _('Write-Off')
if 'analytic_account_id' not in vals:
vals['analytic_account_id'] = self.env.context.get('analytic_id', False)
#compute the writeoff amount if not given
if 'credit' not in vals and 'debit' not in vals:
amount = sum([r.amount_residual for r in self])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment