From 58b3625bc43c256ffb101dee70b2db0000981d21 Mon Sep 17 00:00:00 2001 From: Moens Alexandre Date: Thu, 19 May 2022 09:09:35 +0000 Subject: [PATCH] [IMP] l10n_eg_edi_eta : neutralise production env before this commit: The `odoo-bin neutralize` command would not neutralise l10n_eg_edi_eta closes odoo/odoo#92298 X-original-commit: 9a0a644444be4cceb4bdc43838dc6ce414608437 Signed-off-by: Josse Colpaert --- addons/l10n_eg_edi_eta/models/res_company.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addons/l10n_eg_edi_eta/models/res_company.py b/addons/l10n_eg_edi_eta/models/res_company.py index 74b75361a7e..f4e77c6fdb0 100644 --- a/addons/l10n_eg_edi_eta/models/res_company.py +++ b/addons/l10n_eg_edi_eta/models/res_company.py @@ -14,3 +14,17 @@ class ResCompany(models.Model): l10n_eg_invoicing_threshold = fields.Float('Invoicing Threshold', default=0.0, help="Threshold at which you are required to give the VAT number " "of the customer. ") + + # ------------------------------------------------------------ + # neutralize + # ------------------------------------------------------------ + + def _neutralize(self): + super()._neutralize() + self.flush_model() + self.invalidate_model() + self.env.cr.execute(""" + UPDATE res_company + SET l10n_eg_production_env = False, + l10n_eg_client_secret = 'dummy' + """)