[16.0][REF] account_invoice_supplier_self_invoice: enhance self-billing footer and header logic#2256
Conversation
…ioning The self-bill report was incorrectly swapping the positions of the issuer and the recipient. In a self-billing scenario: - The Company (the recipient of the goods, but the issuer of the document) should be in the header/branding area. - The Vendor (the actual supplier) should be positioned in the address window (usually the right side) to ensure the document can be mailed correctly in a window envelope. This change ensures the addresses follow standard commercial letter formats for self-billing.
…ter logic This commit improves how footers are handled on self-billing reports and adds more granular configuration options. Changes: - Add 'self_invoice_extra_infos' to Company Settings to allow global legal mentions etc for self-billing. - Update report logic to always include the standard Company footer. - Cumulative footer logic: The report now displays the Company footer, followed by the Company self-billing extra info, and finally the Partner-specific self-billing info. - UI/UX: The "invalid self-bill" warning message is now styled in red to clearly distinguish it from standard document notes.
|
cc @Shide |
…info translatable + simplify variable name
…infos to body The report footer is structurally limited; overflowing content can lead to layout breakage or overlapping text. This commit moves the self-invoice extra information from the page footer into the main content area of the report. It is now rendered alongside standard metadata like "Payment Method" or "Bank Account" to ensure consistent layout and better visibility.
…a info layout. Remove the <strong> label.
Self-Bill -> Self-Billed
…lt self_invoice_report_footer.
|
Well the position of the partners I think it's correct. The extra infos can be customized in the footer of the partner. So no need to add an extra infos directly into the report. Maybe if you use the default on the partner to get the company default texts (translated) to the lang of the recipient could be better. Also, changing Self-Bill for Self-Billed makes no sense to me. |
It's a self-billed invoice that is generated by the company towards the partner (with agreement from the partner). The document is emitted by the company and needs the header/footer of the company. The company is the legal issuer of the document. Like a customer invoice. The document number is provided by the company corresponding to the sequence in the journal of the company and is the unique document identifier. You need to send the document to the partner, so you need the partner in the enveloppe window. As it's managed as a supplier invoice, there is no equivalent of the fiscal position you have on a customer invoice to put the legal required text. That why I asked to add an additional text configurable on the company. Process is self-billing, document is self-billed invoice / credit note. This allowed us to be compliant with https://docs.peppol.eu/poacc/self-billing/3.0/bis-sb/ |
issuer and the recipient.
In a self-billing scenario:
should be in the header/branding area.
address window (usually the right side) to ensure the document
can be mailed correctly in a window envelope.
This change ensures the addresses follow standard commercial letter
formats for self-billing.
Changes:
legal mentions etc for self-billing.
Partner-specific self-billing info.
Before
After
Steps to reproduce
Here is some demo data you can load (note that this has to be done after module init otherwise this will not work as some account records might not be setup correctly otherwise):Alternatively, you can use play this script in an odoo shell:
http://localhost:8069/report/pdf/account.report_invoice_with_payments/<move_id>