Skip to content

Commit

Permalink
[FIX] account_peppol: properly hide ocr button
Browse files Browse the repository at this point in the history
`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#163568

X-original-commit: d4b06d4
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
  • Loading branch information
aliyatastemirova committed Apr 26, 2024
1 parent 42c5158 commit d00c64e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/account_peppol/models/account_edi_proxy_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def _peppol_get_new_documents(self):
.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)
Expand All @@ -157,14 +156,15 @@ def _peppol_get_new_documents(self):
'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({
'res_model': 'account.move',
'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)

Expand Down

0 comments on commit d00c64e

Please sign in to comment.