-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[MIG] web_advanced_search: Migration to 16.0 #2357
Conversation
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.
Runboat seems broken so I had to do a local install of your version of the module but it does not seem to work for me. The Add advanced filter
option is missing from the search filter:
I'm also getting 'missing dependency' errors in the web developer console about this module:
Debug:
Object { "@web_advanced_search/js/legacy/CustomFilterItem.esm": {…}, "@web_advanced_search/js/legacy/FilterMenu.esm": {…}, "@web_advanced_search/js/owl/CustomFilterItem.esm": {…}, "@web_advanced_search/js/owl/FilterMenu.esm": {…} }
"@web_advanced_search/js/legacy/CustomFilterItem.esm": Object { dependencies: (3) […], dependents: [], name: "@web_advanced_search/js/legacy/CustomFilterItem.esm", … }
dependencies: Array(3) [ "web.CustomFilterItem", "@web_advanced_search/js/RecordPicker.esm", "@web/core/utils/patch" ]
dependents: Array []
length: 0
<prototype>: Array []
missing: Array [ "@web_advanced_search/js/RecordPicker.esm" ]
0: "@web_advanced_search/js/RecordPicker.esm"
length: 1
<prototype>: Array []
name: "@web_advanced_search/js/legacy/CustomFilterItem.esm"
<prototype>: Object { … }
"@web_advanced_search/js/legacy/FilterMenu.esm": Object { dependencies: (3) […], dependents: [], name: "@web_advanced_search/js/legacy/FilterMenu.esm", … }
dependencies: Array(3) [ "@web_advanced_search/js/legacy/AdvancedFilterItem.esm", "web.FilterMenu", "@web/core/utils/patch" ]
dependents: Array []
missing: Array [ "@web_advanced_search/js/legacy/AdvancedFilterItem.esm" ]
name: "@web_advanced_search/js/legacy/FilterMenu.esm"
<prototype>: Object { … }
"@web_advanced_search/js/owl/CustomFilterItem.esm": Object { dependencies: (3) […], dependents: [], name: "@web_advanced_search/js/owl/CustomFilterItem.esm", … }
dependencies: Array(3) [ "@web/search/filter_menu/custom_filter_item", "@web_advanced_search/js/RecordPicker.esm", "@web/core/utils/patch" ]
dependents: Array []
missing: Array [ "@web_advanced_search/js/RecordPicker.esm" ]
name: "@web_advanced_search/js/owl/CustomFilterItem.esm"
<prototype>: Object { … }
"@web_advanced_search/js/owl/FilterMenu.esm": Object { dependencies: (3) […], dependents: [], name: "@web_advanced_search/js/owl/FilterMenu.esm", … }
dependencies: Array(3) [ "@web_advanced_search/js/owl/AdvancedFilterItem.esm", "@web/search/filter_menu/filter_menu", "@web/core/utils/patch" ]
dependents: Array []
missing: Array [ "@web_advanced_search/js/owl/AdvancedFilterItem.esm" ]
name: "@web_advanced_search/js/owl/FilterMenu.esm"
<prototype>: Object { … }
<prototype>: Object { … }
boot.js:355
Did this module work for you when you were porting it?
a213bda
to
28f8ea5
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.
review functional LGTM
@StefanRijnhart Can you verify if everything is fine now? |
review functional LGTM |
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.
The many2one custom filter is equal to doesn't work:
Full traceback:
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
at handleError (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:16294:35) (/web/static/lib/owl/owl.js:124)
at owl.App.handleError (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:21844:20) (/web/static/lib/owl/owl.js:5674)
at Fiber._render (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:17794:30) (/web/static/lib/owl/owl.js:1624)
at Fiber.render (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:17783:18) (/web/static/lib/owl/owl.js:1613)
at ComponentNode.updateAndRender (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18607:19) (/web/static/lib/owl/owl.js:2437)
Caused by: TypeError: Cannot read properties of undefined (reading 'detail')
at CustomFilterItem.onRelationalChanged (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_backend.js:175070:16) (/web_advanced_search/static/src/js/owl/CustomFilterItem.esm.js:75)
at CustomFilterItem.slot2 (eval at compile (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:21606:16), <anonymous>:136:52) (/web/static/lib/owl/owl.js:5436)
at callSlot (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:19053:37) (/web/static/lib/owl/owl.js:2883)
at Dropdown.template (eval at compile (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:21606:16), <anonymous>:33:18) (/web/static/lib/owl/owl.js:5436)
at Fiber._render (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:17791:38) (/web/static/lib/owl/owl.js:1621)
at Fiber.render (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:17783:18) (/web/static/lib/owl/owl.js:1613)
at ComponentNode.updateAndRender (http://oca-web-16-0-pr2357-28f8ea5b62bd.runboat.odoo-community.org/web/assets/debug/web.assets_common.js:18607:19) (/web/static/lib/owl/owl.js:2437)
27189d1
to
cc89e88
Compare
The error is fixed, but the filter's dropdown will be closed after a selection. Could anyone suggest what needs to be changed to prevent this? This does not work anymore /**
* Stop propagation of the autocompleteselect event.
* Otherwise, the filter's dropdown will be closed after a selection.
*
* @override to stop propagating autocompleteselect event
*/
start: function () {
this._super(...arguments);
this.$input.on("autocompleteselect", (event) => event.stopPropagation());
}, |
cc89e88
to
da85bfb
Compare
I figured out after long investigation why the Filter menu was closed after selecting a value in the RecordPicker Component. patch(Dropdown.prototype, "dropdown", {
onWindowClicked(ev) {
// This patch is created to prevent the closing of the Filter menu
// when a selection is made in the RecordPicker
if (
$(ev.target.closest("ul.dropdown-menu")).attr("id") !== undefined &&
$(ev.target.closest("ul.dropdown-menu")).attr("id") ===
$("body > ul.dropdown-menu").attr("id")
) {
return;
}
this._super(ev);
},
}); But for now the solution is working fine! |
But that's something of this module, or something of the domain editor widget of Odoo core? |
I think this is something that is fixed by this odoo/odoo#109238 |
and replace company icon [FIX] js syntax [FIX] move our patched equals operator to top of list [ADD] support selecting domains on x2x fields [FIX] eval search view's domain [IMP] UI fixes [IMP] reflect recent additions in README.rst [FIX] typos [ADD] translations [FIX] correct js reference [RFR] rebuild our domains in a different way this solves timing problems
I could not find the project on Transifex...
Change fitro by dominio
- Use the new domain widget. - Use modules system.
* Make it good-looking * Update known issues * Fix templates. * Make other operators work again
[MIG] web_advanced_search_x2x: Migrated to 10.0 FIX review Remarks
* Ensure that domain field can be evaluated before creating x2x field * Fixed navigation error after using x2x advanced search
[FIX] StopPropagation when clicking in domain selector.
@StefanRijnhart is it ok for you? |
/ocabot migration web_advanced_search |
@StefanRijnhart Can you update your review please to go further ? Thanks |
Hi @rven , I detected an error with the Odoo Enterprise Timesheets application. Full traceback:
Could you review this before merging? |
@vib-adhoc the compatibility scope for OCA modules is limited to Odoo core (CE) and optionally other OCA modules. Enterprise or other private modules compatibility should be non blocking IMO. |
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.
Functional review.
LGTM, Thank you @hbrunn @StefanRijnhart and all maintainers.
It turns out that Odoo 16 is still using the This PR is removing legacy widget support (which was included for v15). Thus, that app breaks. This can be considered a regression, because that support was there in the previous version. Happens in the timesheet app, but chances are that it happens on any other custom apps that use legacy widgets too. A good solution, to avoid supporting those legacy widgets, is to disable the feature on legacy contexts. A better one would be to not remove the files and update them instead. |
Ok, I didn't know why those files were in there, I'll have a closer look at them |
989a042
to
dba9530
Compare
Hi @vib-adhoc, I solved the error with the Odoo Enterprise Timesheets application. I also verified it already. Can you re-test this? |
dba9530
to
c77f504
Compare
Hi, @rven it works fine! |
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 it on Timesheets too, and elsewhere. Thanks!
/ocabot merge patch
I just want to say thank you to everyone involved for how you carried what I once started through all the Odoo versions so far, and making it better on the way 🍰 |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 1ce5e9d. Thanks a lot for contributing to OCA. ❤️ |
Hi everyone!! I notice an error selecting many2one fields in the Custom filter. @rven @chienandalu @pedrobaeza Odoo.-.Customers.webm |
@augusto-weiss please check #2513 if this is ok for you? |
Hi @rven! Works as expected!! Thanks a lot! i will comment on PR |
No description provided.