Skip to content
Snippets Groups Projects
Commit af915279 authored by Robin Heinz's avatar Robin Heinz Committed by Pierre Masereel
Browse files

[IMP] delivery: Hide generate return label


Now we hide the generate return label if this option is not available for the current carrier.
Before this fix, we could set the field to true even if the option was not available for this particular carrier.

Task-Id: 1956970

closes odoo/odoo#35178

Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
parent 912f6cb2
Branches
Tags
No related merge requests found
......@@ -71,7 +71,7 @@ class DeliveryCarrier(models.Model):
@api.depends('delivery_type')
def _compute_can_generate_return(self):
for carrier in self:
carrier.can_generate_return = hasattr(self, '%s_get_return_label' % carrier.delivery_type)
carrier.can_generate_return = False
def toggle_prod_environment(self):
for c in self:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment