Skip to content

Commit

Permalink
[IMP] stock_barcodes_gs1_secondary_unit: removed filled fields method…
Browse files Browse the repository at this point in the history
… after improve stock_barcodes module
  • Loading branch information
sergio-teruel committed Nov 2, 2023
1 parent a571948 commit a7ee837
Showing 1 changed file with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,8 @@ def _prepare_move_line_values(self, candidate_move, available_qty):
)
return vals

def filter_sml(self, candidate_lines, lines, sml_vals):
def _get_candidate_line_domain(self):
domain = super(WizStockBarcodesReadPicking, self)._get_candidate_line_domain()
if self.secondary_uom_id:
lines = lines.filtered(
lambda ln: ln.secondary_uom_id == self.secondary_uom_id
and ln.barcode_scan_state == "pending"
)
return lines

def determine_todo_action(self, forced_todo_line=False):
res = super().determine_todo_action(forced_todo_line=forced_todo_line)
if self.option_group_id.barcode_guided_mode == "guided":
if self.option_group_id.get_option_value(
"secondary_uom_id", "filled_default"
):
self.secondary_uom_id = self.todo_line_id.line_ids[:1].secondary_uom_id
if self.option_group_id.get_option_value(
"secondary_uom_qty", "filled_default"
):
self.secondary_uom_qty = self.todo_line_id.secondary_uom_qty
return res
domain.append(("secondary_uom_id", "=", self.secondary_uom_id.id))
return domain

0 comments on commit a7ee837

Please sign in to comment.