From a0ca9ce00730bebdf8d5276566cc1edb8ac876f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 7 Mar 2021 11:13:53 +0100 Subject: [PATCH] Add __access__ to Model issue9903 review324601002 --- account.py | 10 ++++++++++ account.xml | 48 ------------------------------------------------ 2 files changed, 10 insertions(+), 48 deletions(-) diff --git a/account.py b/account.py index 11f54a4f99..421848f0dc 100644 --- a/account.py +++ b/account.py @@ -178,6 +178,11 @@ class StatementRuleInformation(sequence_ordered(), ModelSQL, ModelView): fields.Selection('get_key_types', "Key Type"), 'on_change_with_key_type') + @classmethod + def __setup__(cls): + super().__setup__() + cls.__access__.add('rule') + @classmethod def get_key_types(cls): pool = Pool() @@ -302,6 +307,11 @@ class StatementRuleLine(sequence_ordered(), ModelSQL, ModelView): fields.Many2One('company.company', "Company"), 'on_change_with_company') + @classmethod + def __setup__(cls): + super().__setup__() + cls.__access__.add('rule') + @fields.depends('rule', '_parent_rule.company') def on_change_with_company(self, name=None): if self.rule and self.rule.company: diff --git a/account.xml b/account.xml index 2d6a2ab5ab..82a7274ea3 100644 --- a/account.xml +++ b/account.xml @@ -90,30 +90,6 @@ this repository contains the full copyright notices and license terms. --> rule_information_list - - - - - - - - - - - - - - - - - - - - - - - - account.statement.rule.line form @@ -125,29 +101,5 @@ this repository contains the full copyright notices and license terms. --> tree rule_line_list - - - - - - - - - - - - - - - - - - - - - - - -