reporting-engine icon indicating copy to clipboard operation
reporting-engine copied to clipboard

[17.0][FIX] report_xlsx: Preserve custom context by using context from report instead of user context

Open DucTruongKomit opened this issue 1 year ago • 1 comments

Steps to Reproduce:

  1. Try to set with_context when print the XLSX report. for example with_context(uom_id=1).
  2. 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.

DucTruongKomit avatar Oct 03 '24 04:10 DucTruongKomit

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.

DucTruongKomit avatar Oct 04 '24 09:10 DucTruongKomit

/ocabot merge patch

HviorForgeFlow avatar Jun 05 '25 12:06 HviorForgeFlow

This PR looks fantastic, let's merge it! Prepared branch 17.0-ocabot-merge-pr-933-by-HviorForgeFlow-bump-patch, awaiting test results.

OCA-git-bot avatar Jun 05 '25 12:06 OCA-git-bot

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.

OCA-git-bot avatar Jun 05 '25 12:06 OCA-git-bot

Congratulations, your PR was merged at 4eccf2ad077f4089d8310cd43458e7afae03eb96. Thanks a lot for contributing to OCA. ❤️

OCA-git-bot avatar Jun 05 '25 12:06 OCA-git-bot