Skip to content

[19.0][FIX] web_dialog_size: preserve standard Dialog sizes - #3669

Merged
OCA-git-bot merged 1 commit into
OCA:19.0from
Studio73:19.0-fix-web_dialog_size
Sep 16, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:19.0from
Studio73:19.0-fix-web_dialog_size

Conversation

@Raul-S73

Copy link
Copy Markdown

Changes proposed in this PR:

Preserve Odoo 19 standard Dialog sizes in web_dialog_size.

The affected consumer is the Odoo Enterprise mrp_workorder module (MRP II),
specifically its MrpWorksheetDialog used by MRP Shop Floor. Its XML uses
the standard Odoo 19 value size="fs".

The module currently replaces Dialog.props.size.validate with a validator
that only accepts sm, md, lg, xl and dialog_full_screen. Odoo 19
also defines fs and fullscreen as valid standard dialog sizes.

This causes an Owl validation error when the Enterprise worksheet is opened in
MRP Shop Floor with debug=assets:

Invalid props for component 'Dialog': 'size' is not valid

The fix is intentionally made in web_dialog_size, not in the Enterprise
mrp_workorder consumer. It keeps Odoo's original validator and adds the custom
dialog_full_screen value provided by this module. This preserves both the
standard Odoo 19 contract and the module's maximize/restore behavior.

How to test the changes

  1. Install or upgrade web_dialog_size in an Odoo 19 test database with the
    Enterprise mrp_workorder module enabled.
  2. Open MRP Shop Floor with ?debug=assets.
  3. Open a work order worksheet.
  4. Verify that the worksheet dialog opens without an Owl props validation
    error, keeps its full-width layout, displays the worksheet content and can
    be closed normally.
  5. Repeat the test without debug=assets.
  6. Verify the standard dialog sizes sm, md, lg, xl, fs and
    fullscreen, as well as the module-specific dialog_full_screen value
    through the maximize/restore control.
  7. Check standard dialogs such as form and select/create dialogs to ensure
    that their existing sizes remain valid.

Technical notes

The validator is shared by all Dialog instances. Removing size from the
Enterprise worksheet XML or changing fs to dialog_full_screen would hide
the symptom but would make the standard MRP dialog depend on the OCA-specific
value and could change its standard modal-fs styling. The fs value belongs
to Odoo 19's standard Dialog contract; mrp_workorder is the affected
consumer, not the source of the incompatibility.

The functional tests above have not been run against production. A static
JavaScript syntax check was completed locally.

Risks

The change affects the global Dialog prop validator, as the current module
already does. The implementation deliberately delegates to Odoo's original
validator so that future standard Odoo sizes are not duplicated and do not
become stale in this module.

@pedrobaeza pedrobaeza added this to the 19.0 milestone Sep 15, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

Testing in runboat, restoring the dialog to their previous size doesn't work (not sure if this was before this patch).

@Raul-S73

Copy link
Copy Markdown
Author

@pedrobaeza Thanks for testing.
The main purpose of this PR is to update the validation of the Dialog size values.
The maximize/restore logic hasn’t been changed, so the restore issue seems unrelated to this PR and should be handled separately.

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indeed the problem is already present in the module before this PR.

Let's merge it, but I would appreciate that you check the other problem, as the module is working half.

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 19.0-ocabot-merge-pr-3669-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 99793b3 into OCA:19.0 Sep 16, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

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.

4 participants