Commit Graph
1111 Commits
Author SHA1 Message Date
Yogesh Sakhreliya 7b37895c7f [FIX] use exists method instead of search method.
bzr revid: ysa@tinyerp.com-20101231090253-zh0escpwqtk80wtv
2010-12-31 14:32:53 +05:30
Yogesh Sakhreliya 38092d24bf [FIX-692891]
bzr revid: ysa@tinyerp.com-20101231061314-jhjc6c2uyeqko19x
2010-12-31 11:43:14 +05:30
Fabien Pinckaers a9d913044c merge
bzr revid: fp@tinyerp.com-20101229182509-jvoanufnklz1jbk2
2010-12-29 19:25:09 +01:00
P. Christeas 52c0c0e09e [MERGE] orm,expression: fixed m2o handling of empty lists in domains + tests
lp bug: https://launchpad.net/bugs/598454 fixed

bzr revid: odo@openerp.com-20101229174223-xjljjvwqoiwgpci1
2010-12-29 18:42:23 +01:00
Olivier Dony 1fd49747fb [FIX] orm: fixed RST indentation in docstring of browse()
bzr revid: odo@openerp.com-20101229161712-u62qwgshmjlybsv6
2010-12-29 17:17:12 +01:00
Olivier Dony b2270b1a27 [FIX] orm: corrected RST for docstring of import_data()
bzr revid: odo@openerp.com-20101229120926-0czisx49e30fjijh
2010-12-29 13:09:26 +01:00
Olivier Dony 761c638a54 [FIX] osv,tools: break some circular dependencies
bzr revid: odo@openerp.com-20101229105004-ay1e69aujci1l32i
2010-12-29 11:50:04 +01:00
Fabien Pinckaers 3ec84880c0 fix lp692891
bzr revid: fp@tinyerp.com-20101228160728-tfaia9pcqs0j4uef
2010-12-28 17:07:28 +01:00
Fabien Pinckaers 44f3c893c5 [FIX] from cedk lp #677377
bzr revid: fp@tinyerp.com-20101228155347-eue161xp4fxeh8lc
2010-12-28 16:53:47 +01:00
Fabien Pinckaers 21b9caa46b fix
bzr revid: fp@tinyerp.com-20101227170054-ochgr9x88l4wun2x
2010-12-27 18:00:54 +01:00
Fabien Pinckaers dd442961fb [FIX] Complete recode of import_data to clean and fix export with import compatible.
bzr revid: fp@tinyerp.com-20101227164621-mjb6n49f9i5bkeoh
2010-12-27 17:46:21 +01:00
P. Christeas cc64d52b33 expression: fix m2o handling of empty lists [Bug 598454]
The domain expressions wouldn't yield the expected results in the
following cases (eg. for res.partner):
  [('company_id', 'in', [])] : should return [], not all partners
  [('company_id.partner_id', 'in', [])] : again, empty set

After some deliberation and discussion, we *change the behavior* for them.

Notes:
  1. This comes after commit 913e95856f80, bug 626806 which solved the
  corresponding cases for m2m, o2m
  2. This commit _will_ have side-effects. The result set for domains now
  is indeed different. But, we believe, now it is the proper one, fixes
  cases of unexpected results that have been reported
  3. It makes the server a bit faster, because empty results are quick to
  compute
  4. The "not in []" operator will NOT return results with NULL values in
  the corresponding field (aka. empty). This may not be the one expected
  by users, but it follows the SQL standard (par. 9.20.3):
    http://www.postgresql.org/docs/9.0/static/functions-subquery.html

bzr revid: p_christ@hol.gr-20101223112938-ore0dmmasekdcyfn
2010-12-23 13:29:38 +02:00
Olivier Dony 162e988544 [IMP] orm.search: support multiple _order clauses in destination objects when sorting on m2o fields
lp bug: https://launchpad.net/bugs/692694 fixed

bzr revid: odo@openerp.com-20101221192344-87d7ajnfsn5unm9p
2010-12-21 20:23:44 +01:00
Fabien Pinckaers e15952531b fix_lp_673696
bzr revid: fp@tinyerp.com-20101221202418-no013141bquj5k6z
2010-12-21 21:24:18 +01:00
Fabien Pinckaers 80b21b75d9 [FIX] import / export
bzr revid: fp@tinyerp.com-20101221193847-z9rkx9o4gc0o92dd
2010-12-21 20:38:47 +01:00
Olivier Dony 033179095f [IMP] orm: improve error reporting when importing m2m in CSV (courtesy of Martin Collins)
lp bug: https://launchpad.net/bugs/672669 fixed

bzr revid: odo@openerp.com-20101221152340-5mp5c36357amsi8m
2010-12-21 16:23:40 +01:00
Olivier Dony 1ba2ff569f [FIX] read_group: better support for empty 'fields' or 'groupby' parameters
lp bug: https://launchpad.net/bugs/692259 fixed

bzr revid: odo@openerp.com-20101221143714-nvvmg2zmbkowbx60
2010-12-21 15:37:14 +01:00
Vo Minh Thu (OpenERP) 35b9fd82ff [FIX] re-commit previous merge broken by bzr-rebase:
translate,orm: simplify loading of field value translations and avoid ignoring them when string has changed (many issues with menus not loaded yet)

