From e461e4e95759859958a46a40b2b1f9c4efe1de7c Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Tue, 18 Jul 2023 23:13:44 +0000 Subject: [PATCH 01/12] [IMP] web: better placeholders in the base report layouts Include placeholders meant for the new studio editor engine. X-original-commit: 87f66c19d5c1d27e2afa0aae697b768334275c88 Part-of: odoo/odoo#129492 --- addons/web/views/report_templates.xml | 153 +++++++++++++++++--------- 1 file changed, 99 insertions(+), 54 deletions(-) diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index 6f1c09ec60d..a8fbe85073e 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -291,52 +291,58 @@ @@ -339,22 +342,22 @@ - subtotal_to_show: The subtotal we need to render the groups from --> + - - - VAT 21% - on - 9 Eur - - + + Tax 15% - 1.4 Eur + 1.05 - VAT 21% + + Tax 15% + on + 27.00 + - 1.4 Eur + 4.05 @@ -362,20 +365,22 @@ From 86d3b4f51f54da9920e5d63d66f921eac8caa8e6 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Tue, 18 Jul 2023 23:22:27 +0000 Subject: [PATCH 04/12] [IMP] stock, stock_*: adapt reports to studio report editor Includes several modifications to better work with the new editor: - add placeholders on t-field/t-out nodes - add several div.oe_structure containers in key places for easier user edition - add branching options for several t-if directives without a t-else to display for users (e.g. displaying the payment QR code if the value is set vs. when the value is not set). These branching options are set to a default value (the t-if node) which is what users see by default in the report editor; the t-else node is a version they can manually toggle if they wish) - avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as these break the table layout in chomium-based engines (that we know of); instead, try to have foreach loops on tr or td nodes directly, or hoist t-set directives above the table node - replace several div or p (block) nodes by span or other inline nodes to make it easier for users to insert content in their vicinity X-original-commit: 567b8d676b3b6dc747df4d9bf10e7a91b4cb61bb Part-of: odoo/odoo#129492 --- addons/stock/report/report_deliveryslip.xml | 76 +++++---- .../stock/report/report_package_barcode.xml | 68 ++++---- .../report/report_stockpicking_operations.xml | 147 +++++++++++------- addons/stock_account/views/report_invoice.xml | 44 +++--- 4 files changed, 186 insertions(+), 149 deletions(-) diff --git a/addons/stock/report/report_deliveryslip.xml b/addons/stock/report/report_deliveryslip.xml index 6cd3bff0588..eb779048d1a 100644 --- a/addons/stock/report/report_deliveryslip.xml +++ b/addons/stock/report/report_deliveryslip.xml @@ -43,23 +43,21 @@

- + WH/OUT/0001

+
Order: -

+

S0001

Shipping Date: - -

- - -

- +

+

+
@@ -72,36 +70,34 @@
- + Customizable Desk

- + Description on transfer

- - + 3.00 + units - - + 3.00 + units
- +
- - - + @@ -159,8 +155,10 @@
Product - Lot/Serial Number - Ordered + Lot/Serial Number + Delivered
+
- +
+

Remaining quantities not yet delivered:

@@ -173,27 +171,25 @@ - - - - - -

- -

- - - - - - - -
+ + + Office Chair +

+ Description on transfer +

+ + + + 3.00 + units + + -
+
-
+
+
Signature
@@ -201,7 +197,7 @@
-

+

John Doe

diff --git a/addons/stock/report/report_package_barcode.xml b/addons/stock/report/report_package_barcode.xml index f722a92ab76..f967dd1b9df 100644 --- a/addons/stock/report/report_package_barcode.xml +++ b/addons/stock/report/report_package_barcode.xml @@ -10,39 +10,43 @@
- - - - - -
-

-

- -
- - -
-
-
- -
-

- -

+
+
+

Package Reference

+
+
+ + +
+
+ (package barcode) +
+
+
+
+
+
+ (package barcode) +
+
+

Package Reference

+
+
+
Pack Date: -

+

2021-9-01

Package Type: -

+

Pallet

- - - +
+ + +
@@ -55,16 +59,16 @@ diff --git a/addons/stock/report/report_stockpicking_operations.xml b/addons/stock/report/report_stockpicking_operations.xml index 994ab1bf14b..9c01255daf5 100644 --- a/addons/stock/report/report_stockpicking_operations.xml +++ b/addons/stock/report/report_stockpicking_operations.xml @@ -6,10 +6,15 @@ +
-
+
+
+ (document barcode) +
+
@@ -17,12 +22,22 @@
Delivery Address:
+ t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'> +
+ Delivery address +
Presence depends on the type of operation.
+
+
Warehouse Address:
+ t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'> +
+ Warehouse address +
Presence depends on the type of operation.
+
+
@@ -31,34 +46,40 @@ Vendor Address:
-
+
Warehouse Address:
-
+
Customer Address:
+ t-options='{"widget": "contact", "fields": ["address", "name", "phone", "vat"], "no_marker": True, "phone_icons": True}'> +
+ Recipient address +
Presence depends on the type of operation.
+
+
+
-
-

-
+

WH/OUT/00001

+
+
Order: -

+

S0001

Status: -

+

Draft

Scheduled Date: -

+

2023-09-24

Product
- + Customizable Desk - + 3.00 - + units - + 54326786758 @@ -84,7 +88,11 @@ - + +
+ (product barcode) +
+
@@ -75,7 +96,7 @@ - - - - - - - - - + + + - - + + + + +
From + To @@ -88,74 +109,90 @@
-
- -
- - - - - - - - - -
- - - - -
-
-
-
- - -
- - +
+ Customizable Desk
+ Description on transfer +
+ 3.00 + 3.00 + units + + WH/Stock + + Package A -
+
+ WH/Outgoing + + Shelf 1 + +
+
+ +
+ (serial barcode) +
+
+
+ + +
+
+ (product barcode) +
+
+
+ + +
- +
+
- + - -
Package FromToTo
-

+ +
+
+ (package barcode) +
+
+
+
+

All products could not be reserved. Click on the "Check Availability" button to try to reserve products.

+

+

+

diff --git a/addons/stock_account/views/report_invoice.xml b/addons/stock_account/views/report_invoice.xml index 4c5d29032a2..55ca2a2d32d 100644 --- a/addons/stock_account/views/report_invoice.xml +++ b/addons/stock_account/views/report_invoice.xml @@ -4,30 +4,26 @@ - -
- - - - - - - - - - - - - - - - - -
ProductQuantitySN/LN
- - -
-
+
​
+ + + + + + + + + + + + + + + +
ProductQuantitySN/LN
Bacon + 6.00 + units + BC46282798
From f7cf89d914657835f48440cf9a4ad2fad9a4ee11 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Tue, 18 Jul 2023 23:45:27 +0000 Subject: [PATCH 05/12] [IMP] hr_timesheet: adapt reports to studio report editor Includes several modifications to better work with the new editor: - add placeholders on t-field/t-out nodes - add several div.oe_structure containers in key places for easier user edition - add branching options for several t-if directives without a t-else to display for users (e.g. displaying the payment QR code if the value is set vs. when the value is not set). These branching options are set to a default value (the t-if node) which is what users see by default in the report editor; the t-else node is a version they can manually toggle if they wish) - avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as these break the table layout in chomium-based engines (that we know of); instead, try to have foreach loops on tr or td nodes directly, or hoist t-set directives above the table node - replace several div or p (block) nodes by span or other inline nodes to make it easier for users to insert content in their vicinity X-original-commit: eabdfe294d38df463828f87970b25d52ceae4a6a Part-of: odoo/odoo#129492 --- .../report/report_timesheet_templates.xml | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/addons/hr_timesheet/report/report_timesheet_templates.xml b/addons/hr_timesheet/report/report_timesheet_templates.xml index 3902b65db3c..c68df6fb4c6 100644 --- a/addons/hr_timesheet/report/report_timesheet_templates.xml +++ b/addons/hr_timesheet/report/report_timesheet_templates.xml @@ -13,46 +13,43 @@ Task Description - Days Spent - Hours Spent + Hours Spent + Days Spent - + 2021-09-01 - - + Audrey Peterson + Audrey Peterson - + Research and Development - + New Portal System - + Call client and discuss project - - + 2 hours + 1 day - - - - - - Total (Days) - + + + Total (Hours) + 2 hours - Total (Hours) - + Total (Days) + 1 day @@ -112,7 +109,7 @@

Timesheets - for the Project + for the Research and Development Project

From 48efc85e16d5ca9684d6328ad99a65c9b604b986 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Wed, 19 Jul 2023 00:40:24 +0000 Subject: [PATCH 06/12] [FIX] product_expiry: adapt to report layout X-original-commit: 4388ac8a03e2325b6aa50228718b41c8244f7af9 Part-of: odoo/odoo#129492 --- addons/product_expiry/report/report_deliveryslip.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_expiry/report/report_deliveryslip.xml b/addons/product_expiry/report/report_deliveryslip.xml index 280fba354ea..925a6721bf0 100644 --- a/addons/product_expiry/report/report_deliveryslip.xml +++ b/addons/product_expiry/report/report_deliveryslip.xml @@ -1,7 +1,7 @@ From c51f280af6c46b3b48923273baf2876e826ba9a3 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Thu, 20 Jul 2023 07:45:29 +0000 Subject: [PATCH 08/12] [FIX] l10n_*: adapt to base report layout changes X-original-commit: c46ab5022828c8c25427cb4532296ed4c05eb871 Part-of: odoo/odoo#129492 --- addons/l10n_ae/views/report_invoice_templates.xml | 2 +- addons/l10n_cl/views/report_invoice.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_ae/views/report_invoice_templates.xml b/addons/l10n_ae/views/report_invoice_templates.xml index 295f34a2094..e916a2373b7 100644 --- a/addons/l10n_ae/views/report_invoice_templates.xml +++ b/addons/l10n_ae/views/report_invoice_templates.xml @@ -1,7 +1,7 @@ diff --git a/addons/sale/models/sale_order.py b/addons/sale/models/sale_order.py index 65754ed0867..9d99bf719f0 100644 --- a/addons/sale/models/sale_order.py +++ b/addons/sale/models/sale_order.py @@ -1548,11 +1548,6 @@ class SaleOrder(models.Model): self.ensure_one() return self.env.ref('sale.action_quotations_with_onboarding') - def _get_name_sale_report(self): - """ This method can be inherited by localizations who want to localize the sale order report. """ - self.ensure_one() - return 'sale.report_saleorder_document' - def _get_name_portal_content_view(self): """ This method can be inherited by localizations who want to localize the online quotation view. """ self.ensure_one() diff --git a/addons/sale/report/ir_actions_report_templates.xml b/addons/sale/report/ir_actions_report_templates.xml index 229756672d1..80778d4adb0 100644 --- a/addons/sale/report/ir_actions_report_templates.xml +++ b/addons/sale/report/ir_actions_report_templates.xml @@ -157,7 +157,7 @@ - +
@@ -195,10 +195,7 @@ @@ -208,10 +205,7 @@ - - + diff --git a/addons/sale/views/sale_portal_templates.xml b/addons/sale/views/sale_portal_templates.xml index ac6ee147a54..1c26d6def2a 100644 --- a/addons/sale/views/sale_portal_templates.xml +++ b/addons/sale/views/sale_portal_templates.xml @@ -567,9 +567,7 @@
-
- -
+