mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-10-25 07:27:39 -05:00
Merge branch 'master-upstream-patch-14122023' into 'master'
[PATCH] Upstream patch - 14122023 See merge request flectra-hq/flectra!1211
This commit is contained in:
commit
905908812e
2 files changed
+5
-2
No files matched your search
@@ -196,7 +196,10 @@ class DeliveryCarrier(models.Model):
|
||||
def get_return_label(self,pickings, tracking_number=None, origin_date=None):
|
||||
self.ensure_one()
|
||||
if self.can_generate_return:
|
||||
return getattr(self, '%s_get_return_label' % self.delivery_type)(pickings, tracking_number, origin_date)
|
||||
res = getattr(self, '%s_get_return_label' % self.delivery_type)(pickings, tracking_number, origin_date)
|
||||
if self.get_return_label_from_portal:
|
||||
pickings.return_label_ids.generate_access_token()
|
||||
return res
|
||||
|
||||
def get_return_label_prefix(self):
|
||||
return 'ReturnLabel-%s' % self.delivery_type
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<t t-if="i.carrier_id.get_return_label_from_portal and i.return_label_ids">
|
||||
<div>
|
||||
<a class="ml-3" t-attf-href="/web/content/#{i.return_label_ids[:1].id}" target="_blank">Print Return Label</a>
|
||||
<a class="ml-3" t-attf-href="/web/content/#{i.return_label_ids[:1].id}?access_token=#{i.return_label_ids[:1].access_token}" target="_blank">Print Return Label</a>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
Reference in new issue
Block a user