Commit Graph

737 Commits

Author SHA1 Message Date
Olivier Dony 8d745f9f50 [FIX] account, mail, etc.: uniformize evaluated expressions
opw-626694
2015-05-21 15:26:35 +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
Laurent Mignon (aka lmi) ea00789e35 [IMP] take into account the context parameter 'defer_parent_store_computation' also on write operations 2014-06-24 14:22:41 +02:00
Christophe Simonis eef6330c55 [MERGE] forward port of branch saas-5 up to adf07a9 2014-06-19 16:23:32 +02:00
Christophe Simonis adf07a9490 [MERGE] forward port of branch saas-4 up to 5087612 2014-06-19 16:13:35 +02:00
Christophe Simonis 5087612d1d [MERGE] forward port of branch saas-3 up to bf53aed 2014-06-19 15:44:07 +02:00
Xavier Morel 63a6ba92e2 [IMP] no need to compute *all* has_group calls if the first one fails 2014-06-17 12:00:50 +02:00
Denis Ledoux 3c0292645f [MERGE] Forward-port of 7.0 bugfixes up to 63ea0df73f 2014-06-16 17:37:10 +02:00
Fabien Meghazi f213b7ea65 [FIX] new style for default form views 2014-06-16 13:39:48 +02:00
Martin Trigaux 86acc1a62f [FIX] orm: avoir errors reading twice a field
_read_flat: remove duplicated fields in read call
get many2one: as False is instance of int, check the value of x first to avoid calling a name_get with a list of False

When we were reading twice a m2o field where at least one result is null, the first call to name_get would set the value to False instead of None and then accepted by the filter 'isinstance(x, (int,long))'
2014-06-12 16:14:41 +02:00
Christophe Simonis a7c2125735 [MERGE] forward port of branch saas-4 up to 6b8e972 2014-06-10 13:15:46 +02:00
Christophe Simonis 6b8e9727e5 [MERGE] forward port of branch saas-3 up to 4601d85 2014-06-10 12:29:47 +02:00
Christophe Simonis 4601d85944 [MERGE] forward port of branch 7.0 up to 6fdb783 2014-06-10 11:49:14 +02:00
Oliver Laurent 306d5c89a0 [FIX] orm: do not resize unlimited char fields 2014-06-05 19:05:36 +02:00
Christophe Simonis b1c0bc0b46 [MERGE] forward port of branch saas-4 up to 65f68c1 2014-06-03 19:45:19 +02:00
Martin Trigaux 3cb551bf50 [FIX] read_group: do not change the return format of the read group in case of no groupby_fields and keep the same return format as with groupby fields (a list of dict) 2014-06-03 10:20:55 +02:00
Xavier Morel d9ce012d29 [IMP] simplify handling of callable _constraint message 2014-05-27 11:57:00 +02:00
Xavier Morel d8377a931e [REM] idiotic _invalids attribute, as well as get_invalid_fields 2014-05-27 11:56:59 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Christophe Simonis bb26dea60b [MERGE] forward port of branch saas-3 up to revid 38abc8a 2014-05-20 19:00:50 +02:00
Christophe Simonis 38abc8a006 [MERGE] forward port of branch 7.0 up to revid b09b6a0 2014-05-20 18:57:04 +02:00
Thibault Delavallée 066fb14326 [FIX] orm: unlink: when unlinking a record, trigger the computing of
function fields for other records in the same model. Previously all function fields in the
current model were not computed for some reason not provided by the history.

We therefore compute effective store_ids on which the various trigerred
function fields will be computed again. Those ids are the ids given
in the store_get storage variable minus the deleted ones.
2014-05-19 18:12:41 +02:00
xmo-odoo 072485799c Merge pull request #27 from lyinfo/master-ck-match
Dereferencing of nones could lose error messages during import
2014-05-19 10:18:27 +02:00
Xavier Morel cf833a2f53 [FIX] don't blockquote a list of stuff for no reason 2014-05-19 08:32:14 +02:00
kevin wang b1dfb8e193 check no match result in convert_pgerror_* functions 2014-05-17 23:14:53 +08:00
Olivier Dony 7e66bd9d55 [FIX] orm.search_read: drop active_test context flag during the read() step
The active_test flag is meant for search(),
but when passed to search_read() it was also
propagated to the read() call.
This has little consequence normally because
read() ignores this flag, but it can have
side-effects when reading x2m fields or
function fields. They are likely to call
search() somewhere downstream, still with
 the propagated active_test flag, while
it should not be applied anymore.

Ultimately dropping this flag could be
done by read() in all cases, but changing
search_read() is less likely to block
exotic cases where the flag was passed
on purpose. Moving it to read() could
be done as a later step.
2014-05-13 17:29:35 +02:00
Denis Ledoux 42025a6af5 [ADD] osv: add get_formview_action and get_formview_id methods
return an action to open the document. This method is meant to be
overridden in addons that want to give specific view ids for example

