Commit Graph

214 Commits

Author SHA1 Message Date
Olivier Dony 9c287abc14 [FIX] fields.o2m.set(): typo in previous commit, should pass IDs as list to write()
bzr revid: odo@openerp.com-20110207102652-gkgyp5uqo0nk454a
2011-02-07 11:26:52 +01:00
Olivier Dony 87a1392f99 [IMP] osv: added test for parent_store computations + fix for another edge case
The yaml test create a tree structure and modifies it by copying nodes
around and then moving them, checking that the child_of operator keeps
working afterwards. This test caught another edge case, as a follow-up
to the case of bug 708603

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

bzr revid: odo@openerp.com-20110205004316-zaw9qqfke1bcw0s7
2011-02-05 01:43:16 +01:00
Olivier Dony d4c473f502 [REVERT] fields: revert previous fix, until tests and addons are checked for compatibility
bzr revid: odo@openerp.com-20110201210140-gmr25730fiuvq7e5
2011-02-01 22:01:40 +01:00
Olivier Dony 3293581e24 [FIX] many2one: return (id,name) instead of only id also for osv_memory
By doing this small change we save clients the trouble of explicitly having to call
name_get() for each m2o field in osv_memory objects, which they cannot trivially batch
and represents a large dealy for wizards with possibly large numbers of child o2m records.
An example is the linked bug, where partial picking of several hundred move lines would
lead to as many separate name_get RPC calls, causing a noticeable delay.

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

bzr revid: odo@openerp.com-20110201112322-2yw0wxc63wvt7ves
2011-02-01 12:23:22 +01:00
Olivier Dony 570d35e824 [FIX] fields.property: restore compatibility with non-m2o properties
Was broken by revision 3029.2.20  ysa@tinyerp.com-20101231061314-jhjc6c2uyeqko19x, fixing bug 692891

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

bzr revid: odo@openerp.com-20110114230524-zkkvgi6ch7gk3d4m
2011-01-15 00:05:24 +01:00
Olivier Dony 5a0e77e48c [FIX] orm,fields: uniquify fields to read() + avoid failing m2o.get() when already processed
lp bug: https://launchpad.net/bugs/701013 fixed

bzr revid: odo@openerp.com-20110113010901-ckzrapjkt2uoh9r5
2011-01-13 02:09:01 +01:00
Olivier Dony d84824d639 [FIX] osv.fields: avoid unbinding _symbol_* of fields
Reverts rev-id: odo@openerp.com-20110112132828-a38e8ow7ahu97jy3

bzr revid: odo@openerp.com-20110112173901-60jxjgqdufx1bnj3
2011-01-12 18:39:01 +01:00
Olivier Dony 1d12bcdc15 [MERGE] fields.function: proper accessors for integer and integer_big
lp bug: https://launchpad.net/bugs/684263 fixed

bzr revid: odo@openerp.com-20110112132828-a38e8ow7ahu97jy3
2011-01-12 14:28:28 +01:00
Olivier Dony 2008575ade [REVERT] removed debug print statement introduced by previous commit
bzr revid: odo@openerp.com-20110110172949-dj4b7yidhn53m1zu
2011-01-10 18:29:49 +01:00
Yogesh Sakhreliya 8ce6a08a7b [FIX] Fields.function : Correct accessors passed to fields of type integer and integer_big
bzr revid: ysa@tinyerp.com-20110110094413-3640rl39pj1r9v1t
2011-01-10 15:14:13 +05:30
Fabien Pinckaers 849e49a2b4 [IMP] index on partner's ref
bzr revid: fp@tinyerp.com-20110110170328-85g072pod3v2x3d9
2011-01-10 18:03:28 +01:00
Olivier Dony 7d3375f49f [MERGE] bugfixes: default language for partners, password change, validation of custom selection fields, ...
See the bug links

lp bug: https://launchpad.net/bugs/670264 fixed
lp bug: https://launchpad.net/bugs/692891 fixed
lp bug: https://launchpad.net/bugs/695678 fixed
lp bug: https://launchpad.net/bugs/631547 fixed
lp bug: https://launchpad.net/bugs/632927 fixed

