Skip to content

Commit

Permalink
[COV] l10n_it_fatturapa_out: Run export wizard on more invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoRubi authored and SirAionTech committed Dec 27, 2023
1 parent bf40c0a commit 6cfa37e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions l10n_it_fatturapa_out/tests/fatturapa_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,17 @@ def set_sequences(
seq_date = inv_seq._create_date_range_seq(dt)
seq_date.number_next_actual = invoice_number

def run_wizard(self, invoice_id):
def run_wizard(self, invoice_ids):
"""
Execute the export wizard on the invoices having ID `invoice_ids`.
:param invoice_ids: integer or list of integers
:return: result of export wizard
"""
if not isinstance(invoice_ids, list):
invoice_ids = [invoice_ids]
wizard = self.wizard_model.create({})
return wizard.with_context(active_ids=invoice_id).exportFatturaPA()
return wizard.with_context(active_ids=invoice_ids).exportFatturaPA()

def set_e_invoice_file_id(self, e_invoice, file_name):
# We need this because file name is random and we can't predict it
Expand Down

0 comments on commit 6cfa37e

Please sign in to comment.