Commit Graph

605 Commits

Author SHA1 Message Date
Quentin (OpenERP) 18b7592b8d [FIX] osv/orm: fixed the use of 'order' argument given to a search function in order to allow to order by 'ID DESC' and by '<another valid order> + ID ASC/DESC'
bzr revid: qdp-launchpad@openerp.com-20121121130736-guj7np9nk65zx3o1
2012-11-21 14:07:36 +01:00
Olivier Dony caa51abb34 [MERGE] fields_view_get: avoid messing up selection fields' _domain attributes, courtesy of Stefan Rijnhart (Therp)
lp bug: https://launchpad.net/bugs/1081092 fixed

bzr revid: odo@openerp.com-20121120132230-7xb6d2xxwcgn7ipn
2012-11-20 14:22:30 +01:00
Olivier Dony f0ef9bda04 [IMP] Model.default_get: allows setting user default values of x2m to False (for consistency with write())
bzr revid: odo@openerp.com-20121120131839-1kdzevubi74ibthy
2012-11-20 14:18:39 +01:00
Stefan Rijnhart d924cec182 [FIX] Append view domain (in case of selection widget) to a copy of the field's domain
lp bug: https://launchpad.net/bugs/1081092 fixed

bzr revid: stefan@therp.nl-20121120121936-8b1wiho0q96ckeqk
2012-11-20 13:19:36 +01:00
Christophe Matthieu 248f81277f [FIX] fields.html: behave as fields.text for empty values: store NULL
bzr revid: chm@openerp.com-20121119104332-bqm81nuik6pqsbf9
2012-11-19 11:43:32 +01:00
Thibault Delavallée 8b5a7c49a4 [REM] osv: removed temporary override of raise, added for debug purpose.
bzr revid: tde@openerp.com-20121114112021-trre94clvs8nuo43
2012-11-14 12:20:21 +01:00
Thibault Delavallée d52fdd0ab3 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20121112160536-63tx1u3c6yr2u8x9
2012-11-12 17:05:36 +01:00
Olivier Dony 2a1381a8af [FIX] orm: make sure superuser mode always bypasses access rules filtering - one case was not covered after recent refactoring
Caused by refactoring in rev.4200
revid:odo@openerp.com-20120618094327

bzr revid: odo@openerp.com-20121112120453-axiul7k6y0o67hgb
2012-11-12 13:04:53 +01:00
Xavier Morel be03940d64 [FIX] temperate error message in case of missing required field
The message worked (ish) for a missing field directly on the model,
but completely broke if the missing field was on an o2m and had the
same name as a field on the model, then it was complete
misinformation.

bzr revid: xmo@openerp.com-20121112084804-zcgtpml3a19uv909
2012-11-12 09:48:04 +01:00
Xavier Morel 35c44e7e20 [IMP] savepoint rollbacks after error transformation/logging of pg errors to still have original query on cursor
bzr revid: xmo@openerp.com-20121112084202-4nl94x2omlb4w2jr
2012-11-12 09:42:02 +01:00
Olivier Dony fd6946f24a [IMP] orm: make error handling more consistent when accessing deleted/filtered records
Previous behavior was unspecified and untested - leading to random results
when performing operations on a mix of deleted and ir.rule-filtered records.

The behavior is now clarified and explicitly tested.
One suprising case remains: read() on a deleted record
returns an empty result instead of raising an error,
in order to avoid spurious errors when a client
performs a sequence of search(), read() while
another user is deleting records.

bzr revid: odo@openerp.com-20121109171451-z2m6oqs910103lcz
2012-11-09 18:14:51 +01:00
Thibault Delavallée 62c419e66f [IMP] tools: mail: improved append_content_to_html, including plaintext2html. Updated tests.
bzr revid: tde@openerp.com-20121109123521-e04g4zrhtv947l1r
2012-11-09 13:35:21 +01:00
Xavier Morel 4a4fc38d5e [FIX] nuke ir.model.data caches before starting imports
Otherwise a previous validation (or 2) will poison the cache and the
import itself will fail even though the validation succeeeded (and
importing with no validation would have succeeded), as the orm cache
doesn't take DB rollbacks in account.

bzr revid: xmo@openerp.com-20121109113951-p3qgg6m5g7poay5e
2012-11-09 12:39:51 +01:00
Thibault Delavallée ee6e9894a4 [MERGE] Sync with server/trunk.
bzr revid: tde@openerp.com-20121107083807-12i51iax0imkhjf1
2012-11-07 09:38:07 +01:00
Olivier Dony 0357fddc61 [FIX] orm,web_services: properly return results of workflow triggers
bzr revid: odo@openerp.com-20121106181507-ss1w425c1omsn3sb
2012-11-06 19:15:07 +01:00
Thibault Delavallée 8a1a612fba [FIX] fields.py: html_sanitize now in mail file.
bzr revid: tde@openerp.com-20121106122758-iwyxmedgnznpjyna
2012-11-06 13:27:58 +01:00
Xavier Morel 18f885b10f [FIX] recursive conversion of o2ms in import
added new test cases from gkr

