From e11490c3a11d6ed0df1fab2dfd1e5e263324557c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Tue, 6 Jan 2015 18:50:29 +0100 Subject: [PATCH] [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 --- addons/account/wizard/account_reconcile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py index f3090208909..ab29458710e 100644 --- a/addons/account/wizard/account_reconcile.py +++ b/addons/account/wizard/account_reconcile.py @@ -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'),