Skip to content

[IMP] ddmrp_report_part_flow_index: store flow index on buffer + add Actual Flow Index report#24

Open
dnplkndll wants to merge 42 commits into
19.0-mig-ddmrp_report_part_flow_indexfrom
19.0-imp-flow_index_simplify
Open

[IMP] ddmrp_report_part_flow_index: store flow index on buffer + add Actual Flow Index report#24
dnplkndll wants to merge 42 commits into
19.0-mig-ddmrp_report_part_flow_indexfrom
19.0-imp-flow_index_simplify

Conversation

@dnplkndll

@dnplkndll dnplkndll commented Jun 18, 2026

Copy link
Copy Markdown

Simplification + roadmap follow-up on top of the 19.0 MIG (OCA#618). Two [IMP] commits; base is the MIG branch, so the diff is the improvement only.

What changed

  • order_frequency, order_frequency_group and flow_index_group_id are now stored computed fields on stock.buffer (order_frequency/order_frequency_group depend on green_zone_qty / adu; flow_index_group_id on order_frequency_group). Replaces the cron_actions hook + _read_group + flush_model recompute path.
  • Removed the report.ddmrp.part.plan.flow.index SQL view. The Plan report is now a list/pivot/graph on stock.buffer.
  • Added the Parts Actual Flow Index report (ROADMAP item). actual_order_count / actual_order_frequency / actual_order_frequency_group / actual_flow_index_group_id are computed at buffer refresh from completed replenishment moves over the past horizon, reusing the ddmrp.flow.index.group ranges.
  • Buffer form: a Flow Index notebook page (Planned / Actual); the group is shown as a badge on the form and the report lists.

Definitions

  • Actual order frequency = observation window / completed replenishment receipts. Window = the buffer's ADU past horizon, or 365 days when none is configured. Calendar days.
  • order_frequency_group rounding is half-away-from-zero, matching the prior SQL round().

Tests

Local 19.0 install + --test-enable: 0 failed / 0 error of 5 tests (planned recompute via cron, planned recompute on direct input write, actual flow from receipts, no-history, _match open-ended ranges + gap).

Builds on OCA#618.

Screenshots

  • Buffer form — Flow Index page (Planned / Actual; group as badge). SB/00001: planned Medium Flow, actual Low Flow.

    Flow Index tab

  • Parts Plan Flow Index — list, default group-by Flow Index Group.

    Plan report

  • Parts Actual Flow Index — same views, default group-by Actual Flow Index Group (no completed replenishments → None).

    Actual report

  • Pivot — planned and actual order-frequency-group measures per flow group.

    Pivot

JordiBForgeFlow and others added 30 commits June 18, 2026 16:40
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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/
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/
weblate and others added 10 commits June 18, 2026 16:40
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: ddmrp-17.0/ddmrp-17.0-ddmrp_report_part_flow_index
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-17-0/ddmrp-17-0-ddmrp_report_part_flow_index/
Currently translated at 100.0% (30 of 30 strings)

Translation: ddmrp-17.0/ddmrp-17.0-ddmrp_report_part_flow_index
Translate-URL: https://translation.odoo-community.org/projects/ddmrp-17-0/ddmrp-17-0-ddmrp_report_part_flow_index/it/
…n the report

Also, take the ocassion to make buffer_id clickable in tree view.
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
@dnplkndll dnplkndll force-pushed the 19.0-imp-flow_index_simplify branch 4 times, most recently from 6f0364f to 387c14b Compare June 18, 2026 19:12
…al report

- order_frequency / order_frequency_group / flow_index_group_id are now stored
  computed fields on stock.buffer (reactive on green_zone_qty / adu), replacing
  the cron_actions hook + _read_group + flush_model recompute path.
- Drop the report.ddmrp.part.plan.flow.index SQL view; the Plan report is now a
  pivot / graph / list on stock.buffer.
- Add the Parts Actual Flow Index report: actual_order_* fields computed at
  refresh from completed replenishments over the past horizon, reusing the
  ddmrp.flow.index.group ranges. Closes the ROADMAP item.
- Add a Flow Index notebook page (Planned / Actual) on the buffer form and show
  the group as a badge on the form and the report lists.
@dnplkndll dnplkndll force-pushed the 19.0-imp-flow_index_simplify branch from 387c14b to f936e0b Compare June 18, 2026 21:28
@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
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants