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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-