Commit Graph

483 Commits

Author SHA1 Message Date
Vo Minh Thu c99c4091ce [REM] Deleted .apidoc lines.
They were probably used by some tools. How sad.

bzr revid: vmt@openerp.com-20130212142410-zqdjd8jw3gtvxab0
2013-02-12 15:24:10 +01:00
Xavier Morel 4a9d82621e [IMP] don't log from import when converting psycopg exceptions to output messages
add conversion for unique constraints, test behavior on unique constraint failure

bzr revid: xmo@openerp.com-20130211143647-l16ssw9z73stbgyc
2013-02-11 15:36:47 +01:00
Xavier ALT 4db48cc102 [MERGE] BUG 1082003: orm: _rec_name should be checked on _all_columns not _columns
bzr revid: xal@openerp.com-20130211092411-3eeo2ann5jnttliq
2013-02-11 10:24:11 +01:00
Christophe Simonis c10d28e4e6 [FIX] orm: SUPERUSER is not restricted by groups on fields
bzr revid: chs@openerp.com-20130116164025-qns65cb78p8p57m1
2013-01-16 17:40:25 +01:00
Fabien Pinckaers aa86fb2bc1 [IMP] custom model allowed
bzr revid: fp@tinyerp.com-20121227172825-lny2fobb5g89edca
2012-12-27 18:28:25 +01:00
Raphael Collet c9bc74c5c9 [MERGE] lp:~therp-nl/openobject-server/ronald@therp.nl_trunk_lp1009014_new (improve transient models vacuum)
bzr revid: rco@openerp.com-20121221153122-q6j8vatd2xfmqr3n
2012-12-21 16:31:22 +01:00
Raphael Collet 8ead65d82a [IMP] orm: fix vacuum of transient model
bzr revid: rco@openerp.com-20121221152914-qs1s9h1zwnyzft1m
2012-12-21 16:29:14 +01:00
Raphael Collet e7ce4a4529 [MERGE] from trunk
bzr revid: rco@openerp.com-20121221134259-scc92nby1dn91pe8
2012-12-21 14:42:59 +01:00
Thibault Delavallée 919c0d1152 [REV] Reverted last improvement, because this was messing with the menus.
bzr revid: tde@openerp.com-20121221095934-ocbnwz2zvbdbmfug
2012-12-21 10:59:34 +01:00
Thibault Delavallée e2728306b3 [IMP] OROM: order_spec is overidden by self._order only if None (aka, not specified at all). False or void order_spec allows to avoid having any order_by clause. This is used now in needaction, to speedup the search.
bzr revid: tde@openerp.com-20121220205102-lx9ftf3l8qg0xqcu
2012-12-20 21:51:02 +01:00
Thibault Delavallée 36e5b6e88e [FIX] _search not uniquifies the results, because when using _auto_join we could have duplicates in the 'left part' of the result, i.e. a lead with several unread messages. This is done using a custom method instead of a set, because sets are unordered.
bzr revid: tde@openerp.com-20121220141842-or3bigz11qkb13qn
2012-12-20 15:18:42 +01:00
Raphael Collet 95b41b40e9 [IMP] register_hook: improve a bit the code
bzr revid: rco@openerp.com-20121219132138-npf12n5l5ug6ujvx
2012-12-19 14:21:38 +01:00
Raphael Collet fd5dee2267 [MERGE] from trunk
bzr revid: rco@openerp.com-20121219130750-3ljqo3dyz05zww08
2012-12-19 14:07:50 +01:00
Olivier Dony 9f77d2e2f4 [FIX] orm,registry: properly check m2o FKs during model update + fix some models `auto_init`ed multiple times
The case where no constraint existed at all was not working,
and after fixing it, the ORM started to re-create the same
constraints multiple times for some modules. This was for
models that are split within a module (such as res.users in
base, which is made of several small classes): all the
partial models were going through _auto_init instead
of only the final one - doing useless extra work.
      
Unfortunately establishing the FK happens before the
XML data files are loaded, so a number of FK and
NOT NULL constraints failed to apply due to missing
tables/records. base.sql had to be extended a bit
to cover these cases in a minimalist fashion

bzr revid: odo@openerp.com-20121217214645-av9n003yzterhujw
2012-12-17 22:46:45 +01:00
Raphael Collet 3040114651 [MERGE] trunk-style-improvements-xmo (Python stylistic improvement)
bzr revid: rco@openerp.com-20121217110150-4ijt04ic17miktq7
2012-12-17 12:01:50 +01:00
Raphael Collet 2679a49af4 [FIX] orm: replace incorrect usage of 'in' by '=='
bzr revid: rco@openerp.com-20121217104721-miqmtw2zm7r7lxrs
2012-12-17 11:47:21 +01:00
Raphael Collet eecc7de437 [MERGE] trunk-acl-thu (check read/write access restrictions on fields with a groups attribute)
bzr revid: rco@openerp.com-20121217101528-nt5hsjvvodaap57m
2012-12-17 11:15:28 +01:00
Antony Lesuisse f6fe592152 [MERGE] trunk
bzr revid: al@openerp.com-20121216014404-oonymtva4uww7bwk
2012-12-16 02:44:04 +01:00
Antony Lesuisse 0a35f78974 [MERGE] remove res.partner.address by chs
it also removes an ugly hack in the orm.

