From 4dfece04b334f04ae6dc7ae406cb184b53a714bf 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 --- product.py | 6 ++++++ product.xml | 32 -------------------------------- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/product.py b/product.py index 8bf0d80c61..6d46cafd3f 100644 --- a/product.py +++ b/product.py @@ -362,6 +362,7 @@ class Product( cls._no_template_field.update(['products']) super(Product, cls).__setup__() + cls.__access__.add('template') cls._order.insert(0, ('rec_name', 'ASC')) t = cls.__table__() @@ -774,6 +775,11 @@ class ProductIdentifier(sequence_ordered(), ModelSQL, ModelView): type_string = type.translated('type') code = fields.Char("Code", required=True) + @classmethod + def __setup__(cls): + super().__setup__() + cls.__access__.add('product') + @fields.depends('type', 'code') def on_change_with_code(self): if self.type and self.type != 'other': diff --git a/product.xml b/product.xml index ecba6e51b2..dff4dda537 100644 --- a/product.xml +++ b/product.xml @@ -150,22 +150,6 @@ this repository contains the full copyright notices and license terms. --> id="menu_product" icon="tryton-list"/> - - - - - - - - - - - - - - - - @@ -225,22 +209,6 @@ this repository contains the full copyright notices and license terms. --> identifier_list_sequence - - - - - - - - - - - - - - - - Variant product.product