Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX]XLSX action Context should be taken instead of replacing whole the context by default context of Odoo #933

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

DucTruongKomit
Copy link

@DucTruongKomit DucTruongKomit commented Oct 3, 2024

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.

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.

@pedrobaeza pedrobaeza changed the title [FIX]Using XLSX Action should be taken instead of replacing whole the… [17.0][FIX]Using XLSX Action should be taken instead of replacing whole the… Oct 3, 2024
@pedrobaeza pedrobaeza added this to the 17.0 milestone Oct 3, 2024
@DucTruongKomit DucTruongKomit changed the title [17.0][FIX]Using XLSX Action should be taken instead of replacing whole the… [FIX]Using XLSX Action should be taken instead of replacing whole the… Oct 4, 2024
@DucTruongKomit DucTruongKomit changed the title [FIX]Using XLSX Action should be taken instead of replacing whole the… [17.0][FIX]Using XLSX Action should be taken instead of replacing whole the… Oct 4, 2024
Copy link

@cuongnmtm cuongnmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

@DucTruongKomit DucTruongKomit changed the title [17.0][FIX]Using XLSX Action should be taken instead of replacing whole the… [FIX] report_xlsx: preserve custom context by using context from report instead of user context Oct 4, 2024
@DucTruongKomit DucTruongKomit changed the title [FIX] report_xlsx: preserve custom context by using context from report instead of user context [17.0][FIX]Using XLSX Action should be taken context instead of replacing whole the context by default context of Odoo Oct 4, 2024
@DucTruongKomit DucTruongKomit changed the title [17.0][FIX]Using XLSX Action should be taken context instead of replacing whole the context by default context of Odoo [17.0][FIX]Using XLSX action Context should be taken instead of replacing whole the context by default context of Odoo Oct 4, 2024
@DucTruongKomit DucTruongKomit changed the title [17.0][FIX]Using XLSX action Context should be taken instead of replacing whole the context by default context of Odoo [17.0][FIX]XLSX action Context should be taken instead of replacing whole the context by default context of Odoo Oct 4, 2024
@DucTruongKomit DucTruongKomit force-pushed the 17.0-fix_losing_context_xlsx_printing branch from 6ebff58 to 063742f Compare October 4, 2024 09:48
@DucTruongKomit
Copy link
Author

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.

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.

3 participants