Monday, October 30, 2017
1 change · master
Code cleanup and technical improvements
This change updates the app switcher code in Enterprise and Studio to follow newer JavaScript coding guidelines. It is an internal cleanup intended to make the code easier to maintain, with no expected change to day-to-day user behavior.
Original PR description
see https://github.com/odoo/odoo/wiki/Javascript-coding-guidelines.
Files changed:
- _web_enterprise/static/src/js/app_switcher.js_
- _web_studio/static/src/js/app_switcher.js_
Some exceptions to the new coding guidelines:
- _on_attach_callback_ and _on_detach_callback_
- fields of objects that are used by many modules
(e.g. 'MenuItem' with 'menu_id')
Note:
- this commit relies on a newly added function in community:
_/odoo/addons/web/static/src/js/utility.js_
new function: **traversePath**
- this function is exactly similar to the old 'visit' in
_web_enterprise/static/src/js/app_switcher.js_
see https://github.com/odoo-dev/odoo/commit/b6dfd5726e8b68024c8448a61d788cc586b70a54