bzr revid: odo@openerp.com-20110106173828-kdv1gtdvbws1ceb5
2011-01-06 18:38:28 +01:00
Olivier Dony 15c38f45df [FIX] report_sxw: fix printing odt/sxw reports after regression from fix for bug 670778
The original fix introduced a safety mechanism for avoiding transmission of invalid binary data via
XML-RPC, but caused an issue for binary function fields that do not carry data as base64.
This patch fixes this problem with the printing of odt/sxw reports (via odt2odt) which does
rely on non-base64 binary data for the sxw content.

By re-decoding the unicode-wrapped binary data using the pass-through charset latin1 we 
are sure to restore the original byte values, hence the original file content.

bzr revid: odo@openerp.com-20110104115419-fa4pv1dc63f83dxi
2011-01-04 12:54:19 +01:00
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 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
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 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
P. Christeas c2c264467f fields: conform some default arguments to the coding standards
Side-effects may appear, let us test.

bzr revid: p_christ@hol.gr-20101123154408-qlkittdb7ogrqq2s
2010-11-23 17:44:08 +02:00
Numerigraphe - Lionel Sausin 182cf2b196 [MERGE] sync with the trunk
bzr revid: ls@numerigraphe.fr-20101112141041-19kpvr7pzxqankqo
2010-11-12 15:10:41 +01:00
Numerigraphe - Lionel Sausin e013734045 [REF] stricter checking of defauts in fields & orm __init__
bzr revid: ls@numerigraphe.fr-20101112134214-h27a1ewxr9c4g3id
2010-11-12 14:42:14 +01:00
Jay (OpenERP) 53d3e74d66 [FIX] Removed pdb trace log statement
bzr revid: jvo@tinyerp.com-20101104191713-xkek2g36xzlzcij2
2010-11-05 00:47:13 +05:30
Olivier Dony e1f5158d7d [ADD] fields.binary: support 'bin_size_XXX' context flags to selectively enable returning size/contents of a binary field - pending API change after 6.0
bzr revid: odo@openerp.com-20101104170523-z1n4jop5e46t3wtu
2010-11-04 18:05:23 +01:00
Olivier Dony be2926de63 [FIX] fields.many2many: get() should ignore "string" domains, meant for client-side eval (pending API change later to make the distinction explicit?)
bzr revid: odo@openerp.com-20101021163131-bbmtpygtwton3acv
2010-10-21 18:31:31 +02:00
Olivier Dony f3f9478b6a [IMP] fields.many2many: improve/refactor many2many.get() after last domain patch (initial refactoring from P. Christeas)
bzr revid: odo@openerp.com-20101021130045-s7ntdh7xyu20hgws
2010-10-21 15:00:45 +02:00
Harry (OpenERP) 54ae6b5875 [FIX] field: support domain in many2many field
bzr revid: hmo@tinyerp.com-20101020125821-mh39jxaqor7z6vhg
2010-10-20 18:28:21 +05:30
Anup (OpenERP) 60f2b42647 [FIX] fields.py Corrected
lp bug: https://launchpad.net/bugs/625896 fixed

bzr revid: ach@tinyerp.com-20101015103003-34eytuy07mu8pt1s
2010-10-15 16:00:03 +05:30
Olivier Dony a79d0ee8e3 [FIX] osv.fields.one2many: corrected get() after incorrect patches
bzr revid: odo@openerp.com-20101013163927-rsvoademz4iumjbh
2010-10-13 18:39:27 +02:00
Jay (OpenERP) 2cfe39726e [FIX] fields : Use of defaultdict removed
bzr revid: jvo@tinyerp.com-20101013150040-r26sek4x6049u9l7
2010-10-13 20:30:40 +05:30
Jay (OpenERP) 092c4dff88 [REVERT] Reverted above fix , defaultdict seems faulty
bzr revid: jvo@tinyerp.com-20101013132833-1ogy3q3ci5zy6bh4
2010-10-13 18:58:33 +05:30
Sébastien BEAU - http://www.akretion.com 2d426ad6ce [FIX] Fields : correction on get() of O2M
lp bug: https://launchpad.net/bugs/603708 fixed

bzr revid: jvo@tinyerp.com-20101013121705-2dqetjqp9viavk0e
2010-10-13 17:47:05 +05:30
Xavier Morel 040f2ce15b [FIX] use correct default callable for a datetime to get the current datetime as of the object's creation
Add staticmethods to fields.time, fields.date and fields.datetime so they can generate default values which they can actually consume

