Skip to content
Snippets Groups Projects
Commit e11490c3 authored by Stéphane Bidoul's avatar Stéphane Bidoul Committed by Denis Ledoux
Browse files

[FIX] account: Analytic account domain in reconcile with writeoff wizard

The domain for the analytic account in the `reconcile with writeoff` wizard
should be based on the `type` field, which must be `view`,
not on the `parent_id` field, as it's done everywhere else
(e.g. in the supplier invoice form).

`[('parent_id', '!=', False)]`
and
`[('type', '!=', 'view')]`
is almost the same, but the second domain is more appropriate.

Closes #4562
parent 4c901f8a
Branches
Tags
No related merge requests found
......@@ -108,7 +108,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
'writeoff_acc_id': fields.many2one('account.account','Write-Off account', required=True),
'date_p': fields.date('Date'),
'comment': fields.char('Comment', required=True),
'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('type', '!=', 'view')]),
}
_defaults = {
'date_p': lambda *a: time.strftime('%Y-%m-%d'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment