T2911 Migrate website_crm_request#337
Conversation
…g reimplementation of form template to finish migration
…ot applied, need to figure out why
…d to validate creation of crm.request
There was a problem hiding this comment.
Code Review
This pull request upgrades the website_crm_request module to Odoo 18.0, migrating the JS code to the modern @odoo-module format and introducing a new snippet template for the CRM request form. The review feedback highlights a few issues in the new template that need to be addressed: placeholder/debug text in the template name, a placeholder redirect URL (/blblblbl), and an inconsistency where the email_from field is missing the required="1" attribute despite being marked as required in the JS registry.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the website_crm_request module to Odoo 18, updating the manifest, dependencies, and converting legacy JavaScript assets to ES modules. However, several critical issues need to be addressed: the formbuilder_whitelist function in form_data.xml is deprecated in Odoo 18 and will cause installation errors, and the ES module import for formEditorRegistry must be updated to a named import to prevent runtime errors. Additionally, minor formatting consistency improvements are suggested for the manifest file.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Confidence Score: 5/5Clean migration change with no functional regressions — safe to merge once the stray blank line is cleaned up. All changes are mechanical modernisation: the dependency swap, asset registration move, and ESM conversion are straightforward and align with standard Odoo 18 patterns. The formbuilder_whitelist and formFields entries are now in sync after removing categ_id. The only thing introduced by this PR that wasn't in the original code is a stray blank line in the ESM file. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant WebsiteEditor as Website Editor (assets_editor)
participant FormEditorRegistry as FormEditorRegistry<br/>(@website/js/form_editor_registry)
participant OdooServer as Odoo Server (ir.model)
Browser->>WebsiteEditor: Load editor assets
WebsiteEditor->>FormEditorRegistry: import FormEditorRegistry
FormEditorRegistry-->>WebsiteEditor: registry instance
WebsiteEditor->>FormEditorRegistry: "add("crm_request", { formFields: [...] })"
Browser->>OdooServer: form_data.xml loaded on install
OdooServer->>OdooServer: "Set website_form_key="crm_request" on crm.claim ir.model"
OdooServer->>OdooServer: formbuilder_whitelist(crm.claim, [name, email_from, partner_phone, description])
Browser->>OdooServer: Website form submission (POST)
OdooServer->>OdooServer: Validate fields against whitelist
OdooServer-->>Browser: 200 OK / crm.claim record created
Reviews (3): Last reviewed commit: "[T2911] REFACTOR : remove unused field" | Re-trigger Greptile |
ecino
left a comment
There was a problem hiding this comment.
Good for me, you can just remove the categ_id field from the whitelist.
Goal
The goal of this PR is to migrate the module
website_crm_requestto version 18.Technical Aspects
website_formwithwebsitewebsite.assets_editorMisc
.jsfile to.esm.jsfor eslint compatibility