bzr revid: xmo@openerp.com-20101012160130-jwgl7cok853fiyap
2010-10-12 18:01:30 +02:00
Numerigraphe - Lionel Sausin 70fd90d33b [FIX] mutable default in osv
lp bug: https://launchpad.net/bugs/525808 fixed

bzr revid: ls@numerigraphe.fr-20100722134948-5axugpkr0nwbda2a
2010-07-22 15:49:48 +02:00
olt@tinyerp.com 6acee33b4e [FIX] osv.fields: fromkeys second argument is only evaluated once
bzr revid: olt@tinyerp.com-20100922092349-ab36ynbdzqvexryb
2010-09-22 11:23:49 +02:00
Anup (OpenERP) 50985408b6 [FIX] Fixed _get_by_id() method of fields.property
bzr revid: ach@tinyerp.com-20100921085549-lw3x6w4zbljscxic
2010-09-21 14:25:49 +05:30
Fabien Pinckaers 31efd060f4 fix
bzr revid: fp@tinyerp.com-20100919133209-mqfh0nm17e8hosr1
2010-09-19 15:32:09 +02:00
Fabien Pinckaers b1ed0bbb57 [FIX] properties
bzr revid: fp@tinyerp.com-20100919123445-2vofhh1qkspod92r
2010-09-19 14:34:45 +02:00
Fabien Pinckaers 8b28a3cb5e fix
bzr revid: fp@tinyerp.com-20100919094518-j01cwcsarlgmtv0g
2010-09-19 11:45:18 +02:00
Fabien Pinckaers a8aa3bba98 speed_improve
bzr revid: fp@tinyerp.com-20100918144804-3zf2wrfylwg4duzx
2010-09-18 16:48:04 +02:00
Fabien Pinckaers 7fd317057a speed_improve
bzr revid: fp@tinyerp.com-20100918144732-wjyp8mvhck3lva1w
2010-09-18 16:47:32 +02:00
Fabien Pinckaers 37fb76e236 improve_speed
bzr revid: fp@tinyerp.com-20100918143750-t03rd85r1r7zdnec
2010-09-18 16:37:50 +02:00
Fabien Pinckaers c3ec58b1a4 improve_speed
bzr revid: fp@tinyerp.com-20100918143559-hcgi2x1af0pyt1ph
2010-09-18 16:35:59 +02:00
Fabien Pinckaers 825c70aeed [IMP] Speed improvements
bzr revid: fp@tinyerp.com-20100918110731-0zacb01o17bd0h55
2010-09-18 13:07:31 +02:00
Fabien Pinckaers c8ae6b4736 [FIX] Speed improvement properties
bzr revid: fp@tinyerp.com-20100918101958-jj3vpqzy6lbvv0yk
2010-09-18 12:19:58 +02:00
Olivier Dony 71e504345d [FIX] osv.fields: properly handle reading a m2o with no value set
bzr revid: odo@openerp.com-20100817132829-fy1k9hz7cukx194z
2010-08-17 15:28:29 +02:00
Olivier Dony 3e858f1da5 [FIX] orm/fields.function: function/related fields with type=m2o must properly return tuples (name_get)
bzr revid: odo@openerp.com-20100813002321-13vb9675qvqr16kc
2010-08-13 02:23:21 +02:00
Christophe Simonis 1a4ef0313f [FIX] core: correct fields.related behavior at write() (forwardport of 2093 chs@openerp.com-20100810094721-ydk75n23aa8km9xo from stable branch)
bzr revid: chs@openerp.com-20100810095948-8qetzs6mh3n7h0lz
2010-08-10 11:59:48 +02:00
Jay (Open ERP) 051c07966b [FIX] fields.related should not break when o2m,m2m returns null
bzr revid: jvo@tinyerp.com-20100727093909-i2ixgcv2hrhcp0fq
2010-07-27 15:09:09 +05:30
Fabien Pinckaers 93832f58e8 fix
bzr revid: fp@tinyerp.com-20100625150340-vqz83wq7a8rfb36u
2010-06-25 17:03:40 +02:00