Conversation
|
Hi @sbidoul, |
aad1fc1 to
7637e7d
Compare
AnizR
left a comment
There was a problem hiding this comment.
Code LGTM
Tested on runboat, seems to work fine.
I realised that using browser's back arrow doesn't work when being on mis report instances but this is already the case on 19.0's branch.
| if (this.props.state) { | ||
| this.env.config.state = this.props.state; |
There was a problem hiding this comment.
Does this will have impact on other model's forms?
There was a problem hiding this comment.
I miss your comment yesterday, good point, you are right this will apply on any forms 🤔... we should restricted it to mis.report.instance or extend the FormController and use the new form view. I'd like to try the second approach
There was a problem hiding this comment.
I've give a try by extending FormController but it seems odoo do not take care of js_class while coming back from drilldown instanciate a FormController... so I rollback for a simplest version
When navigating away from a MIS report via drilldown links and returning using the breadcrumb, active search filters and pivot date were lost. This commit preserves the report widget state across view navigation: - Register `useSetupAction` in `MisReportWidget` to export search model state and pivot date when leaving the controller. - Forward `props.state` to `env.config.state` in `FormController` so that restored controller state is accessible during component `willStart`. - Hydrate `searchModel` and `pivot_date` upon view restoration. - Add JS tour `mis_report_drilldown_tour` and HttpCase test `TestMisReportWidgetTour` to validate filter preservation end-to-end. Assisted-by: Gemini 3.6 Flash
7637e7d to
f216298
Compare
|
I'm closing this PR as changed is included in #827 |
When navigating away from a MIS report via drilldown links and returning using the breadcrumb, active search filters and pivot date were lost.
This commit preserves the report widget state across view navigation:
useSetupActioninMisReportWidgetto export search model state and pivot date when leaving the controller.props.statetoenv.config.stateinFormControllerso that restored controller state is accessible during componentwillStart.searchModelandpivot_dateupon view restoration.mis_report_drilldown_tourand HttpCase testTestMisReportWidgetTourto validate filter preservation end-to-end.