changeset 0ccb6e865fbe in modules/stock_package_shipping_dpd:default
details: 
https://hg.tryton.org/modules/stock_package_shipping_dpd?cmd=changeset;node=0ccb6e865fbe
description:
        Allow updating dimensions on package

        issue9846
        review304891002
diffstat:

 stock.py |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (25 lines):

diff -r 2b5eb5d778f5 -r 0ccb6e865fbe stock.py
--- a/stock.py  Sat Feb 27 18:16:29 2021 +0100
+++ b/stock.py  Mon Mar 01 09:08:18 2021 +0100
@@ -203,15 +203,15 @@
             if weight < 1000000000:
                 parcel['weight'] = weight
 
-        if (package.type.length is not None
-                and package.type.width is not None
-                and package.type.height is not None):
+        if (package.length is not None
+                and package.width is not None
+                and package.height is not None):
             length = UoM.compute_qty(
-                package.type.length_uom, package.type.length, cm)
+                package.length_uom, package.length, cm)
             width = UoM.compute_qty(
-                package.type.width_uom, package.type.width, cm)
+                package.width_uom, package.width, cm)
             height = UoM.compute_qty(
-                package.type.height_uom, package.type.height, cm)
+                package.height_uom, package.height, cm)
             if length < 1000 and width < 1000 and height < 1000:
                 parcel['volume'] = int(
                     '%03i%03i%03i' % (length, width, height))

Reply via email to