[FIX] account: multiple pdf msg records creation

Configure an email alias for the journal 'Vendor Bills'
Send to the mail alias two pdf bills

Issue: Only 1 record is created with the 2 bills as attachment
The system should split the bills into separate records, but this does
not occur:
- after the first bill is processed the current move extract_state is
  'waiting_extraction'
- when the system check whether to extract data from the second document the
  result is negative as it check the state of the first document

opw-3822262

Co-authored-by Andrea Grazioso <agr@odoo.com>

closes odoo/odoo#160983

Related: odoo/enterprise#60168
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Antoine Boonen
2024-04-10 15:14:58 +00:00
committed by Andrea Grazioso (agr-odoo)
parent b392d85b62
commit e9cc9204d3
+1 -1
View File
@@ -3157,7 +3157,7 @@ class AccountMove(models.Model):
close_file(file_data)
continue
decoder = self._get_edi_decoder(file_data, new=new)
decoder = (current_invoice or current_invoice.new(self.default_get(['move_type', 'journal_id'])))._get_edi_decoder(file_data, new=new)
if decoder:
try:
with self.env.cr.savepoint():