From 6cb7bdc4007b5d0b0f5481f28c094b57e90a5973 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Wed, 5 Oct 2022 09:58:21 +0200 Subject: [PATCH] Intrastat Codes definition track changes --- ext/custom-addons/dp_custom/models/product.py | 7 +++++-- ext/custom-addons/dp_custom/views/product_views.xml | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ext/custom-addons/dp_custom/models/product.py b/ext/custom-addons/dp_custom/models/product.py index 02993c21..f2b98324 100644 --- a/ext/custom-addons/dp_custom/models/product.py +++ b/ext/custom-addons/dp_custom/models/product.py @@ -40,12 +40,15 @@ else: class ReportIntrastatCode(models.Model): - _inherit = "report.intrastat.code" + _name = 'report.intrastat.code' + _inherit = ['report.intrastat.code','mail.thread'] _sql_constraints = [ ('name_uniq', 'unique(name)', 'Der Intrastat-Code muss eindeutig sein'), ] - active = fields.Boolean(string='Active', default=True, help="If unchecked, it will allow you to hide the code without removing it.") + name = fields.Char(track_visibility='onchange') + description = fields.Char(track_visibility='onchange') + active = fields.Boolean(string='Active', default=True, help="If unchecked, it will allow you to hide the code without removing it.",track_visibility='onchange') class ProductTemplate(models.Model): diff --git a/ext/custom-addons/dp_custom/views/product_views.xml b/ext/custom-addons/dp_custom/views/product_views.xml index 40050656..247d2c0c 100644 --- a/ext/custom-addons/dp_custom/views/product_views.xml +++ b/ext/custom-addons/dp_custom/views/product_views.xml @@ -222,6 +222,10 @@ +
+ + +