[19.0][FIX] web_dialog_size: preserve standard Dialog sizes - #3669
Conversation
|
Testing in runboat, restoring the dialog to their previous size doesn't work (not sure if this was before this patch). |
|
@pedrobaeza Thanks for testing. |
pedrobaeza
left a comment
There was a problem hiding this comment.
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
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 7bff600. Thanks a lot for contributing to OCA. ❤️ |
Changes proposed in this PR:
Preserve Odoo 19 standard
Dialogsizes inweb_dialog_size.The affected consumer is the Odoo Enterprise
mrp_workordermodule (MRP II),specifically its
MrpWorksheetDialogused by MRP Shop Floor. Its XML usesthe standard Odoo 19 value
size="fs".The module currently replaces
Dialog.props.size.validatewith a validatorthat only accepts
sm,md,lg,xlanddialog_full_screen. Odoo 19also defines
fsandfullscreenas valid standard dialog sizes.This causes an Owl validation error when the Enterprise worksheet is opened in
MRP Shop Floor with
debug=assets:The fix is intentionally made in
web_dialog_size, not in the Enterprisemrp_workorderconsumer. It keeps Odoo's original validator and adds the customdialog_full_screenvalue provided by this module. This preserves both thestandard Odoo 19 contract and the module's maximize/restore behavior.
How to test the changes
web_dialog_sizein an Odoo 19 test database with theEnterprise
mrp_workordermodule enabled.?debug=assets.error, keeps its full-width layout, displays the worksheet content and can
be closed normally.
debug=assets.sm,md,lg,xl,fsandfullscreen, as well as the module-specificdialog_full_screenvaluethrough the maximize/restore control.
that their existing sizes remain valid.
Technical notes
The validator is shared by all
Dialoginstances. Removingsizefrom theEnterprise worksheet XML or changing
fstodialog_full_screenwould hidethe symptom but would make the standard MRP dialog depend on the OCA-specific
value and could change its standard
modal-fsstyling. Thefsvalue belongsto Odoo 19's standard
Dialogcontract;mrp_workorderis the affectedconsumer, 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
Dialogprop validator, as the current modulealready 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.