Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-software-de committed Jul 13, 2023
1 parent cc23e29 commit ba6bd4d
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions stock_release_channel/models/stock_release_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _get_picking_compute_fields(self):
return [("count", "release_channel_id_count")]

@api.model
def _get_move_read_fields(self):
def _get_move_read_group_fields(self):
return []

@api.model
Expand Down Expand Up @@ -265,23 +265,20 @@ def _compute_picking_count(self):
+ picking_read_fields,
["release_channel_id"],
)
for prefix, fetch in picking_compute_fields:
field = self._get_compute_field_name(prefix, "picking", domain_name)
for row in data:
channel_id = (
row["release_channel_id"] and row["release_channel_id"][0]
)
if not channel_id:
continue
for row in data:
channel_id = row["release_channel_id"] and row["release_channel_id"][0]
if not channel_id:
continue
picking_ids = row["picking_ids"]
all_picking_ids.update(picking_ids)
for picking_id in picking_ids:
picking_channels[picking_id]["channel_id"] = channel_id
picking_channels[picking_id]["matched_domains"].append(domain_name)

for prefix, fetch in picking_compute_fields:
field = self._get_compute_field_name(prefix, "picking", domain_name)
channels_aggregate_values[channel_id][field] = row[fetch]
picking_ids = row["picking_ids"]
all_picking_ids.update(picking_ids)
for picking_id in picking_ids:
picking_channels[picking_id]["channel_id"] = channel_id
picking_channels[picking_id]["matched_domains"].append(
domain_name
)
move_read_fields = self._get_move_read_fields()
move_read_fields = self._get_move_read_group_fields()
move_compute_fields = self._get_move_compute_fields()
data = self.env["stock.move"].read_group(
# TODO for now we do estimates, later we may improve the domains per
Expand Down

0 comments on commit ba6bd4d

Please sign in to comment.