Skip to content

[19.0][MIG] ddmrp_report_part_flow_index: Migration to 19.0 - #618

Open
dnplkndll wants to merge 22 commits into
OCA:19.0from
ledoent:19.0-mig-ddmrp_report_part_flow_index
Open

[19.0][MIG] ddmrp_report_part_flow_index: Migration to 19.0#618
dnplkndll wants to merge 22 commits into
OCA:19.0from
ledoent:19.0-mig-ddmrp_report_part_flow_index

Conversation

@dnplkndll

@dnplkndll dnplkndll commented Jun 16, 2026

Copy link
Copy Markdown

Port of ddmrp_report_part_flow_index (DDMRP Report Part Flow Index) from 18.0 to 19.0.

@OCA-git-bot OCA-git-bot added series:19.0 mod:ddmrp_report_part_flow_index Module ddmrp_report_part_flow_index labels Jun 16, 2026
@dnplkndll
dnplkndll marked this pull request as ready for review June 16, 2026 14:02
Comment on lines 14 to 31
def _calc_flow_index_group_id(self):
flow_index_reports = self.env["report.ddmrp.part.plan.flow.index"].read_group(
domain=[("buffer_id", "in", self.ids)],
fields=["order_frequency_group"],
groupby=["buffer_id"],
self.env["stock.buffer"].flush_model()
frequency_by_buffer = dict(
self.env["report.ddmrp.part.plan.flow.index"]._read_group(
domain=[("buffer_id", "in", self.ids)],
groupby=["buffer_id"],
aggregates=["order_frequency_group:sum"],
)
)
flow_index_groups = self.env["ddmrp.flow.index.group"].search([])
flow_index_groups = self.env["ddmrp.flow.index.group"].search([]) # pylint: disable=no-search-all
for rec in self:
flow_index_report = list(
filter(lambda x: x["buffer_id"][0] == rec.id, flow_index_reports)
)
if not flow_index_report:
if rec not in frequency_by_buffer:
continue

frequency_group = flow_index_report[0]["order_frequency_group"]
frequency_group = frequency_by_buffer[rec]
for index_group in flow_index_groups:
if index_group.upper_range and index_group.lower_range:
if (

@LoisRForgeFlow LoisRForgeFlow Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested functionally and these changes might have generated an issue.

In ruboat, I increased a MOQ of a buffer to make its order_frequency_group grow, but after refreshing the buffer, the flow index group didn't change:

Image

PD: I used the index groups already created in runboat, but they are inverted (the name is misleading): low order frequency should be high flow and viceversa.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnplkndll have you checked this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to but was not able to reproduce. on vaca this week. fine if you want to supersede it in the mean time.
ledoent@21d9de4
it seemed like there might be opportunity to add the report as well. but will not likely get to look for another week.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, not urgent, just checking the status

@LoisRForgeFlow

Copy link
Copy Markdown
Contributor

/ocabot migration ddmrp_report_part_flow_index

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Jun 17, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Jun 17, 2026
18 tasks
@dnplkndll
dnplkndll force-pushed the 19.0-mig-ddmrp_report_part_flow_index branch 2 times, most recently from 223ba48 to 4e15866 Compare June 18, 2026 16:40
@dnplkndll
dnplkndll force-pushed the 19.0-mig-ddmrp_report_part_flow_index branch 2 times, most recently from 0d3695b to 2efa264 Compare June 22, 2026 18:33
@dnplkndll
dnplkndll force-pushed the 19.0-mig-ddmrp_report_part_flow_index branch 3 times, most recently from eb094dc to 8376350 Compare July 7, 2026 13:34
JordiBForgeFlow and others added 15 commits July 9, 2026 16:07
Currently translated at 100.0% (26 of 26 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp_report_part_flow_index
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_report_part_flow_index/it/
Currently translated at 100.0% (31 of 31 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp_report_part_flow_index
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_report_part_flow_index/it/
Currently translated at 100.0% (32 of 32 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp_report_part_flow_index
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_report_part_flow_index/it/
Currently translated at 100.0% (31 of 31 strings)

Translation: ddmrp-16.0/ddmrp-16.0-ddmrp_report_part_flow_index
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_report_part_flow_index/it/
@dnplkndll
dnplkndll force-pushed the 19.0-mig-ddmrp_report_part_flow_index branch from 8376350 to 6e0a481 Compare July 9, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:ddmrp_report_part_flow_index Module ddmrp_report_part_flow_index series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants