Skip to content

Commit

Permalink
Merge PR OCA#511 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by sebalix
  • Loading branch information
OCA-git-bot committed Dec 6, 2022
2 parents 647f228 + 8091ba0 commit 1e5d55f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions delivery_carrier_label_batch/models/stock_batch_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,9 @@ def _get_options_to_add(self, carrier=None):
def carrier_id_change(self):
"""Inherit this method in your module"""
if self.carrier_id:
# This can look useless as the field carrier_code and
# carrier_type are related field. But it's needed to fill
# this field for using this fields in the view. Indeed the
# module that depend on delivery base can hide some field
# depending of the type or the code

available_options = self.carrier_id.available_option_ids
default_options = self._get_options_to_add()
self.option_ids = [(6, 0, default_options.ids)]
self.carrier_code = self.carrier_id.code
return {
"domain": {
"option_ids": [("id", "in", available_options.ids)],
Expand Down

0 comments on commit 1e5d55f

Please sign in to comment.