Commit Graph
1046 Commits
Author SHA1 Message Date
P. Christeas 6e13dcb8a2 orm: Return numeric uid at perm_read() when no access to res.user
If a res.user belongs to a company_id that the current user has no access
to, perm_read() wouldn't be able to return results (but exception). Now,
just skip the uid->login resolution and return the numeric value instead.

bzr revid: p_christ@hol.gr-20101123135654-bslxfv93p10216d3
2010-11-23 15:56:54 +02:00
P. Christeas ac2c09908a OSV: a lint check fix
bzr revid: p_christ@hol.gr-20101118184840-08li9h2ebfzdtxpy
2010-11-18 20:48:40 +02:00
P. Christeas 41c9098ca9 OSV: Fix callable _sql_constraint messages
This fixes the support for callable sql_constraint messages, which have
always been wrong. It respects the (cr, uid, ids, context) arguments and
will fallback to Postgres's error if it cannot call.

Note that sql constraints are not properly explained when base_module_record
or audittrail are installed.

bzr revid: p_christ@hol.gr-20101118184643-8tnmj83b09kuvf1j
2010-11-18 20:46:43 +02:00
P. Christeas d0dee32019 osv: Improve the translation logic for the osv.check wrapper
Done after bug [655783], the osv layer is too early to call the _().
Also, we cannot trust the cursor to perform a further SQL query on
it, since it carries the IntegrityError.

bzr revid: p_christ@hol.gr-20101118184638-2yrfpvx9har48h1g
2010-11-18 20:46:38 +02:00
P. Christeas c8f52b8c98 ORM, ir_*: convert standard constraint messages to callables
Also, fix way that callable constraints are passed with the context so
that they can have translatable strings inside (but not on the results
of the callable).

Conflicts:

	bin/addons/base/ir/ir_model.py
	bin/addons/base/module/module.py
	bin/tools/translate.py

bzr revid: p_christ@hol.gr-20101118164721-19rgx43d3p96b2lf
2010-11-18 18:47:21 +02:00
P. Christeas 406e8aaba6 ORM: do import warnings, needed for _check_recursion() earlier patch
bzr revid: p_christ@hol.gr-20101116163536-jmfxkzagrq5fcrx8
2010-11-16 18:35:36 +02:00
P. Christeas 08ef1a95f1 ORM: deprecate check_recursion() in favour of _check_recursion()
bzr revid: p_christ@hol.gr-20101116150435-jfmjah8ookf11x3y
2010-11-16 17:04:35 +02:00
P. Christeas 4187facd9f ORM: Better message when copying non-existing records
by: jvo@openerp.com

In both cases, we end up with an exception. But it is better to know
which model+id has failed.

bzr revid: p_christ@hol.gr-20101116150047-xtyz8nrt6465ug2k
2010-11-16 17:00:47 +02:00
P. Christeas 63d562de39 ORM: fix bug at orm.copy_data(), would reset context[lang]
Thanks to Dr. Gassauer that made me revise this code.

bzr revid: p_christ@hol.gr-20101116150025-ssyiix1c72t04fbk
2010-11-16 17:00:25 +02:00
Anup (OpenERP) 602815a5ad [FIX](Maintenance) Exportation fixed for o2m and m2m
bzr revid: ach@tinyerp.com-20101116092650-cdzcqn5tc7hq5l3m
2010-11-16 14:56:50 +05:30
Numerigraphe - Lionel Sausin 8b3bd3ccee [FIX] typo in field name
bzr revid: ls@numerigraphe.fr-20101112142119-e9gqnld7m5dd62kh
2010-11-12 15:21:19 +01: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
Numerigraphe - Lionel Sausin 1fff5e28f1 [FIX] incorrect spellings (childs -> children)
bzr revid: xmo@openerp.com-20101112103952-qabm06zgu6s5qrnn
2010-11-12 11:39:52 +01:00
Olivier Dony e552766352 [IMP] orm: spelling: default language is en_US, so we should us International/US forms
lp bug: https://launchpad.net/bugs/546138 fixed

bzr revid: odo@openerp.com-20101108143014-p3xlsiz3kb79ckdt
2010-11-08 15:30: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
Fabien Pinckaers d20510168f [IMP] Speed improvement when loading modules
bzr revid: fp@tinyerp.com-20101101113352-g32hhvp5355jb3nt
2010-11-01 12:33:52 +01:00
Fabien Pinckaers c50d3029ae [IMP] Speed improvement when loading modules
bzr revid: fp@tinyerp.com-20101101113320-umabgxebmj0zzcpz
2010-11-01 12:33:20 +01:00
Jay (OpenERP) 9186fb8144 [FIX] Search on property field should not crash,it should go for fnct_search() instead (normal fields.function flow)
lp bug: https://launchpad.net/bugs/634607 fixed

