From 6467a8ae7ed8dfc8c42bf74562444a52e7270b63 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 4 Dec 2024 19:18:03 +0100 Subject: [PATCH] [ADD] #132 integrate account_edi_simple_pdf --- ps_account/__manifest__.py | 3 +-- ps_account/models/account_move.py | 8 ++++++++ repos.yml | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ps_account/__manifest__.py b/ps_account/__manifest__.py index fcc267f6..9630b8a3 100644 --- a/ps_account/__manifest__.py +++ b/ps_account/__manifest__.py @@ -16,8 +16,7 @@ "ps_timesheet_invoicing", "report_qweb_pdf_watermark", "ps_calendar", - # TODO: probably replace with yet-to-be-migrated account_edi_simple_pdf - "account_edi", + "account_edi_simple_pdf", "account_move_tier_validation", "account_invoice_merge", ], diff --git a/ps_account/models/account_move.py b/ps_account/models/account_move.py index 53fdf01a..120285d9 100644 --- a/ps_account/models/account_move.py +++ b/ps_account/models/account_move.py @@ -173,3 +173,11 @@ def _get_name_invoice_report(self): if not self.company_id.use_standard_layout and ps_invoice: return "ps_account.report_invoice_document_ps_account" return super()._get_name_invoice_report() + + def _simple_pdf_create_invoice_from_attachment(self, attachment): + """Fill supplier_invoice_number from ref""" + self = self.with_context(default_supplier_invoice_number="dummy") + result = super()._simple_pdf_create_invoice_from_attachment(attachment) + result.supplier_invoice_number = result.ref + result.ref = False + return result diff --git a/repos.yml b/repos.yml index 1cf7b891..b5f8950d 100644 --- a/repos.yml +++ b/repos.yml @@ -45,6 +45,7 @@ edi: oca: https://github.com/OCA/edi merges: - oca 16.0 + - oca refs/pull/1091/head hr: remotes: oca: https://github.com/OCA/hr