changeset 51eb914d4420 in modules/purchase:default
details: https://hg.tryton.org/modules/purchase?cmd=changeset&node=51eb914d4420
description:
        Add optional column on tree view

        issue10989
        review374321002
diffstat:

 view/purchase_line_tree.xml          |  10 +++++-----
 view/purchase_line_tree_sequence.xml |  10 +++++-----
 view/purchase_tree.xml               |  11 ++++++-----
 view/template_tree.xml               |   4 ++--
 4 files changed, 18 insertions(+), 17 deletions(-)

diffs (79 lines):

diff -r b6547efd68b6 -r 51eb914d4420 view/purchase_line_tree.xml
--- a/view/purchase_line_tree.xml       Thu Feb 03 22:29:08 2022 +0100
+++ b/view/purchase_line_tree.xml       Thu Feb 03 23:13:27 2022 +0100
@@ -3,12 +3,12 @@
 this repository contains the full copyright notices and license terms. -->
 <tree>
     <field name="purchase" expand="1"/>
-    <field name="type"/>
-    <field name="product" expand="1"/>
-    <field name="product_supplier" expand="1"/>
-    <field name="summary" expand="1"/>
+    <field name="type" optional="1"/>
+    <field name="product" expand="1" optional="0"/>
+    <field name="product_supplier" expand="1" optional="1"/>
+    <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 b6547efd68b6 -r 51eb914d4420 view/purchase_line_tree_sequence.xml
--- a/view/purchase_line_tree_sequence.xml      Thu Feb 03 22:29:08 2022 +0100
+++ b/view/purchase_line_tree_sequence.xml      Thu Feb 03 23:13:27 2022 +0100
@@ -3,12 +3,12 @@
 this repository contains the full copyright notices and license terms. -->
 <tree sequence="sequence">
     <field name="purchase" expand="1"/>
-    <field name="type"/>
-    <field name="product" expand="1"/>
-    <field name="product_supplier" expand="1"/>
-    <field name="summary" expand="1"/>
+    <field name="type" optional="1"/>
+    <field name="product" expand="1" optional="0"/>
+    <field name="product_supplier" expand="1" optional="1"/>
+    <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 b6547efd68b6 -r 51eb914d4420 view/purchase_tree.xml
--- a/view/purchase_tree.xml    Thu Feb 03 22:29:08 2022 +0100
+++ b/view/purchase_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="purchase_date"/>
+    <field name="reference" expand="1" optional="0"/>
+    <field name="purchase_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 b6547efd68b6 -r 51eb914d4420 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="purchasable"/>
+    <xpath expr="/tree/field[@name='type']" position="after">
+        <field name="purchasable" optional="1"/>
     </xpath>
 </data>

Reply via email to