bzr revid: al@openerp.com-20121215182836-y15v2mwgdg9wyubi
2012-12-15 19:28:36 +01:00
Vo Minh Thu 91ee5eae52 [IMP] orm/acl: proper message instead of `TODO`.
bzr revid: vmt@openerp.com-20121214155313-76lncslpx7ugrp6x
2012-12-14 16:53:13 +01:00
Vo Minh Thu 08a082f63f [FIX] registry: Set the fields_by_model attribute in __init__(), use None to flag non-existing fields-per-model cache.
bzr revid: vmt@openerp.com-20121214141114-em9r66e3sfy21t2r
2012-12-14 15:11:14 +01:00
Xavier Morel d0a377cb1c [FIX] incorrect docstrings or docstring param names not matching actual param names
bzr revid: xmo@openerp.com-20121214130758-a2wp963w4djmb02k
2012-12-14 14:07:58 +01:00
Xavier Morel b6ece5d65f [REM] trailing semicolons
bzr revid: xmo@openerp.com-20121214124310-wfdkhmcwxnyqu30m
2012-12-14 13:43:10 +01:00
Xavier Morel c6079dd6bb [REM] unnecessary parens
bzr revid: xmo@openerp.com-20121214123803-6xu2s1ndnoyj4i3e
2012-12-14 13:38:03 +01:00
Xavier Morel 4cb3685f70 [IMP] compare to None by identity
bzr revid: xmo@openerp.com-20121214121638-6k5h0ztg94i4f5t6
2012-12-14 13:16:38 +01:00
Vo Minh Thu 3667e3c619 [IMP] module loading: removed unnecessary indentation, added comments.
bzr revid: vmt@openerp.com-20121214105820-9nlgzu9pm7cvh1pz
2012-12-14 11:58:20 +01:00
Olivier Dony e660b70ecb [IMP] orm: do not warn about missing ondelete cascade rule if ondelete is restrict - that's safe as well
bzr revid: odo@openerp.com-20121212210247-emrz5rf9ewcwdggu
2012-12-12 22:02:47 +01:00
Vo Minh Thu eb0fcc35d2 [FIX] check_field_access_rights: ignore nonexisting fields
It seems name_alias is requested but does not exist.

