[19.0][MIG] ddmrp_report_part_flow_index: Migration to 19.0 - #618
[19.0][MIG] ddmrp_report_part_flow_index: Migration to 19.0#618dnplkndll wants to merge 22 commits into
Conversation
| 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 ( |
There was a problem hiding this comment.
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:
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
No problem, not urgent, just checking the status
|
/ocabot migration ddmrp_report_part_flow_index |
223ba48 to
4e15866
Compare
0d3695b to
2efa264
Compare
eb094dc to
8376350
Compare
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/
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>
8376350 to
6e0a481
Compare
Port of
ddmrp_report_part_flow_index(DDMRP Report Part Flow Index) from 18.0 to 19.0.