changeset d325cc11b3ae in modules/production_routing:default
details: 
https://hg.tryton.org/modules/production_routing?cmd=changeset;node=d325cc11b3ae
description:
        Add __access__ to Model

        issue9903
        review324601002
diffstat:

 routing.py  |   5 +++++
 routing.xml |  16 ----------------
 2 files changed, 5 insertions(+), 16 deletions(-)

diffs (40 lines):

diff -r 00c7a5894f6a -r d325cc11b3ae routing.py
--- a/routing.py        Sat Feb 27 18:16:28 2021 +0100
+++ b/routing.py        Sun Mar 07 11:13:53 2021 +0100
@@ -27,6 +27,11 @@
     routing = fields.Many2One('production.routing', 'Routing', required=True,
         ondelete='CASCADE')
 
+    @classmethod
+    def __setup__(cls):
+        super().__setup__()
+        cls.__access__.add('routing')
+
     def get_rec_name(self, name):
         return self.operation.rec_name
 
diff -r 00c7a5894f6a -r d325cc11b3ae routing.xml
--- a/routing.xml       Sat Feb 27 18:16:28 2021 +0100
+++ b/routing.xml       Sun Mar 07 11:13:53 2021 +0100
@@ -118,21 +118,5 @@
             <field name="type">form</field>
             <field name="name">routing_step_form</field>
         </record>
-
-        <record model="ir.model.access" id="access_routing_step">
-            <field name="model" search="[('model', '=', 
'production.routing.step')]"/>
-            <field name="perm_read" eval="True"/>
-            <field name="perm_write" eval="False"/>
-            <field name="perm_create" eval="False"/>
-            <field name="perm_delete" eval="False"/>
-        </record>
-        <record model="ir.model.access" id="access_routing_step_admin">
-            <field name="model" search="[('model', '=', 
'production.routing.step')]"/>
-            <field name="group" ref="production.group_production_admin"/>
-            <field name="perm_read" eval="True"/>
-            <field name="perm_write" eval="True"/>
-            <field name="perm_create" eval="True"/>
-            <field name="perm_delete" eval="True"/>
-        </record>
     </data>
 </tryton>

Reply via email to