bzr revid: dle@openerp.com-20140416143431-syqu1ko74xt04oo5
2014-04-16 16:34:31 +02:00
Martin Trigaux 478cbd7c70 [FIX] read_group: avoid shared context and initialise if none
bzr revid: mat@openerp.com-20140411075556-kdxn1lsth45twgmj
2014-04-11 09:55:56 +02:00
Gery Debongnie 2df67ad6c9 [FIX] make sure the read_group method use the correct time interval when grouping with an interval of days (stupid typo) (orm.py)
bzr revid: ged@openerp.com-20140409092759-91ruq32vkxh698kh
2014-04-09 11:27:59 +02:00
Gery Debongnie e143250b7a [IMP] simplifies the readgroup code to select order by (orm.py)
bzr revid: ged@openerp.com-20140408122417-y75wp0plyloiamuy
2014-04-08 14:24:17 +02:00
Gery Debongnie 5d31c979a1 [MERGE] merge from trunk
bzr revid: ged@openerp.com-20140408090618-vs4e9c9ckhat9aem
2014-04-08 11:06:18 +02:00
Gery Debongnie 6d234c01bd [IMP] change the regex matching orders in orm.py to accept field:interval. This simplifies the code in _check_qorder (no need to compute the raw field name)
bzr revid: ged@openerp.com-20140408090418-5yjnfp6axumytmrq
2014-04-08 11:04:18 +02:00
Gery Debongnie 568b8c7632 [IMP] add and fix the documentation on some helper methods in read_group. (orm.py)
bzr revid: ged@openerp.com-20140408082029-pmdzkbak0zjvs8jw
2014-04-08 10:20:29 +02:00
Gery Debongnie 6aa003f1ad [IMP] improves the helper function _read_group_format_result so that it is slightly faster (orm.py)
bzr revid: ged@openerp.com-20140408073813-8z23fun5274fvqaa
2014-04-08 09:38:13 +02:00
Christophe Simonis 0161666e8b [MERGE] forward port of branch saas-3 up to revid 5112 chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
bzr revid: chs@openerp.com-20140407160548-ttuc877kknuycoqw
2014-04-07 18:05:48 +02:00
Christophe Simonis 1e9ed7baf6 [MERGE] forward port of branch 7.0 up to revid 5275 odo@openerp.com-20140407105740-elbz311w5u9e8eos
bzr revid: chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
2014-04-07 16:42:38 +02:00
Gery Debongnie b683b9c614 [IMP] removes useless calls to field_get and replace them by self._all_columns in read_group method (orm.py).
bzr revid: ged@openerp.com-20140407133931-hrf9dmdj2fx050ww
2014-04-07 15:39:31 +02:00
Gery Debongnie 82825c4acd [FIX] add context parameter to various helper methods to avoid stupid crash in read_group (orm.py)
bzr revid: ged@openerp.com-20140407130223-pdzge17omntpbh23
2014-04-07 15:02:23 +02:00
Olivier Dony 5be9e5612f [FIX] browse()/browse_record: use iterables instead of forcing lists when constructing browse_lists
This allows iterable list_class implementations

bzr revid: odo@openerp.com-20140407105740-elbz311w5u9e8eos
2014-04-07 12:57:40 +02:00
Gery Debongnie 39e69876c6 [IMP] moves some internal function in read_group to become class methods and slightly reorganize them (orm.py)
bzr revid: ged@openerp.com-20140404124232-dmyxuv1qf5kperet
2014-04-04 14:42:32 +02:00
Gery Debongnie 870fed2bb9 [IMP] puts the closure 'process_groupby' in read_group in a separate method. (orm.py)
bzr revid: ged@openerp.com-20140404114543-nw7yx87h1dbkbhtf
2014-04-04 13:45:43 +02:00
Gery Debongnie f48ab8373b [FIX] fixes a read_group test to use the correct field:interval key when grouping with an interval, and makes sure the sql request properly quote the order statement (without quoting DESC or ASC) (orm.py)
bzr revid: ged@openerp.com-20140404091947-z87yg2bc7htovj4q
2014-04-04 11:19:47 +02:00
Gery Debongnie 7dd2e6789d [FIX] when using readgroup in eager mode, there is a possible name collision when grouping on several fields with different intervals, for ex, date_deadline:month, date_deadline:week. This commit resolves the issue by changing the keys 'field' into 'field:interval' (for ex, date_deadline:month) in the results (orm.py)
bzr revid: ged@openerp.com-20140403142923-puiruf29tbi1pjj9
2014-04-03 16:29:23 +02:00
Gery Debongnie 1aba5f08cf [FIX] fixes read_group so that it uses the correct _count attribute in the result dictionary (orm.py)
bzr revid: ged@openerp.com-20140403115605-tuboy66r9ews2u0e
2014-04-03 13:56:05 +02:00
Gery Debongnie 75b66ed77c [FIX] work around a read bug: false data are fetched when the same field is present multiple times as a field parameter. The solution is to make sure the list many2onefields does not contain duplicate fields (orm.py)
bzr revid: ged@openerp.com-20140403094316-kmlliqbwd14ey68p
2014-04-03 11:43:16 +02:00
Gery Debongnie 9d8fa4d720 [FIX] only fills groups with empty groups in read_group when in lazy mode to prevent weird stuff happening with the read_group_fill_result algorithm.
bzr revid: ged@openerp.com-20140402135704-3d71gczgg362cezl
2014-04-02 15:57:04 +02:00
Gery Debongnie d38ce26d9d [MERGE] merge from trunk
bzr revid: ged@openerp.com-20140402081302-x1fohx2d8i2iiluw
2014-04-02 10:13:02 +02:00
Gery Debongnie 8c93dcbf62 [IMP] refactoring of readgroup method. The work is pretty much complete with this commit. Now, it correctly fills in empty group using _read_group_fill_results (orm.py)
bzr revid: ged@openerp.com-20140402073800-0ggxqfpyo2in8ozt
2014-04-02 09:38:00 +02:00
Martin Trigaux 9b19c1a337 [FIX] orm: add missing pooler in call
bzr revid: mat@openerp.com-20140403074134-fav63w1k6hm1b8ar
2014-04-03 09:41:34 +02:00
Martin Trigaux 7d585c5dad [FIX] convert datetime to date in case of date field
bzr revid: mat@openerp.com-20140401100819-k092i48lefozmdxb
2014-04-01 12:08:19 +02:00