bzr revid: odo@openerp.com-20101221105843-myzlkd74tci3puer
2010-12-21 11:58:43 +01:00
Fabien Pinckaers 78a2174db1 merge
bzr revid: fp@tinyerp.com-20101221091005-zctt5bwplj0txipc
2010-12-21 10:10:05 +01:00
Fabien Pinckaers 83d46bac4c [IMP] import / export cleaned
bzr revid: fp@tinyerp.com-20101220231743-9vswez6tg198cyco
2010-12-21 00:17:43 +01:00
Olivier Dony 0fedbb3215 [FIX] fields.reference: don't accept half-defined references - second part of fix, in create()
lp bug: https://launchpad.net/bugs/604604 fixed

bzr revid: odo@openerp.com-20101220162501-v0xag7nwdhfij14f
2010-12-20 17:25:01 +01:00
Olivier Dony afed2d47fe [FIX] fields.reference: don't accept half-defined references, and avoid crashing on previous bad ones
lp bug: https://launchpad.net/bugs/604604 fixed

bzr revid: odo@openerp.com-20101220160959-f6x2kik46btf0uol
2010-12-20 17:09:59 +01:00
Olivier Dony 966907eaeb [FIX] fields_view_get: ignore non-element nodes during view inheritance resolution
lp bug: https://launchpad.net/bugs/494969 fixed

bzr revid: odo@openerp.com-20101217150527-4mv740mppqimvsnd
2010-12-17 16:05:27 +01:00
Olivier Dony 0da4773e14 [IMP] orm.read_group: raise if called with group_by being a non-database-stored field
lp bug: https://launchpad.net/bugs/689070 fixed

bzr revid: odo@openerp.com-20101216183708-o61idware1v6tyk3
2010-12-16 19:37:08 +01:00
Vo Minh Thu (OpenERP) d98a26fd42 [MERGE] orm: fixed translations for inherited views when the parent view uses a different model
bzr revid: odo@openerp.com-20101215182416-yk4n4krmw2anuyt3
2010-12-15 19:24:16 +01:00
OpenERP d3e8448875 [FIX] orm: fixed translations for inherited views when the parent view uses a different model.
This fixes for instance the Next and Skip buttons in the Reconfigure shortcut menu.

bzr revid: openerp@vmt-hp4520s-20101215112537-lrp6tphs9qu4b9dq
2010-12-15 12:25:37 +01:00
YSA (OpenERP), Olivier Dony (OpenERP) 6a3e52f41f [FIX] orm,base: prevent useless duplication of m2m records via unique constraint + orm check
lp bug: https://launchpad.net/bugs/558658 fixed

bzr revid: odo@openerp.com-20101214132840-q7x2oodu6hez9d91
2010-12-14 14:28:40 +01:00
Olivier Dony b192bf4dd4 [FIX] osv.osv: fixed reference to osv pool, broken by refactoring of osv service
Fixes bug introduced by revision 3102 chs@openerp.com-20101213105104-jpctooc6j7yc8i8i

bzr revid: odo@openerp.com-20101214131812-oiiy1xv8582jh7ya
2010-12-14 14:18:12 +01:00
Christophe Simonis 5bb14725d4 [IMP] osv: the object pool is not a service anymore
bzr revid: chs@openerp.com-20101213105104-jpctooc6j7yc8i8i
2010-12-13 11:51:04 +01:00
Olivier Dony 83115a45af [FIX] orm: preserve elements order when inheriting views, also after a leaf element
lp bug: https://launchpad.net/bugs/686275 fixed

bzr revid: odo@openerp.com-20101211012104-gt1cg3z1ec91mg34
2010-12-11 02:21:04 +01:00
Olivier Dony 1d85e7a0f6 [IMP] orm: additional error message about missing index on parent_[left|right] columns during creation
bzr revid: odo@openerp.com-20101211000951-gn5dejp3b7dyz24e
2010-12-11 01:09:51 +01:00
Olivier Dony 536e321ca7 [IMP] orm.search: more quietly ignore invalid m2o order spec + fallback to default _order
bzr revid: odo@openerp.com-20101211000810-h1sirszmh0xp52x4
2010-12-11 01:08:10 +01:00
Olivier Dony 4226a3adb2 [FIX] orm: default search view should be more backwards-compatible and lenient
We should consider the select flag from the model as well as the attributes from tree+form view, as in v5.

lp bug: https://launchpad.net/bugs/488128 fixed

bzr revid: odo@openerp.com-20101210212529-oc5n8n9w8ila9j4u
2010-12-10 22:25:29 +01:00
YSA (OpenERP) 5b67a3154e [IMP] orm: somewhat better error message when view inheritance fails on non-<field> element
Inheritance at field level already has a correct error message

lp bug: https://launchpad.net/bugs/623845 fixed

bzr revid: odo@openerp.com-20101210150355-jjdghifgyea07cv8
2010-12-10 16:03:55 +01:00
Olivier Dony bb82904ba3 [FIX] fields.function: make sure all binary values can always be serialized as valid XML
Nnormally, binary fields should be 7-bit ASCII base64-encoded data, but sometimes
it's not the case, so we do additional sanity checks to make sure the binary values
can pass safely via xmlrpc as strings.

