Skip to content
Snippets Groups Projects
Commit bb03b05d authored by Nans Lefebvre's avatar Nans Lefebvre
Browse files

[FIX] account_facturx: do not write non-existing fields

If a field does not exist, writing it creates a warning in the logs.
This would for example prevent a valid test to pass.
This is needed because extract_state is a field from account_invoice_extract,
which is not a dependency of account_facturx.
parent 40529460
No related branches found
No related tags found
No related merge requests found
......@@ -329,4 +329,5 @@ class AccountMove(models.Model):
raise UserError(_('No decoder was found for the xml file: {}. The file is badly formatted, not supported or the decoder is not installed').format(attachment.name))
def _remove_ocr_option(self):
self.write({'extract_state': 'done'})
if 'extract_state' in self:
self.write({'extract_state': 'done'})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment