From 66532aec75e23d5d375a18084957ae5b8df08b1c Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 17 Dec 2018 11:17:43 +0100 Subject: [PATCH] Add @api.model on method that should use it Improve log msg --- account_usability/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_usability/account.py b/account_usability/account.py index b32eec3..1d78c7b 100644 --- a/account_usability/account.py +++ b/account_usability/account.py @@ -253,6 +253,7 @@ class AccountAccount(models.Model): logger.info("END of the script 'fix bank and cash account types'") return True + @api.model def create_account_groups(self, level=2, name_prefix=u'Comptes '): '''Should be launched by a script. Make sure the account_group module is installed (the account_usability module doesn't depend on it currently''' @@ -262,7 +263,7 @@ class AccountAccount(models.Model): if len(companies) > 1: logger.info( 'Multi-company detected: running script create_account_groups ' - 'as root') + 'as admin') self = self.sudo() ago = self.env['account.group'] groups = ago.search([])