bzr revid: xmo@openerp.com-20121106084206-1cckepflh9h4g1yv
2012-11-06 09:42:06 +01:00
Xavier Morel f02c4266d6 [IMP] better logging during import failure
bzr revid: xmo@openerp.com-20121105100717-pqexs7j710s2ea2i
2012-11-05 11:07:17 +01:00
Raphael Collet 750ef9d931 [IMP] fields.related._fnct_read: small improvements
bzr revid: rco@openerp.com-20121105131712-sc70thn3wpyq6o7y
2012-11-05 14:17:12 +01:00
Raphael Collet 52c29ae1c0 [FIX] fields.related._fnct_read: fix handling of type many2one
bzr revid: rco@openerp.com-20121105094929-oz7trjzwlqw90499
2012-11-05 10:49:29 +01:00
Raphael Collet 401dd57f30 [MERGE] from trunk
bzr revid: rco@openerp.com-20121105083756-jdr9fxp32djpifqk
2012-11-05 09:37:56 +01:00
Raphael Collet db13e8591a [FIX] fields.related._fnct_write: handle the case where ids is a single id
bzr revid: rco@openerp.com-20121105082259-rcmcjs5n1eimtcpl
2012-11-05 09:22:59 +01:00
Divyesh Makwana (Open ERP) 8047c51575 [Merge] Merge with trunk.
bzr revid: mdi@tinyerp.com-20121102102812-qqaob1uo3aj8jpim
2012-11-02 15:58:12 +05:30
Olivier Dony 485e437440 [FIX] orm: _validate should not immediately rollback
For some obscure reason _validate used to immediately
rollback the current transaction as soon as a constraint
failed anywhere. This is completely incorrect and
violates the transaction abstraction: the responsibility
of creating and closing transactions belongs to the
RPC dispatch layer, or whatever takes its place (e.g. the
test setup/teardown for tests). Rolling back or committing
in the middle of a transaction precludes special
error treatment and can have very bad side effects.

bzr revid: odo@openerp.com-20121029180742-2gw08kobdh7w5njc
2012-10-29 19:07:42 +01:00
Raphael Collet 7e7d877e17 fields.related: simplify read and write methods
bzr revid: rco@openerp.com-20121029153504-157ss9948o86uv6z
2012-10-29 16:35:04 +01:00
Raphael Collet 42f0962f99 [MERGE] from trunk
bzr revid: rco@openerp.com-20121029153047-sd8i97sfkdy1wcb1
2012-10-29 16:30:47 +01:00
Purnendu Singh (OpenERP) 1a910d71d6 [IMP] added a comment line
bzr revid: psi@tinyerp.com-20121025062346-ud9m02ah4m9om1vf
2012-10-25 11:53:46 +05:30
Purnendu Singh (OpenERP) 6080eadb4b [MERGE]
bzr revid: psi@tinyerp.com-20121023071213-dd5mu9oce4s3vh9i
bzr revid: psi@tinyerp.com-20121025062105-tkhiybwv77tbqwpr
2012-10-25 11:51:05 +05:30
Quentin (OpenERP) e6e4e8d4c1 [REV] osv/orm: revert of a previous patch that was unifying the behavior for fields.related and fields.function at creation time because it's a bit dangereous to treat it right now, and may need the add of a new field attribute. "I'll be back", said the patch
bzr revid: qdp-launchpad@openerp.com-20121022123100-wwr7lnmpqebddxon
2012-10-22 14:31:00 +02:00
Quentin (OpenERP) 7c91102e87 [MERGE] trunk
bzr revid: qdp-launchpad@openerp.com-20121019121308-uwqg1em4hdn10xev
2012-10-19 14:13:08 +02:00
Mayur Maheshwari (OpenERP) cfaff8a85a [IMP]orm : improve multi tag when multi=true action display in tree and when flase action display in form
bzr revid: mma@tinyerp.com-20121019094303-p4mlf9oxlxhuvc48
2012-10-19 15:13:03 +05:30
Olivier Dony 361c0acd2a [FIX] expression: negative operators (e.g. NOT IN) where not working on o2m fields - tests added
bzr revid: odo@openerp.com-20121018124750-bkea51a7zkvwwygi
2012-10-18 14:47:50 +02:00
Quentin (OpenERP) 38067dffc9 [FIX] osv/orm: compute the _fct_inv() of stored functional fields at the record creation. Compute also the _fct_inv() of related fields (because there is no reason not to do it). That last patch revert a 'fix' of lp bug 544087 introduced in revision 4182, i don't get the purpose of it but that bug is not repdocutible anymore...
bzr revid: qdp-launchpad@openerp.com-20121017102821-tjx7gqiz86v7sn54
2012-10-17 12:28:21 +02:00
Vo Minh Thu 7878f9c7b6 [MERGE] babel: use babel for locale-aware read_group date formatting.
When grouping on a date or datetime field, read_group groups by (year, month),
and formats that pair to have a displayable result (as a group title).

