From 6b96e5024af628e501f5348068ef3c98919aca95 Mon Sep 17 00:00:00 2001 From: Olivier Colson Date: Thu, 13 Sep 2018 11:06:31 +0200 Subject: [PATCH 1/2] [IMP] account: forbid making a 'bank & cash' account reconcilable Making a bank account reconcilable is a very common mistake, and leads to confusing and useless data (the move lines made on this account) to be displayed in the reconciliation widget. With this commit, we make sure the user cannot make this mistake anymore. --- addons/account/models/account.py | 2 ++ addons/account/views/account_view.xml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 6ceb5ba19b1..dd519baf5ce 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -136,6 +136,8 @@ class AccountAccount(models.Model): def onchange_internal_type(self): if self.internal_type in ('receivable', 'payable'): self.reconcile = True + if self.internal_type == 'liquidity': + self.reconcile = False @api.multi @api.depends('name', 'code') diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index ae7680d05e0..42bd931795c 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -21,9 +21,9 @@ -