Commit Graph

31 Commits

Author SHA1 Message Date
SEINLET Nicolas ded636eae1 [FIX] ir.rule: use rules at most once (#15843)
When a user belongs to multiple groups, and an ir.rule is applicable for some of
them, the rule is added multiple times in the domain. Just do it once. This
makes the query shorter and easier to debug.
2017-04-11 09:27:58 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Antony Lesuisse 8d04c66dc3 [IMP] cleanups, move tests, remove deprecated model instantiation
bzr revid: al@openerp.com-20140501184217-pgi1gzbdpysdybog
2014-05-01 20:42:17 +02:00
Raphael Collet 09be864f1d [IMP] replace all tests like 'registry.get(X)' by 'X in registry' where X is non static
bzr revid: rco@openerp.com-20130329140723-dnrl02saky570xg0
2013-03-29 15:07:23 +01:00
Cecile Tonglet 5f0070dcb6 [FIX] Remove unused imports and fix some imports that doesn't use the new namespace
bzr revid: cto@openerp.com-20121217143029-e9ki4ftwihq7pdme
2012-12-17 15:30:29 +01:00
Cecile Tonglet 5179507e22 [MERGE] Branch updated with trunk
bzr revid: cto@openerp.com-20121217125902-idtlh4ztyah17bdn
2012-12-17 13:59:02 +01:00
Vo Minh Thu 509a084e79 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121210152723-mv4dykfu6ip1991h
2012-12-10 16:27:23 +01:00
Thibault Delavallée 9e6c2805ab [REF] [IMP] expression.parse: refactored the main parsing loop, now using source and result stacks. Leaf elements are encapsulated into a specific object, allowing to delegate the join condition formation and aliases generation, as well as working_table management to them. The main parsing loop is now a loop taking a leaf, doing one action on it, and putting the result back to be analyzed or in the results. This allows to avoid having while loops inside a main while loop with some weird corner effects.
bzr revid: tde@openerp.com-20121204142650-gkhmjdeu5upi25kp
2012-12-04 15:26:50 +01:00
Fabien Pinckaers f6ff157ca5 [MERGE] active of ACLs, courtesy of akretion
bzr revid: fp@tinyerp.com-20120929114236-lru7p4ibuclbn5nr
2012-09-29 13:42:36 +02:00
Stephane Wirtel b3988436cb [REF] Replace the user id 1 by openerp.SUPERUSER_ID
bzr revid: stw@openerp.com-20120831135309-o4plzf5wp0kyuzgf
2012-08-31 15:53:09 +02:00
Alexis de Lattre c28e975ee7 [IMP] add an 'active' field on ir.model.access and ir.rule objects
bzr revid: alexis@via.ecp.fr-20120713173734-2m7496qzm82gko5j
2012-07-13 19:37:34 +02:00
Divyesh Makwana (Open ERP) 307a3bd1d3 [IMP] base : Improved the typos.
bzr revid: mdi@tinyerp.com-20120423112041-8zthyeuohc10qbaw
2012-04-23 16:50:41 +05:30
Olivier Dony 506b274977 [FIX] ir.rule: rules should be cascade-deleted along with their model
bzr revid: odo@openerp.com-20120227152135-y3hukyoow0q0dkif
2012-02-27 16:21:35 +01:00
Vo Minh Thu 8e2134981d [FIX] ir_rule: disallow ir_rules on ir_rule.
bzr revid: vmt@openerp.com-20120213110144-p5wrxccl39vrkwjy
2012-02-13 12:01:44 +01:00
Olivier Dony bdce754108 [IMP] cleanup deprecated method=True param for function fields
bzr revid: odo@openerp.com-20120104133027-oaydmngk2dfc22mk
2012-01-04 14:30:27 +01:00
Olivier Dony 6462c85f6c [IMP] start unifying the SUPERUSER_ID constant
bzr revid: odo@openerp.com-20110926090156-2smbh0ypzitauhmt
2011-09-26 11:01:56 +02:00
Vo Minh Thu b8a633e578 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110831091325-t5gfm57tmkr0fbee
2011-08-31 11:13:25 +02:00
Antony Lesuisse 52a84f0758 [FIX] revert previous commit ir_rule clear_cache
bzr revid: al@openerp.com-20110824172237-arzved9kk54u3hwu
2011-08-24 19:22:37 +02:00
Antony Lesuisse 93f9a0b0cd [IMP] ir_rule distribute clear_cache
bzr revid: al@openerp.com-20110824161918-dkexqhuc1mzpx9fs
2011-08-24 18:19:18 +02:00
Antony Lesuisse fd83621463 [MERGE] trunk
bzr revid: al@openerp.com-20110824160936-ej26wcvgvku3lkm7
2011-08-24 18:09:36 +02:00
Vo Minh Thu 51117db344 [REF] osv: replace isinstance(m,osv_memory) by m.is_transient().
bzr revid: vmt@openerp.com-20110816095755-2g5cblolcvchtewx
2011-08-16 11:57:55 +02:00
Antony Lesuisse b5bf0e8c1c [IMP] tools.cache cleanup, 15% speedup
bzr revid: al@openerp.com-20110608092515-gum2y4snkrcrpjqb
2011-06-08 11:25:15 +02:00
Antony Lesuisse 970b19b8b4 [IMP] new tools.cache cleaner, 10% speedup and more to come...
bzr revid: al@openerp.com-20110608030330-d0dsv2k6n0w3lyd5
2011-06-08 05:03:30 +02:00
Olivier Dony ce029f887e [FIX] ir.rule: must eval the rule domain as user, but browse the rule's groups as admin
bzr revid: odo@openerp.com-20110601135526-gk7zfiylnhlpvlod
2011-06-01 15:55:26 +02:00
Olivier Dony 6bbe8c7200 [IMP] ir.rule: local rules will be combined with OR within the same group
This makes it more intuitive: global rules are restrictions and
always combined with AND, while local rules are always combined
with OR, regardless if they are in the same group or different
groups. It makes it also easier to add rules in an existing group
to grant more rights.

bzr revid: odo@openerp.com-20110601130156-c0swo9w21zqun2gl
2011-06-01 15:01:56 +02:00
Olivier Dony e10e8073db [IMP] ir.rule,expression: merged improved rule computation mechanism, suggested by RCO
bzr revid: odo@openerp.com-20110531144318-vut0opufvqd5mu07
2011-05-31 16:43:18 +02:00
Olivier Dony 8ab9bac2b1 [IMP] ir.rule: added util methods for working with domain literals
bzr revid: odo@openerp.com-20110408140241-jotm4lsr1savrr3a
2011-04-08 16:02:41 +02:00
Olivier Dony 444df6affa [FIX] ir.rule,expression: domain expressions must be normalized before they can be safely combined
This adds a normalize_domain() method to osv.expression, which ir.rule calls
before combining expressions due to multiple rules or groups being applicable
to a certain user.
YAML tests are also added with a trivial unit test of normalize_domain() and
some additional tests for ir_rule in order to verify that unnormalized domains
are properly normalized before being combined by ir.rule.

bzr revid: odo@openerp.com-20110324111757-uwuoqvm3lxkipr08
2011-03-24 12:17:57 +01:00
Vo Minh Thu dd1943c45e [MERGE] merge 6.0 branch.
bzr revid: vmt@openerp.com-20110303133011-758wfx7zompu5ugq
2011-03-03 14:30:11 +01:00
Vo Minh Thu f8572e5c60 [IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies

bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00