From 64f56361f2cf88c038aa03528bcd73666c68bc79 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 --- sale.py | 5 +++++ sale.xml | 19 ------------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/sale.py b/sale.py index 570f405870..ab39511311 100644 --- a/sale.py +++ b/sale.py @@ -78,6 +78,11 @@ class AdvancePaymentTermLine(ModelView, ModelSQL, CompanyMultiValueMixin): "- total_amount: The total amount of the sale.\n" "- untaxed_amount: The total untaxed amount of the sale.") + @classmethod + def __setup__(cls): + super().__setup__() + cls.__access__.add('advance_payment_term') + @fields.depends('formula', 'description') def pre_validate(self, **names): super(AdvancePaymentTermLine, self).pre_validate() diff --git a/sale.xml b/sale.xml index ef4ae8b069..edc4ed4d92 100644 --- a/sale.xml +++ b/sale.xml @@ -119,24 +119,5 @@ this repository contains the full copyright notices and license terms. --> - - - - - - - - - - - - - - - -