Commit Graph
10 Commits
Author SHA1 Message Date
Yannick Tivisse 7e008469e4 [IMP] base: Always load menuitem xmlids on templates
PURPOSE
=======

Currently we can choose to load the xmlid of a menuitem if web_tour is installed by setting the attribute `load_xmlid=True` on the view.

This is strange for 2 reasons:
- Searching all the ir.model.data on menuitems with load_xmlid=True to compute its xmlid, searching the related subtree on the returned structure of the method load_menus is quite complicated for the perfomance gain (if there is any perfomance gain to do it)
- This is not working in community in frontend, as only the root menuitems are loaded, thus it is the `load_menus_root` instead of the `load_menus` that is called. This issue prevent a tour step to be displayed correctly on community and enterprise on a menuitem.

SPECIFICATION
=============

Remove all the `load_xmlid` attributes and the related mechanism and move it into base to always load the xmlids for all the menuitems. It won't bee to heavy as the result is cached.

It's better the keep the current mechanism (Load the xmlids from ir.model.data and insert them into the tree) as we only make 1 search to the ir.model.data
2017-05-26 13:13:12 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Raphael Collet 6453e4eb23 [IMP] base: tighten ir.model.data access rights 2017-01-03 16:52:50 +01:00
fwi-odoo 9a0c20d803 [MOV][IMP] web_tour: reorganize files, clean imports, replace openerp tags and add license 2016-08-03 13:42:26 +02:00
Aaron Bohy 0a8ec45769 [IMP] web_tour: add button to consume all tours in debug_manager
Changes the api of the consume method on the web_tour.tour model so that it
now takes in argument an array of tour names instead of a single tour name.
2016-07-20 17:59:48 +02:00
Simon Lejeune d1cd293ece [FIX] web: session_info: introduce is_superuser key
This is done in order to enable the tour service only for the
superuser. Commit 6ef1644a7b changed the meaning of `is_admin`
to achieve this but broke the fact that some features of the debug
manager are available to admin and not only to the superuser. Anyway
a `is_admin` key should mean that the user is in the admin group.

We could have checked client side that the uid is equal to 1 but
adding a `is_superuser` key is more elegant and easier to grep.
Also fix the only occurence of a uid check in the weblcient.

This reverts commit 6ef1644a7b.
2016-07-20 14:16:01 +02:00
Christophe Simonis 9e9369acc0 [FIX] web_tour: still keep ir.http abstract 2016-07-04 14:39:49 +02:00
Aaron Bohy 8d61316486 [FIX] web_tour: load consumed tours in the frontend
Also deactivate unnecessary magic fields for the web_tour model.
2016-06-27 10:59:39 +02:00
Aaron Bohy 38bb6a7f81 [ADD] openerp,web,web_tour: new web_tour addon
Join work with ged
2016-06-16 14:59:40 +02:00