odoo/odoo#163507

Created by Accounting, Aliya Tastemirova (alta)
label
odoo-dev:saas-17.1-fix-peppol-hide-ocr-button-alta
head
361a32e78ffc4462a98bc1f013b05d18a64c1ba5
target
saas-17.1
merged
3 weeks ago by Accounting, Laurent Smet (las)
forward-ports

[FIX] account_peppol: hide ocr button correctly

The recent commit https://github.com/odoo/enterprise/commit/b12fc61af033f8914529d86a3edb464fc951f7dc changed the way a move is created during the import of a new peppol document. Before, we were passing a default value for `extract_can_show_send_button`, but now we try to set this field to `False` directly in create values. However, this field only exists in enterprise and thus things break if a user is only using community. Also, it's a computed readonly field, so it is better to use `is_in_extractable_state` for this purpose.

no task, fixing the error highlighted by tests



---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr