From 86d3b4f51f54da9920e5d63d66f921eac8caa8e6 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Tue, 18 Jul 2023 23:22:27 +0000 Subject: [PATCH] [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