Odoo web client UI related addons
 
 
 
 
 
Go to file
Jairo Llopis 7b0f523f15 [FIX] web_m2x_options: Compatibilize with web_advanced_search_x2x
`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
```
2021-03-02 14:34:29 +05:30
.github/workflows [IMP] update dotfiles [ci skip] 2020-12-11 20:27:23 +01:00
setup [ADD] setup.py 2020-10-17 21:00:25 +00:00
web_dialog_size [UPD] README.rst 2021-02-04 08:49:29 +00:00
web_environment_ribbon [UPD] README.rst 2020-10-17 21:00:24 +00:00
web_m2x_options [FIX] web_m2x_options: Compatibilize with web_advanced_search_x2x 2021-03-02 14:34:29 +05:30
.copier-answers.yml [IMP] update dotfiles [ci skip] 2020-12-11 20:27:23 +01:00
.editorconfig Initialize 14.0 branch 2020-10-08 21:56:07 +02:00
.eslintrc.yml Initialize 14.0 branch 2020-10-08 21:56:07 +02:00
.flake8 Initialize 14.0 branch 2020-10-08 21:56:07 +02:00
.gitignore Initialize 14.0 branch 2020-10-08 21:56:07 +02:00
.isort.cfg Initialize 14.0 branch 2020-10-08 21:56:07 +02:00
.pre-commit-config.yaml [IMP] update dotfiles [ci skip] 2020-12-11 20:27:23 +01:00
.prettierrc.yml [IMP] update dotfiles [ci skip] 2020-11-01 22:39:13 +01:00
.pylintrc [IMP] update dotfiles [ci skip] 2020-11-01 22:39:13 +01:00
.pylintrc-mandatory [IMP] update dotfiles [ci skip] 2020-11-01 22:39:13 +01:00
.travis.yml [IMP] update dotfiles [ci skip] 2020-12-11 20:27:23 +01:00
CONTRIBUTING.md Initialize 14.0 branch 2020-10-08 21:56:07 +02:00
LICENSE Initialize 14.0 branch 2020-10-08 21:56:07 +02:00
README.md [UPD] addons table in README.md 2020-10-17 21:00:23 +00:00
oca_dependencies.txt Initialize 14.0 branch 2020-10-08 21:56:07 +02:00

README.md

Runbot Status Build Status codecov Translation Status

web

TODO: add repo description.

Available addons

addon version summary
web_dialog_size 14.0.1.0.0 A module that lets the user expand a dialog box to the full screen width.
web_environment_ribbon 14.0.1.0.0 Web Environment Ribbon

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to 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.