From e8776485b402b2f633dc42a50a05dd05653b5cab Mon Sep 17 00:00:00 2001 From: Camille Spiritus Date: Tue, 5 Apr 2022 08:05:43 +0000 Subject: [PATCH] [IMP] account: align delivery and recipient adresses on invoices Since 15.2, when creating an invoice containing both a recipient address and an invoice address, the addresses would both appear on the left, one after the other. This made reading difficult and the invoice unclear. Furthermore, the company address wasn't present by default on the invoice : it was only there if a layout had previously been selected. This PR: - reverts the behaviour of the company address, i.e. it appears even if no layout is (yet) selected ; - aligns the delivery and the recipient address on each side of the page when necessary, while not changing the outcome if a single address is given. Also displays a "title" above the addresses when necessary to make things clearer. task-2809240 related : https://github.com/odoo/enterprise/pull/27240 closes odoo/odoo#91487 X-original-commit: 1e745256fabbec4d6979180d8f792c99be463509 Related: odoo/enterprise#27383 Signed-off-by: Florian Gilbert --- .../account/views/bill_preview_template.xml | 2 +- addons/account/views/report_invoice.xml | 281 +++++++++++------- addons/l10n_ca/views/report_invoice.xml | 14 +- addons/web/views/report_templates.xml | 2 + 4 files changed, 178 insertions(+), 121 deletions(-) diff --git a/addons/account/views/bill_preview_template.xml b/addons/account/views/bill_preview_template.xml index 0870b99b8fd..0811881b677 100644 --- a/addons/account/views/bill_preview_template.xml +++ b/addons/account/views/bill_preview_template.xml @@ -141,4 +141,4 @@ - \ No newline at end of file + diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml index cdc1a892f8b..2bae85c2bc5 100644 --- a/addons/account/views/report_invoice.xml +++ b/addons/account/views/report_invoice.xml @@ -5,136 +5,168 @@ - - -
- Shipping Address: -
+
+ +
+ +
+ Shipping Address: +
+
+ +
+
+ +
+
+ + Tax ID: +
+
- -
- -
- -
-

- Invoice - Draft Invoice - Cancelled Invoice - Credit Note - Vendor Credit Note - Vendor Bill - -

- -
-
- Invoice Date: -

+ +

+ +
+
+ + Tax ID: +
+
-
- Due Date: -

+ + +

+ +
+
+ + Tax ID: +
+
-
- Source: -

+ +

+
+
+

+ Invoice + Draft Invoice + Cancelled Invoice + Credit Note + Vendor Credit Note + Vendor Bill + +

+ +
+
+ Invoice Date: +

+

+
+ Due Date: +

+

+
+ Source: +

+

+
+ Customer Code: +

+

+
+ Reference: +

+

-
- Customer Code: -

-

-
- Reference: -

-

-
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
DescriptionQuantityUnit Price - Disc.% - Taxes - Amount - Total Price -
- - - - - - - - - - - - - - - -
+ + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
DescriptionQuantityUnit Price + Disc.% + Taxes + Amount + Total Price +
- Subtotal - -
+ + + + + + + + + + + + + + + +
+ Subtotal + +
+ +
- - - + + + @@ -157,10 +189,11 @@ + - -
+ +
@@ -184,6 +217,24 @@ Scan me with your banking app.

+

+ +

+
+ +
+

+ +

+

+ Incoterm: - +

+
+

+ Scan me with your banking app.

+ +

+
diff --git a/addons/l10n_ca/views/report_invoice.xml b/addons/l10n_ca/views/report_invoice.xml index 4198d6d8850..5a1bd5a39bf 100644 --- a/addons/l10n_ca/views/report_invoice.xml +++ b/addons/l10n_ca/views/report_invoice.xml @@ -1,9 +1,13 @@ diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index 695ca362760..1347dff2e26 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -441,6 +441,8 @@
+