Skip to content

Commit

Permalink
[FIX] account: Analytic account domain in reconcile with writeoff wizard
Browse files Browse the repository at this point in the history
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 odoo#4562
  • Loading branch information
sbidoul authored and beledouxdenis committed Sep 30, 2015
1 parent 4c901f8 commit e11490c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account/wizard/account_reconcile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit e11490c

Please sign in to comment.