mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
a695d343551a11cb1b448b52b098361635247424
`web_m2x_options` is supposed to render fields in the context of a form or tree view, where domains can safely be applied because there's a main record that includes a context. However, when installing along with `web_advanced_search_x2x`, they produce an incompatibility when a x2x field's domain is defined and depends on the current record's context, because a search view has no notion of a *current record*. The fix is simple: try to do as usual, and if it fails, try without the field's domain. Without this patch, an exception like this would be raised, i.e. when both addons are installed and you are trying to search project tasks by stage: ``` Error: NameError: name 'project_id' is not defined http://localhost/web/static/lib/py.js/lib/py.js:370# Traceback:# Changes to be committed: PY_ensurepy@http://localhost/web/static/lib/py.js/lib/py.js:370:19# modified: static/src/js/form.js py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1340:20# py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1397:35 py.evaluate@http://localhost/web/static/lib/py.js/lib/py.js:1409:34 py.eval@http://localhost/web/static/lib/py.js/lib/py.js:1453:16 eval_domains/<@http://localhost/web/static/src/js/framework/pyeval.js:869:39 _.forEach@http://localhost/web/static/lib/underscore/underscore.js:145:9 _.mixin/</_.prototype[name]@http://localhost/web/static/lib/underscore/underscore.js:1484:29 eval_domains@http://localhost/web/static/src/js/framework/pyeval.js:860:5 eval_domains/<@http://localhost/web/static/src/js/framework/pyeval.js:873:39 _.forEach@http://localhost/web/static/lib/underscore/underscore.js:145:9 _.mixin/</_.prototype[name]@http://localhost/web/static/lib/underscore/underscore.js:1484:29 eval_domains@http://localhost/web/static/src/js/framework/pyeval.js:860:5 eval_domains/<@http://localhost/web/static/src/js/framework/pyeval.js:873:39 _.forEach@http://localhost/web/static/lib/underscore/underscore.js:145:9 _.mixin/</_.prototype[name]@http://localhost/web/static/lib/underscore/underscore.js:1484:29 eval_domains@http://localhost/web/static/src/js/framework/pyeval.js:860:5 pyeval@http://localhost/web/static/src/js/framework/pyeval.js:977:16 eval_arg@http://localhost/web/static/src/js/framework/pyeval.js:988:16 ensure_evaluated@http://localhost/web/static/src/js/framework/pyeval.js:1011:21 call@http://localhost/web/static/src/js/framework/data_model.js:56:9 name_search@http://localhost/web/static/src/js/framework/data.js:537:16 get_search_result@http://localhost/web_m2x_options/static/src/js/form.js:130:50 OdooClass.extend/Class.include/</prototype[name]</<@http://localhost/web/static/src/js/framework/class.js:122:35 source@http://localhost/web/static/src/js/views/form_relational_widgets.js:271:17 _search@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:6823:3 $.widget/</proxiedPrototype[prop]</<@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:415:19 search@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:6815:10 $.widget/</proxiedPrototype[prop]</<@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:415:19 $.widget.bridge/$.fn[name]/<@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:508:19 each@http://localhost/web/static/lib/jquery/jquery.js:383:49 each@http://localhost/web/static/lib/jquery/jquery.js:136:24 $.widget.bridge/$.fn[name]@http://localhost/web/static/lib/jquery.ui/jquery-ui.js:494:4 render_editable/<@http://localhost/web/static/src/js/views/form_relational_widgets.js:189:21 dispatch@http://localhost/web/static/lib/jquery/jquery.js:4640:50 add/elemData.handle@http://localhost/web/static/lib/jquery/jquery.js:4309:41 ```
web
TODO: add repo description.
Available addons
| addon | version | maintainers | summary |
|---|---|---|---|
| web_calendar_slot_duration | 17.0.1.0.0 | ![]() |
Customizable calendar slot durations |
| web_environment_ribbon | 17.0.1.0.1 | Web Environment Ribbon | |
| web_favicon | 17.0.1.0.2 | Allows to set a custom shortcut icon (aka favicon) | |
| web_group_expand | 17.0.1.0.0 | Group Expand Buttons | |
| web_no_bubble | 17.0.1.0.0 | Remove the bubbles from the web interface | |
| web_refresher | 17.0.1.1.0 | Web Refresher | |
| web_remember_tree_column_width | 17.0.1.0.0 | ![]() |
Remember the tree columns' widths across sessions. |
| web_responsive | 17.0.1.1.0 | ![]() |
Responsive web client, community-supported |
| web_theme_classic | 17.0.1.0.0 | ![]() |
Contrasted style on fields to improve the UI. |
| web_tree_dynamic_colored_field | 17.0.1.0.0 | Allows you to dynamically color fields on tree views | |
| web_tree_many2one_clickable | 17.0.1.0.0 | Open the linked resource when clicking on their name | |
| web_widget_bokeh_chart | 17.0.1.0.0 | ![]() |
This widget allows to display charts using Bokeh library. |
| web_widget_domain_editor_dialog | 17.0.1.0.0 | Recovers the Domain Editor Dialog functionality | |
| web_widget_open_tab | 17.0.1.0.0 | Allow to open record from trees on new tab from tree views | |
| web_widget_plotly_chart | 17.0.1.0.0 | ![]() |
Allow to draw plotly charts. |
| web_widget_x2many_2d_matrix | 17.0.1.0.0 | ![]() |
Show list fields as a matrix |
Licenses
This repository is licensed under AGPL-3.0.
However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA)
policy. Consult each module's __manifest__.py file, which contains a license key
that explains its license.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Description
Languages
JavaScript
69.3%
HTML
24.2%
Python
3.9%
SCSS
1.8%
CSS
0.8%










