[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
This commit is contained in:
parent
4c901f8ac6
commit
e11490c3a1
|
@ -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),
|
'writeoff_acc_id': fields.many2one('account.account','Write-Off account', required=True),
|
||||||
'date_p': fields.date('Date'),
|
'date_p': fields.date('Date'),
|
||||||
'comment': fields.char('Comment', required=True),
|
'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 = {
|
_defaults = {
|
||||||
'date_p': lambda *a: time.strftime('%Y-%m-%d'),
|
'date_p': lambda *a: time.strftime('%Y-%m-%d'),
|
||||||
|
|
Loading…
Reference in New Issue