This is currently done with strftime and the pattern `%B %Y` (complete word
month, long year), which is problematic as — at best — it uses the server's
locale for its formatting. This means if the server works in an english locale
e.g. russian users are going to see the month name in english, instead of their
own language.

This proposal makes use of `babel.dates.format_date`, which is locale-aware
(and to which a locale can be provided directly) and the locale present in the
request context to format the month, year pair according to the user's
language.

bzr revid: vmt@openerp.com-20121012144634-spaqze7d4jc8l00l
2012-10-12 16:46:34 +02:00
niv-openerp dcae3b64a3 [REVERT] removed server-side evaluation of field options
bzr revid: nicolas.vanhoren@openerp.com-20121011122214-ab1mqyz9h8jnq7ql
2012-10-11 14:22:14 +02:00
Xavier Morel 7a7876d4a8 [MERGE] from trunk
bzr revid: xmo@openerp.com-20121010154605-u16f57fnck148ued
2012-10-10 17:46:05 +02:00
Quentin (OpenERP) f4f3d6fa15 [REF] code review by odo
bzr revid: qdp-launchpad@openerp.com-20121010104220-nqi6c12ua7tnaejt
2012-10-10 12:42:20 +02:00
Quentin (OpenERP) 90fc4d6651 [IMP] use of literal_eval from ast instead of const_eval from tools, as per Olivier recommendation
bzr revid: qdp-launchpad@openerp.com-20121009152828-3bdxpatkrl1qmyfi
2012-10-09 17:28:28 +02:00
Quentin (OpenERP) c98de15a09 [IMP] osv/orm.py: evaluate in python the 'options' attribute of a field in an xml view, before enclosing it in json. This allow to use python instead of json syntax in the definition of the options of a widget, which is a much more consistent behavior
bzr revid: qdp-launchpad@openerp.com-20121009142607-rk3l00atu3w3kksp
2012-10-09 16:26:07 +02:00
Xavier Morel 510eea5305 [CHG] make empty cells clear out the corresponding field on import, rather than skip them
bzr revid: xmo@openerp.com-20121009092519-ge86yp3nnkqe9gic
2012-10-09 11:25:19 +02:00
Xavier Morel e8af13f0e8 [IMP] don't pass in a default lang to _get_source if no value is provided in the context, caught by odo
bzr revid: xmo@openerp.com-20121008133823-vhypgddiicztai3a
2012-10-08 15:38:23 +02:00
Xavier Morel 350d365ba0 [IMP] remove docstring for cr, uid following odo review
bzr revid: xmo@openerp.com-20121008131407-5hnxkn17lycfoqzu
2012-10-08 15:14:07 +02:00
Raphael Collet 4f235060a7 [MERGE] from trunk
bzr revid: rco@openerp.com-20121005124845-suonokozsufyicg2
2012-10-05 14:48:45 +02:00
Xavier Morel 601568f5f9 [FIX] don't import empty cells at all rather than set them to False, to allow defaults handling to do its job before actually creating the record
bzr revid: xmo@openerp.com-20121004064215-fqgir3ovmte2v438
2012-10-04 08:42:15 +02:00
Xavier Morel 1e4a677f05 [MERGE] from trunk
bzr revid: xmo@openerp.com-20121010154436-wz29sdkbs9vvhjba
2012-10-10 17:44:36 +02:00
Christophe Simonis b7e5519b4c [FIX] orm: handle fields.char() with not size correctly
bzr revid: chs@openerp.com-20121001153753-um68vpz1caojm17r
2012-10-01 17:37:53 +02:00
Christophe Simonis 5763e40506 [IMP] orm: remove trailing spaces
bzr revid: chs@openerp.com-20121001151421-vdfkzuf864rz8q20
2012-10-01 17:14:21 +02:00
Christophe Simonis 273904d103 [IMP] orm: be more vebose when accessing an invalid field of browse_record objects
bzr revid: chs@openerp.com-20121001150305-recozdvfc68wc766
2012-10-01 17:03:05 +02:00
Xavier Morel 84332d8aad [FIX] type error when providing a non-integer for a default database id
bzr revid: xmo@openerp.com-20121001130530-yf6pzuxdi3s09tji
2012-10-01 15:05:30 +02:00
Raphael Collet a6e30d305c [MERGE] from trunk
bzr revid: rco@openerp.com-20120928124403-aht90hi49yxwrcmz
bzr revid: rco@openerp.com-20121001073112-xbxdturd27bwscg1
2012-10-01 09:31:12 +02:00