[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) <las@odoo.com> Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user