[CLEAN] res_config, res_users: cleaned call to imd.get_object() + code cleaning
- res_config: raise by default, no need to set the argument at True
- res_users: directly embedded get_user_groups_view code inside update_user_groups_view.
The try / except is still necessary, because when installing a new db, groups and users
are created before the user_groups_view view effectively exist. Due to some circular
references, the try / except is therefore necessary to install a new db.
[CLEAN] ir_qweb: simplified and cleaned QWebcontext implementation
- now using openerp.tools.safe_eval, instead of a custom eval with custom builtins
- removed undefined_handler, hardcoded to a lambda function that returns None for
a missing attribute
- cleaned code, removed now dead BUILTINS, removed commented code
- tools.safe_eval: added a parameter locals_builtins. This allows to copy the globals builtins in the locals. This modification is due to the fact that the locals always returns None, allowing to simplify templates. Otherwise we would have to test the existence of each variable before actually using it. However as the locals always return None for every key, the globals are never checked. Copying the builtins inside the local allows to have a complete locals, but slightly break the globals/locals separation.
[CLEAN] Misc
- setup.py: reverted website-al unnecessary change
- oe: reverted website-al unnecessary change
[DOC] renamed misc_qweb.rst file into ir_qweb.rst
bzr revid: tde@openerp.com-20140116184144-fd5h4a94we13mm72
- now using openerp.tools.safe_eval, instead of a custom eval with custom builtins
- removed undefined_handler, hardcoded to a lambda function that returns None for
a missing attribute
tools.safe_eval: added a parameter locals_builtins. This allows to copy the builtins
in the locals. This hack is due to the fact that the locals always returns None, allowing
to simplify templates. Otherwise we would have to test the existence of each variable
before actually using it.
However as the locals always return None for every key, the globals are never checked.
Copying the builtins inside the local allows to have a complete locals, but sligtly
break the globals/locals separation.
To be reviewed and approved.
bzr revid: tde@openerp.com-20140116182750-1rnw8iljt5a9gb4u
- res_config: raise by default, no need to set the argument at True
- res_users: directly embedded get_user_groups_view code inside update_user_groups_view.
The try / except is still necessary, because when installing a new db, groups and users
are created before the user_groups_view view effectively exist. Due to some circular
references, the try / except is therefore necessary to install a new db.
bzr revid: tde@openerp.com-20140116134056-nyiybx7zsr8rhkiv
The original query did two passes (SQL query and orm search). This was a problem due to the limit parameter where the second query could reduce the number of results to a smaller number than the asked limit.
This code reproduces the orm _search behaviour to execute only one SQL query mixing both the ACL clauses and the complexe name_search without degrading the performances (removing the limit in the first query would have).
bzr revid: mat@openerp.com-20140129132240-eamnzs37k0i65gpe
The original query did two passes (SQL query and orm search). This was a problem due to the limit parameter where the second query could reduce the number of results to a smaller number than the asked limit.
This code reproduces the orm _search behaviour to execute only one SQL query mixing both the ACL clauses and the complexe name_search without degrading the performances (removing the limit in the first query would have).
lp bug: https://launchpad.net/bugs/1203727 fixed
bzr revid: mat@openerp.com-20140129105548-dd6zmy9uc2cuowpq
For fresh databases, the signaling sequences in the
database stays at 1 until the installation of the
first module. If several workers are hit for this
database before the first module is installed,
this database registry will be loaded with a signaling
sequence of 1. Since was the default value, any
signal received by workers in this state was ignored
because they thought the registry was previously
not loaded.
Using None to indicate an sequence value
is more accurate and avoids this error
bzr revid: dle@openerp.com-20140116151157-3zlyrg48xqn2lkd0
encapsulatse the whole content inside a div. This means that html fields are
not editor-clean after being sanitized, because a div has been inserted as root
element. Removing this element allows to have snippets that can be dragged,
dropped, or to insert new snippets inside edited html content in html fields.
[IMP] tools: tests: mail: updated a test accordingly
bzr revid: tde@openerp.com-20140115142709-e4951b4nc06sfxf0
options before website: without frames, with safe attributes only.
We will have to find a way to use the strict mode when parsing incoming
emails, but not when sending or storing openerp content.
Currently the not strict mode is the default one, to avoid side-effects with
the website.
bzr revid: tde@openerp.com-20140115141319-g15zl1kqrp8sgoa3