Skip to content

Commit

Permalink
fixup! [ADD] account_edi_simple_pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed Nov 22, 2024
1 parent 4cca385 commit 904b42e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions account_edi_simple_pdf/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _simple_pdf_create_invoice_from_attachment(self, attachment):
],
}
)
result._onchange_partner_id()
if result.partner_id.simple_pdf_product_id:
with Form(result) as invoice_form:
with invoice_form.invoice_line_ids.edit(0) as line_form:
Expand Down
8 changes: 8 additions & 0 deletions account_edi_simple_pdf/tests/test_invoice_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,3 +546,11 @@ def test_specific_python_methods(self):
# test only pure-pdf methods
# because we are sure they work on the Github test environment
self._complete_import_specific_method("pypdf")

def test_test_run(self):
"""
Test the test run code on the partner form
"""
self.partner_ak.simple_pdf_test_file = self.ak_pdf_file_b64
self.partner_ak.pdf_simple_test_run()
self.assertIn("Current partner found", self.partner_ak.simple_pdf_test_results)

0 comments on commit 904b42e

Please sign in to comment.