[17.0][FIX] report_xlsx: Preserve custom context by using context from report instead of user context
Steps to Reproduce:
- Try to set with_context when print the XLSX report. for example with_context(uom_id=1).
- when print the report the context uom_id never show up.
Observer Behavior Currently, when trying to send the context through the xlsx report action, the context is always replaced by the default context of Odoo. Hence, the report cannot render data dynamically based on the context when calling report action.
Expected Behavior The context of action report should be taken into account instead of context(this will include env.services.user.context) of env.services.user.context.
The code LGTM.
I think you should adjust the commit msg to include the module name. Maybe "[FIX] report_xlsx: preserve custom context by using context from report instead of user context"
Thank you. I did the update.
/ocabot merge patch
This PR looks fantastic, let's merge it! Prepared branch 17.0-ocabot-merge-pr-933-by-HviorForgeFlow-bump-patch, awaiting test results.
It looks like something changed on 17.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 17.0-ocabot-merge-pr-933-by-HviorForgeFlow-bump-patch, awaiting test results.
Congratulations, your PR was merged at 4eccf2ad077f4089d8310cd43458e7afae03eb96. Thanks a lot for contributing to OCA. ❤️