Add tracking URL

issue10136
review341531002
This commit is contained in:
Cédric Krier committed 2021-03-13 23:16:32 +01:00
1 parent 0975fca0c2
commit e4ddde17c1
4 files changed
+16 -1

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
* Add tracking URL
* Allow updating dimensions on package
* Add configuration option to store label in filestore
* Manage supplier shipment returns
+10
View File
@@ -104,6 +104,16 @@ class Package(DimensionsMixin, metaclass=PoolMeta):
"Shipping Label", readonly=True,
file_id=file_id, store_prefix=store_prefix)
shipping_label_id = fields.Char("Shipping Label ID", readonly=True)
shipping_tracking_url = fields.Function(
fields.Char(
"Shipping Tracking URL",
states={
'invisible': ~Eval('shipping_tracking_url'),
}),
'get_shipping_tracking_url')
def get_shipping_tracking_url(self, name):
return
@classmethod
def __register__(cls, module_name):
+4 -1
View File
@@ -18,7 +18,10 @@ this repository contains the full copyright notices and license terms. -->
<field name="width_uom"/>
<separator string="Shipping" id="shipping" colspan="4"/>
<label name="shipping_reference"/>
<field name="shipping_reference"/>
<group col="-1" id="shipping_reference">
<field name="shipping_reference"/>
<field name="shipping_tracking_url" widget="url"/>
</group>
<label name="shipping_label"/>
<field name="shipping_label"/>
</xpath>
+1
View File
@@ -4,5 +4,6 @@ this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/tree/field[@name='type']" position="after">
<field name="shipping_reference" expand="1"/>
<field name="shipping_tracking_url" widget="url"/>
</xpath>
</data>