As a last resort we coerce the binary values to unicode to make sure they can
be safely serialized as utf-8-encoded values, always valid XML characters.
When this happens, decoding on the other endpoint is not likely to produce
the expected output, but this isjust a safety mechanism(in these cases base64
data or xmlrpc. Binary values should be returned instead by the function field.

In a future version we should probably switch to using XMLRPC Binary types always for
passing fields.binary values, but this requires more refactoring.

lp bug: https://launchpad.net/bugs/670778 fixed

bzr revid: odo@openerp.com-20101209230742-gwf8e4zvmk43k6ln
2010-12-10 00:07:42 +01:00
Olivier Dony 9daa68e67c [IMP] orm,base: added context to _constraints functions + use generic osv.osv.check_recursion()
lp bug: https://launchpad.net/bugs/525808 fixed

bzr revid: odo@openerp.com-20101209105733-j3uffwp4rl07nzc4
2010-12-09 11:57:33 +01:00
Olivier Dony 6f0660eaa0 [FIX] orm.read_group: support ordering by any field (not just m2o ones)
bzr revid: odo@openerp.com-20101206131818-ibah9gt409jbil3l
2010-12-06 14:18:18 +01:00
Olivier Dony 170793a683 [MERGE] fix for bug 626806 by xrg - i.e. [(x2m,in,[])] should match nothing
lp bug: https://launchpad.net/bugs/626806 fixed

bzr revid: odo@openerp.com-20101203142342-2g5k64qoouuuxyti
2010-12-03 15:23:42 +01:00
Olivier Dony f1cfc436a7 [MERGE+FIX] fixes for translations,sequence,copy,error messages - some patches courtesy of Margarita Manterola and Don Kirkby
lp bug: https://launchpad.net/bugs/672130 fixed
lp bug: https://launchpad.net/bugs/663775 fixed
lp bug: https://launchpad.net/bugs/673194 fixed
lp bug: https://launchpad.net/bugs/663977 fixed

bzr revid: odo@openerp.com-20101130110940-0tf6ra0uwhiptieb
2010-11-30 12:09:40 +01:00
P. Christeas 12f5aa0a18 expression: fix "m2o, m2m in []" expressions, bug 626806
After some discussions, we decided that the desired behavior of the
ORM for one2many and many2many fields should be:
 (foobar_id,'in', []) => empty result, because the list is empty
 (foobar_id,'in',False) => find records that don't have a foobar

bzr revid: p_christ@hol.gr-20101129183413-yi1jzdwr1tis7d8t
2010-11-29 20:34:13 +02:00
Olivier Dony 839eb5f1c8 [MERGE] orm.read_group: partial support for orderby (m2o only so far)
bzr revid: odo@openerp.com-20101129141204-beieaccpl23pqmge
2010-11-29 15:12:04 +01:00
P. Christeas, O. Dony 6a69f37cf0 [MERGE] many improvements regarding translations, logging, reports, http, speed
bzr revid: odo@openerp.com-20101125142219-8bkqfboyuslzpvyo
2010-11-25 15:22:19 +01:00
Olivier Dony ad490bdcf5 [IMP] orm.write: ignore unknown fields, more consistent with rest of API
bzr revid: odo@openerp.com-20101125135800-dzad2x864bn8p1ah
2010-11-25 14:58:00 +01:00
Yogesh Sakhreliya 456579b198 [FIX] add unique constraint in many2many field.
bzr revid: ysa@tinyerp.com-20101125093424-thmqvllabcx0sxpw
2010-11-25 15:04:24 +05:30
Yogesh Sakhreliya 9de9f34ca8 Merge with lp:openobject-server
bzr revid: ysa@tinyerp.com-20101125084117-zyr1ahoyb9awl583
2010-11-25 14:11:17 +05:30
OpenERP GTK R&D Team a5327f27f9 [MERGE] read_group: now returns count information for the groups
bzr revid: odo@openerp.com-20101124184433-eo54itrejuak0exp
2010-11-24 19:44:33 +01:00
Olivier Dony 30cb4b8891 [IMP] orm.orm: cleaned up comments after previous patches
bzr revid: odo@openerp.com-20101124184108-iw1up4jomysfoh85
2010-11-24 19:41:08 +01:00
Olivier Dony 475667d384 [FIX] orm.import_data: also translate SQL constraints error messages that are not callable
bzr revid: odo@openerp.com-20101124172819-33ahiq3aacgwt8f2
2010-11-24 18:28:19 +01:00
Olivier Dony 276a54b0af [FIX] osv.osv: code cleanup after merging previous patches
bzr revid: odo@openerp.com-20101124164041-760b4zoidv0omu6c
2010-11-24 17:40:41 +01:00
Olivier Dony af506691a3 [MERGE] merged second batch of fixes from xrg-pg84 branch
bzr revid: odo@openerp.com-20101124152707-ksfaru7en81x8xn2
2010-11-24 16:27:07 +01:00