From 675a433da1b5f551ae74225805a7326a24479d89 Mon Sep 17 00:00:00 2001 From: Matthieu Dietrich Date: Wed, 7 Jan 2015 15:54:23 +0100 Subject: [PATCH] Deactivate constraint on account.account (unnecessary if Webkit reports are used) --- account_financial_report_webkit/account.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/account_financial_report_webkit/account.py b/account_financial_report_webkit/account.py index 97a63797..34abfb60 100644 --- a/account_financial_report_webkit/account.py +++ b/account_financial_report_webkit/account.py @@ -45,3 +45,16 @@ class AccountAccount(orm.Model): _defaults = { 'centralized': False, } + + # Related to WebKit reports: this constraint is not relevant anymore, + # since the initial balance of the partner reports + # (ledger, balance, open invoices) is computed on-the-fly, instead of + # using the opening journal entry data (hence the deferral method) + def _check_account_type(self, cr, uid, ids, context=None): + return True + + _constraints = [ + (_check_account_type, + '', + ['user_type', 'type']), + ]