bzr revid: jvo@tinyerp.com-20101029203937-ecpovii0zfpwgsdw
2010-10-30 02:09:37 +05:30
Olivier Dony 3f235f8d3c [IMP] orm.read: make error message for read() on deleted records more consistent with other messages
bzr revid: odo@openerp.com-20101027111056-uw1mnr9o5sr4w70l
2010-10-27 13:10:56 +02:00
Olivier Dony fed6d90304 [IMP] orm.write: report an error when trying to update deleted records (thanks RGA for initial fix)
bzr revid: odo@openerp.com-20101027110542-d9nklbocc12bxjs6
2010-10-27 13:05:42 +02:00
Olivier Dony 9d425285c0 [IMP] orm: broader error message for ir.rule check, concurrently deleted records might trigger it too
bzr revid: odo@openerp.com-20101027105153-slv09eju5rzkgaoo
2010-10-27 12:51:53 +02:00
Olivier Dony ea26bded7a [FIX] orm._check_concurrency: mention one conflicting record in exception message
bzr revid: odo@openerp.com-20101025105555-owkglzq1btuvtrrx
2010-10-25 12:55:55 +02:00
Olivier Dony 0d2c8796b4 [FIX] orm._check_concurrency: pop values from context after check to avoid false positives (e.g. nested writes) - one check per transaction is enough
bzr revid: odo@openerp.com-20101025100540-oy374900sveb2o5f
2010-10-25 12:05:40 +02:00
Numerigraphe - Lionel Sausin 5905b3ecf0 [IMP] wording: children intead of childs (again)
bzr revid: ls@numerigraphe.fr-20101025085222-pm6ovutgvb0jg3af
2010-10-25 10:52:22 +02:00
Numerigraphe - Lionel Sausin e3e8be4b01 [MERGE] merge from 6.0.0-RC1
bzr revid: ls@numerigraphe.fr-20101025074313-uaspq2f2y523my99
2010-10-25 09:43:13 +02:00
Xavier Morel a6cab7ac44 [REM] code having become noop and generating lint warnings following commenting of related code
bzr revid: xmo@openerp.com-20101025082031-pqrlih2gd6nnqstr
2010-10-25 10:20:31 +02:00
Xavier Morel 99608428f8 [FIX] lint warnings
bzr revid: xmo@openerp.com-20101025080447-s5ulsom7fdbygwl4
2010-10-25 10:04:47 +02:00
Fabien Pinckaers dee82b3ce7 fix bug introduced in r2938
bzr revid: fp@tinyerp.com-20101023125131-b7vx7tz5wck6jqn5
2010-10-23 14:51:31 +02:00
Xavier Morel 52774a994e [IMP] cleanup _check_concurrency a bit and reduce nesting
bzr revid: xmo@openerp.com-20101022162131-9quly5fjl7xe4km5
2010-10-22 18:21:31 +02: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
sma@tinyerp.com 3108df45f3 [IMP] orm,res.log: better handling of context in res.log entries
bzr revid: odo@openerp.com-20101021144546-1vetgysw0cljvppc
2010-10-21 16:45:46 +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
Olivier Dony b7a2ebc828 [IMP] orm: _add_missing_default_values: handle o2m default values in the legacy form [{},{}] + inherited x2m defaults
bzr revid: odo@openerp.com-20101018161638-i6vtq13tczf2b707
2010-10-18 18:16:38 +02:00
Olivier Dony 74f144f813 [FIX] orm, workflow: do not disable wkf buttons unless explicit group is set on transitions
bzr revid: odo@openerp.com-20101015200655-xcn22gdoka0n4gys
2010-10-15 22:06:55 +02:00
Olivier Dony 77852d32b8 [IMP] osv,base: lint cleanup
bzr revid: odo@openerp.com-20101015140831-cavjcc640ardjbaz
2010-10-15 16:08:31 +02:00
Anup (OpenERP) acf5105783 [FIX] _read_flat() method corrected for multi
lp bug: https://launchpad.net/bugs/625898 fixed

bzr revid: ach@tinyerp.com-20101015134630-law0exawyhlyec30
2010-10-15 19:16:30 +05:30
Anup (OpenERP) f70f0d4520 [REVERT] A fix for orphan _inherits record for read() , better solution will be put soon.the fix may regress browse() with non-existent id
bzr revid: ach@tinyerp.com-20101015131902-ix4zgjjz60l8w8xd
2010-10-15 18:49:02 +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 88117959b5 [REM] base, workflow: removed res.roles object, replaced by dedicated res.groups
bzr revid: odo@openerp.com-20101013215340-jaiihef9chsym48z
2010-10-13 23:53:40 +02:00
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
Sébastien BEAU - http://www.akretion.com 22919bb1de [FIX]Speed improvement : Call of write() should go when there is vals
bzr revid: jvo@tinyerp.com-20101012192259-w3jbfm9ocb2zkr5m
2010-10-13 00:52:59 +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
Olivier Dony 86c87e1a37 [ADD] osv.perm_read: added XML ID (xmlid) to returned values - naming indicates this is not a m2o.
bzr revid: odo@openerp.com-20101011154314-sxdfqmeoxo5f91er
2010-10-11 17:43:14 +02:00
Anup,Jay 40ed04d094 [FIX] Expression : Corrected operator handling for domains containing Many2one fields
lp bug: https://launchpad.net/bugs/651999 fixed

bzr revid: jvo@tinyerp.com-20101006180432-mkaqstcuvakci7hq
2010-10-06 23:34:32 +05:30