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

[16.0][FIX] web_dialog_size: Fixed the issue that form view is changing its… #3066

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

baguenth
Copy link
Member

@baguenth baguenth commented Jan 21, 2025

The size of a form is inconsistent when using web_dialog_size. It changes when changing any field in the form (which leads to rerendering the form).

Affected versions: 16.0

Steps to reproduce the behavior:

Scenario 1:

  1. Set the system parameter "web_dialog_size.default_maximize" to true, so the form will open in full screen by default
  2. Open a form view --> It will open in full screen
  3. Change any field, so an onchange event is fired and the form gets re-rendered --> The form is no longer showing in full screen

Scenario 2:

  1. Open a form view
  2. Manually maximise it so it shows in full screen
  3. Change any field, so an onchange event is fired and the form gets re-rendered --> The form is no longer showing in full screen

Expected behavior

The form should keep it's current size when changing any field values

@pedrobaeza @chienandalu Kindly asking for a review :)

@baguenth baguenth changed the title [FIX] web_dialog_size: Fixed the issue that form view is changing its… [16.0][FIX] web_dialog_size: Fixed the issue that form view is changing its… Jan 21, 2025
@pedrobaeza pedrobaeza added this to the 16.0 milestone Jan 22, 2025
@pedrobaeza
Copy link
Member

I'm not able to reproduce the scenario you are mentioning in the issue. Can you please put exact steps to reproduce it?

And please don't open an issue and then the PR. You can put the issue text here in the PR and close the issue.

@baguenth
Copy link
Member Author

baguenth commented Jan 22, 2025

@pedrobaeza

First of all: Sorry, I thought creating an issue before raising a pull request is the official workflow.

I have recorded the issue which I can easily reproduce in the web-runboat.

Precondition for the video: I have modified the sale order line to open a form instead of inline edit.

web-dialog-size-issue.mov

You can try yourself here: http://oca-web-16-0-913230bed5f6.runboat.odoo-community.org/web?#cids=1&menu_id=186&action=305&model=sale.order&view_type=form

Steps:

  1. Create a new sale order line --> Form will open
  2. Expand the form to full screen
  3. Fill the Description field
  4. Click somewhere outside of the description field --> Form will change it's size

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

I tested in your runbot and looks like v17 has an issue in that conditions as well. You didn't mention that you modified that sales order view to raise the form dialog for the order lines.

@CarlosRoca13 can you take a look on the fix?

Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

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

The changes made make sense and I’ve tested it as well, and it resolves the issue. From my side, it’s good to go 😄

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

👍

@CarlosRoca13
Copy link
Contributor

/ocabot merge patch

It will not be necessary on 17.0 so don't need to port the changes. Thanks 4 the patch 😄

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-3066-by-CarlosRoca13-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 6c7bf98 into OCA:16.0 Jan 22, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@baguenth baguenth deleted the web-dialog-size-fix branch January 22, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants