Odoo web client UI related addons
 
 
 
 
 
Go to file
Jairo Llopis 34ba66c687 [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
```
2019-02-19 21:28:05 +07:00
setup [ADD] setup.py 2019-02-15 10:21:52 +00:00
web_decimal_numpad_dot [FIX] web_decimal_numpad_dot: Restore keyboard navigation 2019-01-21 09:41:24 +00:00
web_dialog_size [UPD] Update web_dialog_size.pot 2018-12-07 16:59:27 +00:00
web_disable_export_group [IMP] web_disable_export_group: Tests 2018-11-06 12:06:15 +01:00
web_edit_user_filter [UPD] Update web_edit_user_filter.pot 2019-02-15 10:32:44 +00:00
web_environment_ribbon Update translation files 2018-11-26 18:01:45 +00:00
web_favicon Update translation files 2018-11-26 18:01:51 +00:00
web_ir_actions_act_multi [UPD] Update web_ir_actions_act_multi.pot 2019-01-21 12:00:52 +00:00
web_ir_actions_act_view_reload [UPD] Update web_ir_actions_act_view_reload.pot 2018-11-21 11:33:36 +00:00
web_listview_range_select [UPD] Update web_listview_range_select.pot 2018-10-24 09:45:05 +00:00
web_m2x_options [FIX] web_m2x_options: Compatibilize with web_advanced_search_x2x 2019-02-19 21:28:05 +07:00
web_notify [UPD] README.rst 2018-12-02 02:59:09 +00:00
web_responsive [IMP] Sticky chatter topbar 2019-02-14 17:52:49 +01:00
web_timeline Update translation files 2019-01-27 11:12:12 +00:00
web_widget_color web_widget_color: Fix issue #1139 2018-12-25 16:34:48 -05:00
web_widget_image_download Update translation files 2018-12-09 13:37:42 +00:00
web_widget_many2many_tags_multi_selection [MIG] web_widget_many2many_tags_multi_selection: Migration to 12.0. 2019-01-19 09:39:07 +01:00
web_widget_x2many_2d_matrix [UPD] Update web_widget_x2many_2d_matrix.pot 2019-02-19 14:19:28 +00:00
web_widget_x2many_2d_matrix_example [UPD] Update web_widget_x2many_2d_matrix_example.pot 2019-02-05 07:11:22 +00:00
.gitignore [MIG] Add metafiles 2018-09-27 02:40:55 +02:00
.travis.yml [MIG] .travis.yml: Upgrade to Postgres 9.6 2018-10-01 09:31:42 +02:00
README.md [MIG] Add metafiles 2018-09-27 02:40:55 +02:00

README.md

Runbot Status Build Status Coverage Status

Web addons for Odoo

This project aims to deal with modules related to the webclient of Odoo. You'll find modules that:

  • Add facilities to the UI
  • Add widgets
  • Ease the import/export features
  • Generally add clientside functionality