changeset 070e9fba4f4d in modules/stock_package_shipping:default
details: 
https://hg.tryton.org/modules/stock_package_shipping?cmd=changeset&node=070e9fba4f4d
description:
        Include package weight to weight parcel

        issue10145
        review335721002
diffstat:

 stock.py                   |   1 +
 view/package_form.xml      |  11 +++++------
 view/package_type_form.xml |  27 ++++++++++++---------------
 3 files changed, 18 insertions(+), 21 deletions(-)

diffs (77 lines):

diff -r 83c0dd34bf81 -r 070e9fba4f4d stock.py
--- a/stock.py  Sat Mar 13 23:16:32 2021 +0100
+++ b/stock.py  Mon Mar 29 23:40:01 2021 +0200
@@ -154,6 +154,7 @@
 
     @fields.depends('type')
     def on_change_type(self):
+        super().on_change_type()
         if self.type:
             self.length = self.type.length
             self.length_uom = self.type.length_uom
diff -r 83c0dd34bf81 -r 070e9fba4f4d view/package_form.xml
--- a/view/package_form.xml     Sat Mar 13 23:16:32 2021 +0100
+++ b/view/package_form.xml     Mon Mar 29 23:40:01 2021 +0200
@@ -2,21 +2,20 @@
 <!-- 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="//field[@name='children']" position="after">
-        <separator string="Dimensions" id="dimensions" colspan="4"/>
+    <xpath expr="//page[@id='measurements']" position="inside">
         <label name="length"/>
         <field name="length"/>
-        <label name="length_uom"/>
         <field name="length_uom"/>
+
         <label name="height"/>
         <field name="height"/>
-        <label name="height_uom"/>
         <field name="height_uom"/>
+
         <label name="width"/>
         <field name="width"/>
-        <label name="width_uom"/>
         <field name="width_uom"/>
-        <separator string="Shipping" id="shipping" colspan="4"/>
+    </xpath>
+    <xpath expr="//field[@name='shipment']" position="after">
         <label name="shipping_reference"/>
         <group col="-1" id="shipping_reference">
             <field name="shipping_reference"/>
diff -r 83c0dd34bf81 -r 070e9fba4f4d view/package_type_form.xml
--- a/view/package_type_form.xml        Sat Mar 13 23:16:32 2021 +0100
+++ b/view/package_type_form.xml        Mon Mar 29 23:40:01 2021 +0200
@@ -2,20 +2,17 @@
 <!-- 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="/form/notebook" position="inside">
-        <page id="dimensions" string="Dimensions">
-            <label name="length"/>
-            <field name="length"/>
-            <label name="length_uom"/>
-            <field name="length_uom"/>
-            <label name="height"/>
-            <field name="height"/>
-            <label name="height_uom"/>
-            <field name="height_uom"/>
-            <label name="width"/>
-            <field name="width"/>
-            <label name="width_uom"/>
-            <field name="width_uom"/>
-        </page>
+    <xpath expr="//page[@id='measurements']" position="inside">
+        <label name="length"/>
+        <field name="length"/>
+        <field name="length_uom"/>
+
+        <label name="height"/>
+        <field name="height"/>
+        <field name="height_uom"/>
+
+        <label name="width"/>
+        <field name="width"/>
+        <field name="width_uom"/>
     </xpath>
 </data>

Reply via email to