summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Bidoul <stephane.bidoul@acsone.eu>2015-01-06 18:50:29 +0100
committerDenis Ledoux <dle@odoo.com>2015-09-30 16:22:05 +0200
commite11490c3a11d6ed0df1fab2dfd1e5e263324557c (patch)
tree44e65da7a1d01a31187ad960c6f53cca39b64542
parent4c901f8ac6438333f994d39dec1558d837a123e4 (diff)
[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
-rw-r--r--addons/account/wizard/account_reconcile.py2
1 files changed, 1 insertions, 1 deletions
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'),