-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[18.0][MIG] web_form_banner: Migration to 18.0 #3308
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
Conversation
Refactor JS: - Switch to the ESM style - Change var to const/let - Remove unused parts (diff, el.dataset.wfbTriggerFields) Miscellaneous improvements: - list view optional - Switch archive box icon to banner Co-authored-by: Yoshi Tashiro <[email protected]>
- Add (partial) support for elements inside groups to be a target XPath without distorting the presentation - Remove obsolete bits
377f7fb
to
0ed0be9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to demonstrate the possibility of showing a message inside a group.
0ed0be9
to
fa33975
Compare
fa33975
to
e9944fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested functionnally.
really thanks
bf36f5d
to
1104c6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review. LGTM.
model_id = fields.Many2one("ir.model", ondelete="cascade", required=True) | ||
model_name = fields.Char(related="model_id.model", store=True, readonly=True) | ||
model_name = fields.Char( | ||
related="model_id.model", string="Model Name", store=True, readonly=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to add string
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the default label of this field is Model
and same with label of model_id
.
So, that causes the pre-commit issue and added string
to fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed an issue. The banner doesn't seem to reload when records are switched with previous/next button.
This issue seems to be present in the current 17.0 and 18.0 PRs. It's not the case with 16.0 (the banner reloads fine).
@AungKoKoLin1997 Can you please look into this?
e95b866
to
4bc329e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review and functional test. LGTM.
Should be used instead of <code | ||
>record</code> when your rule is triggered dynamically by an | ||
update to a trigger field. It doesn't include any values from complex fields | ||
(x2many/reference, etc). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(x2many/reference, etc). | |
(one2many/reference, etc). |
- Fix not updating banner when pager is update or duplicate or create - Fix presentation of help in web form banner rule
4bc329e
to
8ec2c91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functioanl review: it works as expected
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 0762d94. Thanks a lot for contributing to OCA. ❤️ |
Based on #3305
The module adds configurable banners for backend form views. Define rules per model
(and optionally per view) to show context-aware alerts with a chosen severity (info/warning/danger).
Messages can be plain text with ${placeholders} or fully custom HTML; visibility,
severity, and values are computed server-side via a safe Python expression.
Banners are injected just before or after a target node (default: //sheet) and refresh
on form load/save/reload.
@qrtl QT5747