From d00c64e2631329aac22193bd578c0804314c6270 Mon Sep 17 00:00:00 2001 From: aliya Date: Fri, 26 Apr 2024 13:24:41 +0200 Subject: [PATCH] [FIX] account_peppol: properly hide ocr button `extract_can_show_send_button` is a computed readonly field, providing a default value doesn't do anything. By setting `is_in_extractable_state` to `False` by default, we can hide the ocr button. no task, noticed while fixing a traceback in saas-17.1 closes odoo/odoo#163568 X-original-commit: d4b06d49624a1e3c5ecbb4d0c755a165cf213120 Signed-off-by: Laurent Smet (las) Signed-off-by: Aliya Tastemirova (alta) --- addons/account_peppol/models/account_edi_proxy_user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_peppol/models/account_edi_proxy_user.py b/addons/account_peppol/models/account_edi_proxy_user.py index 079cc1ffd13..5e88270bafa 100644 --- a/addons/account_peppol/models/account_edi_proxy_user.py +++ b/addons/account_peppol/models/account_edi_proxy_user.py @@ -140,7 +140,6 @@ class AccountEdiProxyClientUser(models.Model): .with_context( default_move_type='in_invoice', default_peppol_move_state=content['state'], - default_extract_can_show_send_button=False, default_peppol_message_uuid=uuid, )\ ._create_document_from_attachment(attachment.id) @@ -157,7 +156,6 @@ class AccountEdiProxyClientUser(models.Model): 'move_type': 'in_invoice', 'peppol_move_state': 'done', 'company_id': company.id, - 'extract_can_show_send_button': False, 'peppol_message_uuid': uuid, }) attachment_vals.update({ @@ -165,6 +163,8 @@ class AccountEdiProxyClientUser(models.Model): 'res_id': move.id, }) self.env['ir.attachment'].create(attachment_vals) + if 'is_in_extractable_state' in move._fields: + move.is_in_extractable_state = False proxy_acks.append(uuid)