bzr revid: vmt@openerp.com-20121212151509-22494edob4e3fqaf
2012-12-12 16:15:09 +01:00
Vo Minh Thu 9d2afcae3f [IMP] orm: check groups-based access rights on model fields in read() and write().
The commented-out tests present in test_acl.py now pass.
Other tests now fail :-(.

bzr revid: vmt@openerp.com-20121212113647-11y3buulifg6tyhj
2012-12-12 12:36:47 +01:00
Christophe Simonis 74b431298e [FIX] remove res.partner.address model
bzr revid: chs@openerp.com-20121211182934-up3sxi0pcw20qrit
2012-12-11 19:29:34 +01:00
Vo Minh Thu f668a123d9 [IMP] Reduce considerably the loading time of a new registry.
Loading time was mesured on the loading of a second database (identical to the
first one), i.e. by passing -d xx,yy on the command line, using cProfile. The
databases were installed with sale, mrp, and the crm.

The cProfile code is commited as part of this patch and should be removed (or
maybe guarded by some command-line flag) (just as the commenting-out of the
cron startup).

The patch was also applied on top of the trunk-simple-table-stats-vmt branch
which provides SQL queries counters.

Results indicate that the number of SQL queries are reduced from about 2100 to
27. Loading time is reduced from 1.3s to 0.26s (i.e. improved by 5).

Changes:

All calls to ir_model_fields to fetch manual (custom) fields are done in a
single call (prior to instanciate all models).

Checks for empty module descriptions are not done unless we are in init or
update mode. (The behavior was the opposite, which was probably a mistake).

Some calls to ir_translation, passing en_US because there was no lang in the
context, are not done anymore.

The improved time is also a result of a change in the decimal_precision module
where precision_get fetches all digits/applications instead of one at a time
(and thus implements its own caching instead of relying on
openerp.tools.ormache).

bzr revid: vmt@openerp.com-20121211105954-lwgs5js7yw3tzghs
2012-12-11 11:59:54 +01:00
Thibault Delavallée f0abd6f49e [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20121210083805-1t45n6xxmptpo28o
2012-12-10 09:38:05 +01:00
Antony Lesuisse a6700e0e3f [MERGE] multiprocess signaling
trying trunk, feature branch fails with Address already in use

bzr revid: al@openerp.com-20121208210954-pi55sib4x7eyamem
2012-12-08 22:09:54 +01:00
Antony Lesuisse 3d2a09a973 multiprocessing signaling manually backported from 6.1
bzr revid: al@openerp.com-20121208181151-lfy956ysnok5b5hf
2012-12-08 19:11:51 +01:00
Christophe CHAUVET 82b17c82a4 [IMP] Remove completly the OIDS, cause WITHOUT OIDS is activate by default
bzr revid: christophe.chauvet@syleam.fr-20121207162110-75hbq71zc6ufeby9
2012-12-07 17:21:10 +01:00
Thibault Delavallée bb598cd105 [CLEAN] orm: added quote around a forgottent table name; cleaned a bit some code and added comments, removed dead code.
bzr revid: tde@openerp.com-20121207162019-ec1x7a38vw2rrqze
2012-12-07 17:20:19 +01:00
Thibault Delavallée 61a2a82174 [MERGE] Merged branch holding a proposal to solve the generate_order_by issue (see lp:1070757). As requested by Olivier Donny, this fix has been moved into generate_order_by. Deleted previous workaround done in this branch. Patch courtesy of Paulius Sladkevičius
bzr revid: tde@openerp.com-20121207155825-9bjvuxhyr0x937l7
2012-12-07 16:58:25 +01:00
Thibault Delavallée 50cf6d4008 [CLEAN] Query: cleaned a bit the code. All joins now goes through the same method, either implicit or explicit. Will have to be upgraded in future versions, but at least this is a bit centralized. Updated ORM accordingly. Updated tests. Added a get_alias_from_query method in expression that find the table and the alias from a 'full alias' statement.
bzr revid: tde@openerp.com-20121207154204-mx036lpj3vdclu77
2012-12-07 16:42:04 +01:00
Thibault Delavallée e36b44e82f [IMP] [WIP] order_by: now using aliases in _generate_order_by, _generate_o2m_order_by, _inherits_join_add, ... added some tests. Next comits will clean a bit the code, because currently it is a bit messy.
bzr revid: tde@openerp.com-20121207115424-x8gkjcqpi8dz96g2
2012-12-07 12:54:24 +01:00
Christophe CHAUVET 3d3534ca39 [IMP] Don't use WITH OIDS when create a table
lp bug: https://launchpad.net/bugs/1087332 fixed

bzr revid: christophe.chauvet@syleam.fr-20121206163711-5jvrhrg8w5le4zay
2012-12-06 17:37:11 +01:00
Thibault Delavallée 02c200844c [CLEAN] Removed some forgotten print statements.
bzr revid: tde@openerp.com-20121205153535-lfs6yrokyk0wfm0w
2012-12-05 16:35:35 +01:00
Thibault Delavallée 1652bb1e83 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20121205092215-g6a8fpxtd1fq3nwn
2012-12-05 10:22:15 +01:00
Vo Minh Thu 93ae934963 [ADD] added comment in _validate() explaining why the context is not passed around when calling _constraints functions.
bzr revid: vmt@openerp.com-20121205082840-2ww34gbs7nl56952
2012-12-05 09:28:40 +01:00
Arnaud Pineux 133d581273 [FIX] _register_hook & loader
lp bug: https://launchpad.net/bugs/944197 fixed

bzr revid: api@openerp.com-20121204161029-3gagt4lcci93g5lk
2012-12-04 17:10:29 +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
Olivier Dony b624267457 [FIX] translate,orm: remember local Model [_sql]_constraints, and keep only those when exporting translations
Previously all _*constraints leaked upstream and
downstream, and were duplicated in all the exported
terms for all modules inheriting from a given model.

bzr revid: odo@openerp.com-20121204082947-tdpiu71ryxzuredb
2012-12-04 09:29:47 +01:00
Thibault Delavallée 638fc20618 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20121130093658-uvm0gbo90su88psh
bzr revid: tde@openerp.com-20121203131657-4gcp4wreylnmw2or
bzr revid: tde@openerp.com-20121204082427-7zdzn6f21xzvxby9
2012-12-04 09:24:27 +01:00
ajay javiya (OpenERP) 61639fd491 [FIX]:Issue of add custome field on object
bzr revid: aja@tinyerp.com-20121203132713-298spxst191htlh7
2012-12-03 18:57:13 +05:30
Thibault Delavallée 8163c0027b [IMP] [TEST] orm: updated order_by generation by adding the root table name to the order by condition generated based on self._order. Added a mockup of where_calc in test_expression, to be able to track generated Query objects. Added a first test on a one2many query, to track current behavior.
bzr revid: tde@openerp.com-20121127160627-qs1tupvgr8ypexoo
2012-11-27 17:06:27 +01:00
Olivier Dony 7f5ad72429 [MERGE] Forward-port 6.1 bugfixes up to rev. 4307
rev.4307 = rev-id launchpad_translations_on_behalf_of_openerp-20121125065030-g5if5pybr61la4yj

bzr revid: odo@openerp.com-20121126160320-t2suuik6lhk6wl0x
bzr revid: odo@openerp.com-20121126161836-mv8yymzgbnmif4ve
bzr revid: odo@openerp.com-20121126162023-ejvsapwouyudw6c6
bzr revid: odo@openerp.com-20121126181527-d4yx15372bis77qj
2012-11-26 19:15:27 +01:00