changeset b164f92fcdc4 in modules/sale:default
details: https://hg.tryton.org/modules/sale?cmd=changeset&node=b164f92fcdc4
description:
Add optional column on tree view
issue10989
review374321002
diffstat:
view/product_list_sale_line.xml | 10 +++++-----
view/sale_line_tree.xml | 8 ++++----
view/sale_line_tree_sequence.xml | 8 ++++----
view/sale_tree.xml | 11 ++++++-----
view/template_tree.xml | 4 ++--
5 files changed, 21 insertions(+), 20 deletions(-)
diffs (95 lines):
diff -r 4d2ae547c0a2 -r b164f92fcdc4 view/product_list_sale_line.xml
--- a/view/product_list_sale_line.xml Thu Feb 03 22:29:08 2022 +0100
+++ b/view/product_list_sale_line.xml Thu Feb 03 23:13:27 2022 +0100
@@ -2,11 +2,11 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
- <field name="code"/>
+ <field name="code" optional="0"/>
<field name="name" expand="1"/>
<field name="sale_price_uom"/>
- <field name="list_price_uom"/>
- <field name="cost_price_uom"/>
- <field name="quantity" symbol="default_uom"/>
- <field name="forecast_quantity" symbol="default_uom"/>
+ <field name="list_price_uom" optional="1"/>
+ <field name="cost_price_uom" optional="1"/>
+ <field name="quantity" symbol="default_uom" optional="0"/>
+ <field name="forecast_quantity" symbol="default_uom" optional="1"/>
</tree>
diff -r 4d2ae547c0a2 -r b164f92fcdc4 view/sale_line_tree.xml
--- a/view/sale_line_tree.xml Thu Feb 03 22:29:08 2022 +0100
+++ b/view/sale_line_tree.xml Thu Feb 03 23:13:27 2022 +0100
@@ -3,11 +3,11 @@
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="sale" expand="1"/>
- <field name="type"/>
- <field name="product" expand="1"/>
- <field name="summary" expand="1"/>
+ <field name="type" optional="1"/>
+ <field name="product" expand="1" optional="0"/>
+ <field name="summary" expand="1" optional="1"/>
<field name="quantity" symbol="unit"/>
<field name="unit_price"/>
- <field name="taxes"/>
+ <field name="taxes" optional="0"/>
<field name="amount"/>
</tree>
diff -r 4d2ae547c0a2 -r b164f92fcdc4 view/sale_line_tree_sequence.xml
--- a/view/sale_line_tree_sequence.xml Thu Feb 03 22:29:08 2022 +0100
+++ b/view/sale_line_tree_sequence.xml Thu Feb 03 23:13:27 2022 +0100
@@ -3,11 +3,11 @@
this repository contains the full copyright notices and license terms. -->
<tree sequence="sequence">
<field name="sale" expand="1"/>
- <field name="type"/>
- <field name="product" expand="1"/>
- <field name="summary" expand="1"/>
+ <field name="type" optional="1"/>
+ <field name="product" expand="1" optional="0"/>
+ <field name="summary" expand="1" optional="1"/>
<field name="quantity" symbol="unit"/>
<field name="unit_price"/>
- <field name="taxes"/>
+ <field name="taxes" optional="0"/>
<field name="amount"/>
</tree>
diff -r 4d2ae547c0a2 -r b164f92fcdc4 view/sale_tree.xml
--- a/view/sale_tree.xml Thu Feb 03 22:29:08 2022 +0100
+++ b/view/sale_tree.xml Thu Feb 03 23:13:27 2022 +0100
@@ -2,14 +2,15 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
+ <field name="company" expand="1" optional="1"/>
<field name="number" expand="1"/>
- <field name="reference" expand="1"/>
- <field name="sale_date"/>
+ <field name="reference" expand="1" optional="1"/>
+ <field name="sale_date" optional="0"/>
<field name="party" expand="2"/>
- <field name="warehouse"/>
- <field name="untaxed_amount"/>
+ <field name="warehouse" optional="1"/>
+ <field name="untaxed_amount" optional="0"/>
+ <field name="description" expand="1" optional="1"/>
<field name="state"/>
<field name="invoice_state"/>
<field name="shipment_state"/>
- <field name="description" expand="1"/>
</tree>
diff -r 4d2ae547c0a2 -r b164f92fcdc4 view/template_tree.xml
--- a/view/template_tree.xml Thu Feb 03 22:29:08 2022 +0100
+++ b/view/template_tree.xml Thu Feb 03 23:13:27 2022 +0100
@@ -2,7 +2,7 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
- <xpath expr="/tree/field[@name='default_uom']" position="after">
- <field name="salable"/>
+ <xpath expr="/tree/field[@name='type']" position="after">
+ <field name="salable" optional="1"/>
</xpath>
</data>