Commit Graph

822 Commits

Author SHA1 Message Date
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
Ronald Portier 2747e5bef2 [FIX] Correct both age based as count based vacuum cleaning.
lp bug: https://launchpad.net/bugs/1009014 fixed

bzr revid: ronald@therp.nl-20121024140119-hv72ffxmf1gvf2sj
2012-10-24 16:01:19 +02:00
Paulius Sladkevičius d9c7febf49 Fixed sorting for m2o
bzr revid: paulius@hacbee.com-20121024100321-tqjm4pyk9y392qur
2012-10-24 13:03:21 +03:00
Ronald Portier d41a234599 [FIX] Fix vacuum cleaning both for time and count based cleaning,
adding a safeguard against cleaning recently used rows.

bzr revid: ronald@therp.nl-20121024072807-vsvhub1m0y3j5ude
2012-10-24 09:28:07 +02:00
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
Raphael Collet 0d878dc99e [FIX] orm: fix the method copy() when an 'inherits' field is given in parameter default
bzr revid: rco@openerp.com-20120928120202-6fbayrwb1iszwfwv
2012-09-28 14:02:02 +02:00
Xavier Morel 879886decd [ADD] some import doc
bzr revid: xmo@openerp.com-20120928091519-ksdprqdq0tpklggw
2012-09-28 11:15:19 +02:00
Xavier Morel aaff4459c4 [DOC] fixes and cleanups
bzr revid: xmo@openerp.com-20120928065654-jj3ot17dz8vd3wum
2012-09-28 08:56:54 +02:00
Xavier Morel def7e61901 [IMP] reimplement BaseModel.import_data on top of BaseModel.load
adapt tests to assert the corrected behavior of load instead of import_data's broken behavior

bzr revid: xmo@openerp.com-20120927154244-e56ygz2yytullg2l
2012-09-27 17:42:44 +02:00
Xavier Morel 87af7a6365 [FIX] replace warnings capture by explicitly returning a list of warnings from converters
makes converter code noisier, but ultimately simpler without having access to dynamically scoped variables

bzr revid: xmo@openerp.com-20120927144341-j1dx3e0epf3i5ja6
2012-09-27 16:43:41 +02:00
Xavier Morel 9d175bdfd6 [FIX] postgres 9.2 added data at the end of 23502's error message, only use prefix matches not fullstring
bzr revid: xmo@openerp.com-20120927095038-m2vm663nqj1s1pne
2012-09-27 11:50:38 +02:00
Olivier Dony bd31b7c553 [API/IMP] fields: cleanup field_to_dict + make @deprecated available in fields_get()
Renamed the m2m extra info keys, as their names
were quite confusing (third_table?), + removed
the "func_obj" key for function fields, as
it was a duplicate of the "relation" kay that
is already present for all relationship fields.
These renames should not break anything, as this
info should only be used for debug, but they still
constitute an API backwards-incompatible change.

bzr revid: odo@openerp.com-20120926130942-doauqgh6v35vhi29
2012-09-26 15:09:42 +02:00
Xavier Morel e61dc50934 [IMP] convert empty import fields to False values without going through converters
simplifies the converter methods by avoiding redundant emptiness checks

bzr revid: xmo@openerp.com-20120925155915-82p2s6stpww37p5n
2012-09-25 17:59:15 +02:00
Xavier Morel d5c69fa87e [FIX] use lists instead of iterators in BaseModel._extract_records
* although it does use an explicit external index, it turns out the
  code is less complex

* the rewrapping of (many) iterators on top of one another ended up
  blowing Python's stack during ``next`` calls, which Python does
  *not* like

* added a 900-ish import test file to check for these things

bzr revid: xmo@openerp.com-20120925135955-oielhopegnefyctm
2012-09-25 15:59:55 +02:00
Xavier Morel 359b4a44aa [ADD] ability to convert postgres error messages to human-readable ones
also convert 'violates not-null constraint' to something about fields being required

bzr revid: xmo@openerp.com-20120925100232-bfmxcxda65cki5kv
2012-09-25 12:02:32 +02:00
Xavier Morel 9f2e7ba7ef [IMP] return a dict from Model.load for easier future extensibility (if needed) rather than a tuple.
also easier/cleaner to unpack on the JS side

bzr revid: xmo@openerp.com-20120924151502-4robe639ctpuvb94
2012-09-24 17:15:02 +02:00
Xavier Morel f143902d1a [IMP] allow converters to add data to import messages, formalize message keys
bzr revid: xmo@openerp.com-20120924150417-c2y7g7vdsfz66363
2012-09-24 17:04:17 +02:00
Xavier ALT c24639180a [FIX] OPW 575909: orm: fix order_by for special 'id' field not respecting order direction
bzr revid: xal@openerp.com-20120924140007-rnsw4nw8owzqx4ia
2012-09-24 16:00:07 +02:00
Xavier Morel 877e21ffde [IMP] return fields_get-style translated field strings (if available) in user-readable warning and error messages from import, rather than logical field names
bzr revid: xmo@openerp.com-20120924105230-1b7157xbruy2e5zr
2012-09-24 12:52:30 +02:00
olt@tinyerp.com 649cf2e677 [FIX] fixed message format (wrong number of arguments)
bzr revid: olt@tinyerp.com-20120920145519-j842fb8woer25p8i
2012-09-20 16:55:19 +02:00
Xavier Morel 9805c665c8 [ADD] big bit on new import: pretty much everything but o2m
bzr revid: xmo@openerp.com-20120919114047-w4paoim95oxr91zb
2012-09-19 13:40:47 +02:00
Odowan Kenobi 4b896c36af [REF] allow to intercept the signals sent to workflows (through buttons) in objects. This is done by adding a function named _workflow_signal() in orm that can be inherited in dedicated objects. Courtesy from Olivier Dony
bzr revid: qdp-launchpad@openerp.com-20120918130436-ll7potrsya23lc36
2012-09-18 15:04:36 +02:00
Antonin Bourguignon d6c4049865 [FIX] fields_get check_access_right
bzr revid: abo@openerp.com-20120913144641-ybtrvd4vyf7nfium
2012-09-13 16:46:41 +02:00
Olivier Dony 423aca905a [IMP] translations: attempt to optimize out _get_source calls when there is not context lang
bzr revid: odo@openerp.com-20120912142229-ir3h1z0yau09ivvw
2012-09-12 16:22:29 +02:00
Stephane Wirtel 5acd867264 [MERGE] set the write_uid, write_date for the create
bzr revid: stw@openerp.com-20120912102759-di842t8uzzmm2f21
2012-09-12 12:27:59 +02:00
Stephane Wirtel c735a2c0ec [MERGE] report & netrpc protocol: Use the cPickle 2.0 protocol and clean the code of report
bzr revid: stw@openerp.com-20120911091836-ac0wdxqslcwwbku6
2012-09-11 11:18:36 +02:00
Stephane Wirtel f55028de4d [MERGE] server: remove unused imports (Thanks to Florent Xicluna)
bzr revid: stw@openerp.com-20120910144609-ad3gupkf3oseb8yy
2012-09-10 16:46:09 +02:00
Raphael Collet cbcfe23802 [IMP] orm: simplify method definition
bzr revid: rco@openerp.com-20120907151016-fj7l6nt6uffxmdgh
2012-09-07 17:10:16 +02:00
Raphael Collet 5feea1cfa8 [MERGE] from trunk
bzr revid: rco@openerp.com-20120907150534-eyj92gtq40c83e3v
2012-09-07 17:05:34 +02:00
Raphael Collet 67003bd76f [FIX] method resolve_2many_commands and its tests
bzr revid: rco@openerp.com-20120907122857-4dro8up51ypx0cr5
2012-09-07 14:28:57 +02:00
Raphael Collet 8c8e128d21 [FIX] orm: fix wrong method name
bzr revid: rco@openerp.com-20120907093337-jvg72kp572dj110z
2012-09-07 11:33:37 +02:00
Fabien Pinckaers 2c63d43c36 fix
bzr revid: fp@tinyerp.com-20120906162528-553xac78vjg9h850
2012-09-06 18:25:28 +02:00
Fabien Pinckaers a43f4e1419 [IMP] folded columns in read_group
bzr revid: fp@tinyerp.com-20120906161719-k4r56bgbso6rprtu
2012-09-06 18:17:19 +02:00
Raphael Collet f4945c2fc7 [IMP] orm: fix and generalize method resolve_o2m_commands_to_record_dicts (now named resolve_2many_commands)
bzr revid: rco@openerp.com-20120906144836-v2ye3o8n12iir84b
2012-09-06 16:48:36 +02:00
Olivier Dony a4f30bf11f [IMP] fields: review/simplify patch for callable domains on fields.one2many
bzr revid: odo@openerp.com-20120905231232-u6dx3ak9b0y95zvl
2012-09-06 01:12:32 +02:00
Olivier Dony 8e96d71bf3 [MERGE] sync with trunk
bzr revid: odo@openerp.com-20120905072646-m4269m97ej1oicoq
bzr revid: odo@openerp.com-20120905220158-ulg8jy5alny97ff3
2012-09-06 00:01:58 +02:00
Thibault Delavallée 95837af09c [IMP] ir.needaction: made the model Abstract. Fixed a bug when inheriting from AbstractModels: _auto (to create a database for the model) was not correctly set.
bzr revid: tde@openerp.com-20120904103242-o6ky20u9gvhu0t3u
2012-09-04 12:32:42 +02:00
Thibault Delavallée 12294252d4 [MERGE] Merged with server/trunk.
bzr revid: tde@openerp.com-20120903081949-ucy4e1kpbb30dhko
2012-09-03 10:19:49 +02:00
Raphael Collet 7c1e4b18b0 [MERGE] from trunk
bzr revid: rco@openerp.com-20120831144818-2jl7ww2pwmp4jk4v
2012-08-31 16:48:18 +02:00
Stephane Wirtel b3988436cb [REF] Replace the user id 1 by openerp.SUPERUSER_ID
bzr revid: stw@openerp.com-20120831135309-o4plzf5wp0kyuzgf
2012-08-31 15:53:09 +02:00
Xavier ALT 8ce989c700 [FIX] OPW 577292: orm: force computing store values for all columns on unlink()
bzr revid: xal@openerp.com-20120826202655-e28mcrpof6iss1bk
2012-08-26 22:26:55 +02:00
Xavier ALT f94cea4b2d [FIX] OPW 577292: orm: fix _store_get_values() when requested for empty fields (unlink case)
bzr revid: xal@openerp.com-20120824140336-1kfwa517y8m1qmh8
2012-08-24 16:03:36 +02:00
Fabien Pinckaers e46c8e43ff [IMP] Removing a bad practice:
- what happens if you overwrite check_read and modules calls check_access_rights ?
  - 5 methods to learn to understand the API insead of one

bzr revid: fp@tinyerp.com-20120822103725-vdubhkzlake2jyvo
2012-08-22 12:37:25 +02:00
Fabien Pinckaers f21f1a68aa fix
bzr revid: fp@tinyerp.com-20120820132909-iw8faaon2z4c5e77
2012-08-20 15:29:09 +02:00
Fabien Pinckaers 64dc05afc6 fix
bzr revid: fp@tinyerp.com-20120820132501-7724jwavhzan3xyp
2012-08-20 15:25:01 +02:00
Fabien Pinckaers 1bd841d101 fix
bzr revid: fp@tinyerp.com-20120820131921-7ydvs9x784t4hn4l
2012-08-20 15:19:21 +02:00
Fabien Pinckaers 0d5a185956 fix
bzr revid: fp@tinyerp.com-20120820131726-7iassml4p93z7qsg
2012-08-20 15:17:26 +02:00
Fabien Pinckaers a054299277 imp
bzr revid: fp@tinyerp.com-20120820110455-jelu0xl7jil36q18
2012-08-20 13:04:55 +02:00
Fabien Pinckaers 6021b4473a [IMP] message_read on mail.message
bzr revid: fp@tinyerp.com-20120820105252-o1eqy5yfqb66hga9
2012-08-20 12:52:52 +02:00
Fabien Pinckaers 03f4b992ad [IMP] need action & mails
bzr revid: fp@openerp.com-20120819145928-5bw5lo6dn4ni4gl7
2012-08-19 16:59:28 +02:00
Jigar Amin - OpenERP 9aca3bac8b [REF/IMP] refectorec the varibale names and added the gantt view, added create ndoe button diable condition
bzr revid: jam@tinyerp.com-20120816125706-h92owusp47t6chl1
2012-08-16 18:27:06 +05:30
Jigar Amin - OpenERP 9698fadbb3 [MERGE] lp:openobject-server
bzr revid: jam@tinyerp.com-20120816041259-kcqcy66o2o57m3r4
2012-08-16 09:42:59 +05:30
Thibault Delavallée 65ef813eb0 [MERGE] Merged with main server.
bzr revid: tde@openerp.com-20120815193149-k1ue0t3i035gvyu9
2012-08-15 21:31:49 +02:00
niv-openerp 1885387ace [IMP] added html field
bzr revid: nicolas.vanhoren@openerp.com-20120814130656-4pa91mud8u30mqr5
2012-08-14 15:06:56 +02:00
Thibault Delavallée c9fda0b13a [MERGE] Merged with server/trunk.
bzr revid: tde@openerp.com-20120813181359-s0hhsdp6ev7dtznr
bzr revid: tde@openerp.com-20120814114047-z3guxfe9zxmsrk46
2012-08-14 13:40:47 +02:00
Thibault Delavallée e4185c910f [FIX] orm deprecated: added a list cast because we may receive tuples (as seen on runbot).
bzr revid: tde@openerp.com-20120814094142-b79hn5xgduhc7w15
2012-08-14 11:41:42 +02:00
Thibault Delavallée 7c0a0a0158 [MERGE] Merged with server/trunk.
bzr revid: tde@openerp.com-20120810073318-gcgnj16e02qvg0y3
bzr revid: tde@openerp.com-20120814090328-seyvug8zdagbdm0o
2012-08-14 11:03:28 +02:00
Thibault Delavallée d3ed214101 [MERGE] Merged with last server/trunk to avoid issues with default data.
bzr revid: tde@openerp.com-20120810104044-97advtdk1yvr3262
bzr revid: tde@openerp.com-20120813115658-bcvr2kxx4qjyhndg
bzr revid: tde@openerp.com-20120813144204-ub5wp428tdnemalx
2012-08-13 16:42:04 +02:00
niv-openerp 11780a2267 Added some code to sanitize html
bzr revid: nicolas.vanhoren@openerp.com-20120813125307-d8cycdvtd7ad0f8e
2012-08-13 14:53:07 +02:00
niv-openerp 7341bd30cc Added html field type
bzr revid: nicolas.vanhoren@openerp.com-20120813114619-lqr9zu0rkz6737rp
2012-08-13 13:46:19 +02:00
Vo Minh Thu a9ea1b59e3 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120813101801-snnnxk6p8d9634al
2012-08-13 12:18:01 +02:00
Vo Minh Thu 5e0f709410 [IMP] views: allow create/delete/edit attribte on form/tree/kanban views, automatically set the attributes from access rights.
bzr revid: vmt@openerp.com-20120813091047-vqjk3an52dfzbhqe
2012-08-13 11:10:47 +02:00
Vo Minh Thu d1d6203f4f [FIX]: orm: reverted a change in a previous commit (where a try/except was removed).
bzr revid: vmt@openerp.com-20120810120936-13lewpbjn7euveg0
2012-08-10 14:09:36 +02:00
Thibault Delavallée 8fef0b9a57 [IMP] Removed unnecessary conditions.
bzr revid: tde@openerp.com-20120810073242-5nc7h84x9r17kabl
2012-08-10 09:32:42 +02:00
Thibault Delavallée a82ae8d83e [CLEAN] Removed unnecessary \(.
bzr revid: tde@openerp.com-20120809144526-8mhbrr56mfjodygq
2012-08-09 16:45:26 +02:00
Thibault Delavallée 5ce0720b75 [IMP] fields: many2many: extracted query generation, to ease overrides.
bzr revid: tde@openerp.com-20120809144203-sm93gsl2db608z85
2012-08-09 16:42:03 +02:00
Thibault Delavallée 87625fd742 [IMP] deprecated feature: added protection against read/write on non-existing columns. The ORM already throws warnings, no need to crash in addition :) .
bzr revid: tde@openerp.com-20120809120926-ngl31imcggzz9wzt
2012-08-09 14:09:26 +02:00
Thibault Delavallée 90c695d141 [FIX] f -> field
bzr revid: tde@openerp.com-20120809084148-a3wf9cihllhhmo82
2012-08-09 10:41:48 +02:00
Thibault Delavallée 616e7a92ec [IMP] orm: added a deprecated attribute on fields. If not False, is a string, and make the ORM print a warning telling the field is deprecated.
Use: 'my_field': fields.char('Old field', size=64, deprecated="This field will be removed as of version 42 of OpenERP. Please update your module to use 'my_new_field' instead.")

bzr revid: tde@openerp.com-20120809083103-pjc9ynvmtojnfnah
2012-08-09 10:31:03 +02:00
Xavier Morel b4d532f7d6 [MERGE} from trunk
bzr revid: xmo@openerp.com-20120808113035-ym4zuqisnofv129s
2012-08-08 13:30:35 +02:00
Xavier Morel 346397530d [FIX] weird dict.update calls
bzr revid: xmo@openerp.com-20120806132731-ck4usrs99qlh1pq9
2012-08-06 15:27:31 +02:00
Antony Lesuisse 67a9ddd3f8 [REM] fields float integer useless warning, required can be used to color the field in blue on form view
bzr revid: al@openerp.com-20120806104514-3cx1dm2bewhmlvbo
2012-08-06 12:45:14 +02:00
Olivier Dony eb0a178196 [MERGE] name_get: support more field types and improve previous name_get changes
Introduces an improved name_get implementation,
supporting a few more fields type used as _rec_name
(such as many2one). The actual rendering of the
"display name" is delegated to the column class,
and computed based on the value returned by read()
for the column.

Funky @classmethod stuff was necessary to allow
column types to delegate to other types, such as
function types which can delegate to the real
type they emulate.

The display_name term was used because it is
being discussed for the new API to add a virtual
display_name column to all models, allowing
clients to read the name_get value along with
regular columns. It looks appropriate too.

Also fixes a few shortcomings of the latest
patches to name_get, such as supporting inherited
columns and avoiding a useless read() call with
only the id column.

bzr revid: odo@openerp.com-20120803142952-8jefy3bsgftucxuk
2012-08-03 16:29:52 +02:00
Olivier Dony da9ccf503a [FIX] fields.reference: missing coercion to int for res_id, as pointed out by XMO
bzr revid: odo@openerp.com-20120803134111-jrzrszqobm0r02on
2012-08-03 15:41:11 +02:00
Vo Minh Thu ddaadd1398 [FIX] orm: disallow LOG_ACCESS fields in the create() method.
Removes the LOG_ACCESS fields from the values given to create(),
otherwise we would end up passing two times the same field to
postgresql.

bzr revid: vmt@openerp.com-20120803094800-81cgwyeg5cmud9mj
2012-08-03 11:48:00 +02:00
Olivier Dony bc70c8711b [IMP] name_get: support more field types and improve previous name_get changes
bzr revid: odo@openerp.com-20120802170244-t1z5gogwgybtavrm
2012-08-02 19:02:44 +02:00
Xavier Morel ef26faf0a5 [IMP] add more information when searching on a non-searchable field using debug logging
bzr revid: xmo@openerp.com-20120802152553-r8xpw0g6bep08jod
2012-08-02 17:25:53 +02:00
Xavier Morel 8060f19108 [IMP] error-level log when non-stored function field without fnct_search is searched
holding off on blowing up an error just yet, but it might be a good idea in the end

bzr revid: xmo@openerp.com-20120802150837-3qvgg3e5pmfeqmk0
2012-08-02 17:08:37 +02:00
Vo Minh Thu 6aef95b5c2 [MEOW] lolcat crazy ninja fix in the branch, take two!
bzr revid: vmt@openerp.com-20120801080155-8qhg3aqkay2rrmbt
2012-08-01 10:01:55 +02:00
Vo Minh Thu 171500f171 [MAOW] lolcat ninja fix in the branch, yaoh!
bzr revid: vmt@openerp.com-20120801075024-mpc4seluumaa33ph
2012-08-01 09:50:24 +02:00
Antony Lesuisse 42859212fa [FIX] typos and vmt review
bzr revid: al@openerp.com-20120731152649-4mxph7d0cnlaqtef
2012-07-31 17:26:49 +02:00
Antony Lesuisse 4811011c76 [FIX] typo
bzr revid: al@openerp.com-20120731151718-g0fk33ycoapob13j
2012-07-31 17:17:18 +02:00
Antony Lesuisse 8540dcf017 [FIX] assertion message
bzr revid: al@openerp.com-20120731122557-9ka14pw09x2fhmos
2012-07-31 14:25:57 +02:00
Antony Lesuisse d375ee272e [FIX] rec_name assertion and fallback
bzr revid: al@openerp.com-20120731120621-11j7k7965d9sclp2
2012-07-31 14:06:21 +02:00
Antony Lesuisse 09fe39c0b6 [IMP] rec_name assertion and fallback
bzr revid: al@openerp.com-20120731110845-nt11isvr96tuc207
2012-07-31 13:08:45 +02:00
Xavier Morel fc36345ca0 [ADD] test cases for export of simple fields
bzr revid: xmo@openerp.com-20120723150306-6zgtr9ho0d3ud78u
2012-07-23 17:03:06 +02:00
Xavier Morel ce02c0887a [IMP] coerce 'falsy' char sizes to None
Otherwise users using fields.char(size=False) will see their content disappear without warning, not cool

bzr revid: xmo@openerp.com-20120723140502-nrtgw0o47ewj25qa
2012-07-23 16:05:02 +02:00
Xavier Morel 8b0f8a0992 [IMP] replace equality None test by identity test
bzr revid: xmo@openerp.com-20120723135215-7n63uh4ikulsdc6r
2012-07-23 15:52:15 +02:00
Xavier Morel 3b5890d79b [REM] redundant code: a field of type one2many will always have _type one2many
bzr revid: xmo@openerp.com-20120723135113-6x3s5lmljk8cdpf0
2012-07-23 15:51:13 +02:00
Xavier Morel 8bdd730090 [REM] orm: pointless character replacement of quotes by spaces in field strings
bzr revid: xmo@openerp.com-20120723135022-9lh5yyk0au5xag3l
2012-07-23 15:50:22 +02:00
Xavier Morel c5db4ca91d [IMP] field.char: make string and size optional
* Increases coherence with other fields (default string is 'unknown')
* Char fields defaut to unbounded, bounds are optional

bzr revid: xmo@openerp.com-20120723134931-b5moeenk0db5m2ss
2012-07-23 15:49:31 +02:00
Vo Minh Thu 392b094d9b [FIX] column._domain is now copied instead of being extended in-place.
This commit removes a bug which causes the _domain attribute on the column class to
grow as the fields_get() is repeatedly called.

For instance, displaying the Customer Invoice views (on account.invoice) repeatedly
by switching between the list and form views and causing a full page refresh
(e.g. with ctrl-shift-r) makes the period_id field _column attribute to grow.

Variable aliasing and mutability are so kewl :)

bzr revid: vmt@openerp.com-20120713125728-yhegsthi7jaxi5gc
2012-07-13 14:57:28 +02:00
Olivier Dony 2611c22efe [FIX] orm: make sure all *Model classes define _auto,_register,_transient
This is required to avoid strange mro() pitfalls
where an AbstractModel is inherited by a Model,
and the _auto=False of AbstractModel ends up
first in the mro() because Model does not explicitly
define it, and the BaseModel default _auto is farther
in the mro().

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

bzr revid: odo@openerp.com-20120621100900-xejo9yhgx36kyh03
2012-06-21 12:09:00 +02:00
tfr@openerp.com cd3879f107 [FIX] fields.many2many : Always respect destination table order
bzr revid: tfr@openerp.com-20120619151651-fokfu5gkfk3qfhxs
2012-06-19 17:16:51 +02:00
Ravi Gohil (Open ERP) 0ac2831f33 [FIX] ORM: _order = 'id desc' doesn't work : (Maintenance Case : 575909)
bzr revid: rgo@tinyerp.com-20120618085549-ynx3dx6wg0amu12g
2012-06-18 14:25:49 +05:30
Olivier Dony e12ed00e4f [FIX] read_group: empty `groupby` case broken by last read_group patch
Revision 4201 broke the case where groupby == []
by mistake.
r.4201 = rev-id odo@openerp.com-20120609010549-xdktw6xte7fmxjbq

bzr revid: odo@openerp.com-20120615131427-daf5kd5s17my8gnb
2012-06-15 15:14:27 +02:00
Olivier Dony 6da2d94357 [FIX] read_group: remove prohibitive n^2 operations, could freeze the server on large group_by results
This patch replaces two O(n^2) operations, one 
filter and one sort, with O(n) or better operations.
It takes slightly more memory due to the use of
one extra data copy, but takes virtually no time
to process even with 600k result lines, whereas
the previous code would just freeze the server
for a long time.

bzr revid: odo@openerp.com-20120609010549-xdktw6xte7fmxjbq
2012-06-09 03:05:49 +02:00
Olivier Dony fe39e36f35 [FIX] export_data: avoid access error while auto-generating external IDs during export
bzr revid: odo@openerp.com-20120608213018-9oe5wvtn8egp30zm
2012-06-08 23:30:18 +02:00
Fabien Pinckaers a7071dcf1a [FIX] whitespace lost in translation
bzr revid: fp@tinyerp.com-20120702162022-oltxv9owxhs9ubjj
2012-07-02 18:20:22 +02:00
Raphael Collet 8e36512e97 [IMP] orm translations: improve variable names
bzr revid: rco@openerp.com-20120702072424-n402jjf4vfi2357p
2012-07-02 09:24:24 +02:00
Xavier Morel 03e56ea7b6 [FIX] using the newly translated string might be a better idea than putting the old one again
todo: stop committing at 9AM, still not woken up

bzr revid: xmo@openerp.com-20120702071841-h0th114l87iphsty
2012-07-02 09:18:41 +02:00
Xavier Morel d5bd3aff48 [FIX] stupid
bzr revid: xmo@openerp.com-20120702070945-i2dqvjsi2cwf9w7s
2012-07-02 09:09:45 +02:00
Xavier Morel dee93136d1 [IMP] massage all translatable attributes in a loop instead of copy/pasting a billion versions
bzr revid: xmo@openerp.com-20120702063511-o3nrikklzgubkals
2012-07-02 08:35:11 +02:00
Fabien Pinckaers ed4c342d9c [IMP] Translations of static terms in views
bzr revid: fp@tinyerp.com-20120628141632-ghixqjf59jodqgx4
2012-06-28 16:16:32 +02:00
Antony Lesuisse 453a1350fe [MERGE] trunk
bzr revid: vmt@openerp.com-20120620122005-2rghps6qjjkozt3n
bzr revid: al@openerp.com-20120627103900-0kgtskgipdazmgy9
2012-06-27 12:39:00 +02:00
Antony Lesuisse 1624d47aeb [MERGE] placeholder translation
bzr revid: al@openerp.com-20120627103106-wclqfoesq9b2subb
2012-06-27 12:31:06 +02:00
Vo Minh Thu 877ec2d7a8 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120619132718-ag1j3itm69u8h419
2012-06-19 15:27:18 +02:00
Olivier Dony 34965058ec [IMP] access rights: improve error messages for ACLs and record rules
bzr revid: odo@openerp.com-20120615153414-w4p4iczhl6lli50u
2012-06-15 17:34:14 +02:00
Vidhin Mehta (OpenERP) 67af184b8c [IMP]translate placeholders.
bzr revid: vme@tinyerp.com-20120612120205-2ehz22nlhxsq3245
2012-06-12 17:32:05 +05:30
Olivier Dony 31b9bee006 [IMP] orm: improved @version spec validation for inherited views
bzr revid: odo@openerp.com-20120611173132-3ioptod9jwxttopc
2012-06-11 19:31:32 +02:00
Fabien Pinckaers b1ab584317 [merge] trunk
bzr revid: fp@tinyerp.com-20120610081834-lwt8ffvniuxddn3c
2012-06-10 10:18:34 +02:00
Fabien Pinckaers 56288e88dc [IMP] removing select=? and adding version=7
bzr revid: fp@tinyerp.com-20120609124045-sbopsbiiffcnjzfv
2012-06-09 14:40:45 +02:00
Olivier Dony 484cf746a5 [FIX] orm: remove unused `module` parameter when creating constraints
This argument was not always present in the context
(e.g when _auto_init is invoked for newly created
custom fields via ir.model.field.create()), and was
thus preventing the creation of custom fields.
It was currently unused, and may be reintroduced
soon after the cleanup of model metadata storage.

bzr revid: odo@openerp.com-20120606141908-bdqxsarfb61yfw8m
2012-06-06 16:19:08 +02:00
Olivier Dony 14a6cd841f [FIX] OPW 575395: orm: don't defer function field computation during creation of parent records (inheritS)
An optimization in the set() method of o2m fields
disables the direct computation of function fields
in order to avoid computing them line-by-line.
This is done with context key 'no_store_function',
and deferred at the end of the caller write() or
create() method.
This was unfortunately disabling all function fields
in parent model (via _inheritS) at the time of
creation, even though those were *not* batch-computed
at the end.
The patch removes the 'no_store_function' field in
the context that is passed to inheritS parents during
creation, as it was never meant to be passed.

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

bzr revid: odo@openerp.com-20120604114536-4t6ulwl93zalfgr7
2012-06-04 13:45:36 +02:00
Vo Minh Thu 9f46071958 [IMP] uninstall: added some docstrings.
bzr revid: vmt@openerp.com-20120601154544-e9a9cox7fcyd411m
2012-06-01 17:45:44 +02:00
Vo Minh Thu eadd5e0a0a [IMP] uninstall: use a dedicated table for many2many relationships instead of overlaoding ir.model.data.
bzr revid: vmt@openerp.com-20120601153449-uj2sl7qjzz3s7xnj
2012-06-01 17:34:49 +02:00
Vo Minh Thu d790650bfb [IMP] uninstall: use dedicated table instead of overloading ir.model.data.
bzr revid: vmt@openerp.com-20120601131414-880vmpctmjfxl84f
2012-06-01 15:14:14 +02:00
Vo Minh Thu 5df4aa8cca [IMP] uninstall: started test module, added new ir_model_constraint table.
bzr revid: vmt@openerp.com-20120531160140-tutjw76tp0u5hipo
2012-05-31 18:01:40 +02:00
Olivier Dony 7af2e71817 [FIX] fields: remove leftover print statement from r.4160
bzr revid: odo@openerp.com-20120521073851-0e9k8ujhexysg95v
2012-05-21 09:38:51 +02:00
Fabien Pinckaers 0a7c943856 [IMP] improved kanban view of modules
bzr revid: fp@openerp.com-20120519081408-vugv7qgzsqtlssj0
2012-05-19 10:14:08 +02:00
Olivier Dony dbe7b45276 [IMP] orm: support model-level @groups attribute for access restriction
This is a partial implementation with no support for
restricting read/write access via RPC. This first
part only covers the removal of the restricted fields
from the client-side view, i.e. in the results of
fields_view_get() and fields_get().

The second part will come later and will cover the
real low-level access control.

bzr revid: odo@openerp.com-20120518143625-ps9db62vzrc2pylh
2012-05-18 16:36:25 +02:00
Olivier Dony bec50b5df9 [IMP] orm: all workflow trigger calls in common method for increased flexibility
bzr revid: odo@openerp.com-20120504151327-iib0qtvy3d79xgig
2012-05-04 17:13:27 +02:00
Xavier Morel 931c237686 [FIX] previous fix: actual module should be __builtin__
apparently we do weird things with __builtins__, on my machine it's consistently an alias to the __builtin__ importable module, but in the server it's a dict

bzr revid: xmo@openerp.com-20120419130245-ael83wc5h310m38s
2012-04-19 15:02:45 +02:00
Xavier Morel 8f5c30c7e9 [FIX] really convert to float when trying to convert to float
might work better than converting to a float field

bzr revid: xmo@openerp.com-20120419115504-2tic6l0qjb8zlhuh
2012-04-19 13:55:04 +02:00
msh-openerp 22681ae55f [FIX]Fixed the issue of translation for node which has avg.
bzr revid: msh@tinyerp.com-20120419040409-ecj6vxddibt9l5vu
2012-04-19 09:34:09 +05:30
Thibault Delavallée c1a4f1f8db [IMP] Updated code (see odo/vmt review). Also removed record_ids storage in menus, to avoid passing too much data to the client.
bzr revid: tde@openerp.com-20120418090735-e5ewk3wcf7bp0bvu
2012-04-18 11:07:35 +02:00
Antony Lesuisse ee747dc954 embbded kanban view
bzr revid: al@openerp.com-20120410134813-c0potdev7a1i63tf
2012-04-10 15:48:13 +02:00
Thibault Delavallée dc698712ff [FIX] Fixed last fix.
bzr revid: tde@openerp.com-20120405133614-6ol9zrqc1t4g3air
2012-04-05 15:36:14 +02:00
Thibault Delavallée d3f9e33222 [FIX] orm: needaction: Added missing local dict with some values in domain evaluation
bzr revid: tde@openerp.com-20120405110815-g9u7yr7gs5o8s28k
2012-04-05 13:08:15 +02:00
Thibault Delavallée 6fdeb5ec98 [MERGE] Merged with main server, holding the need_action mechanism
bzr revid: tde@openerp.com-20120403171512-pb7l4g6pnqryxudm
2012-04-03 19:15:12 +02:00
Thibault Delavallée 90e1433157 [IMP] Removed unused import; added forgottent context to search.
bzr revid: tde@openerp.com-20120403160725-lprixelmtx5cq87l
2012-04-03 18:07:25 +02:00
Thibault Delavallée aa0205c849 [REF] Cleaned model and code: removed classmethods, moved some code to needaction_users, cleaned models.
bzr revid: tde@openerp.com-20120403145426-gjhdwhxb44bme8mi
2012-04-03 16:54:26 +02:00
Thibault Delavallée e12dff66de [MERGE] Merged with fix from need_action branch
bzr revid: tde@openerp.com-20120403074906-1m4yjhz60i9f5tsk
bzr revid: tde@openerp.com-20120403075529-nyp3tq6xafig088w
2012-04-03 09:55:29 +02:00
Thibault Delavallée 157506ef69 [FIX] id instead of ids in domain
bzr revid: tde@openerp.com-20120403075434-585pd5j93jeurelr
2012-04-03 09:54:34 +02:00
Thibault Delavallée 5959157cc5 [REM] Removed res.log feature in ORM. However, the res.log table stays, because it is still used notably in publisher_warranty, that must be checked to see how it should be updated with OpenChatter.
bzr revid: tde@openerp.com-20120402114746-unxkhxutivx2hp7f
2012-04-02 13:47:46 +02:00
Thibault Delavallée 4ba7d34a4a [MERGE] Merged with main server
bzr revid: tde@openerp.com-20120402111047-p3kxej7p90qw0dxa
2012-04-02 13:10:47 +02:00
Thibault Delavallée ecb5b81933 [IMP] Small code cleaning
bzr revid: tde@openerp.com-20120402084526-il0wh3urnemb019g
2012-04-02 10:45:26 +02:00
Thibault Delavallée c4333fe170 [FIX] Added missing item in return
bzr revid: tde@openerp.com-20120402083605-cb5w8sxtxcpexwry
2012-04-02 10:36:05 +02:00
Thibault Delavallée e734648206 [ADD] Added 'needaction_record_ids' field to menu: ids of record requesting the user to perform an action.
bzr revid: tde@openerp.com-20120402083517-1kzxxylr6niczhgw
2012-04-02 10:35:17 +02:00
Thibault Delavallée 8c2b07bf76 [REF] Cleaned ir.needaction code and documentation.
bzr revid: tde@openerp.com-20120402081826-016k0ecbjz3fqnps
2012-04-02 10:18:26 +02:00
Thibault Delavallée 5fd95c5769 [MERGE] Merged with main server
bzr revid: tde@openerp.com-20120402071259-pot0kr7yrkdcd2wj
2012-04-02 09:12:59 +02:00
Olivier Dony 34e240f60d [MERGE] Latest trunk
bzr revid: odo@openerp.com-20120331010335-mya7wowc10dhipxu
2012-03-31 03:03:35 +02:00
Olivier Dony 74ed36e416 [IMP] orm,ir.model: improve registration and deletion of schema ext_ids
Also handle the very common cases of inheriting classes
that must *not* trigger deletion of the m2m tables and
constraints of their parent classes!

bzr revid: odo@openerp.com-20120331004215-413lcxaxvg0u6oxw
2012-03-31 02:42:15 +02:00
Thibault Delavallée 94075df78e [DOC] Added comments.
bzr revid: tde@openerp.com-20120330102419-n2co6dwf00q0muue
2012-03-30 12:24:19 +02:00
Thibault Delavallée 3ee9f70343 [IMP] Renamed added fields. Added comments and improved help.
bzr revid: tde@openerp.com-20120330101929-18opxctcz1eeyl4u
2012-03-30 12:19:29 +02:00
Quentin (OpenERP) b1a29c5a6a [REF] base: small refactoring of things related to the merge of res.partner and res.partner.address
bzr revid: qdp-launchpad@openerp.com-20120329114331-hmlld7fxlw6sh1ks
2012-03-29 13:43:31 +02:00
Quentin (OpenERP) 808e441390 [MERGE] merged the main server code
bzr revid: qdp-launchpad@openerp.com-20120329111943-wt81xc8if89rpy4w
2012-03-29 13:19:43 +02:00
Thibault Delavallée 8196c9e1b1 [REF] Refactored needaction mechanism. Added functional fields in ir.ui.menu so the web client only has to manage the values.
bzr revid: tde@openerp.com-20120328163549-4g3dc5mwdagenrq1
2012-03-28 18:35:49 +02:00
Olivier Dony 63f3c4e988 [MERGE] Latest trunk
bzr revid: odo@openerp.com-20120326182926-5kjps7hjxb17rju8
2012-03-26 20:29:26 +02:00
Samus Aran 25e699d72d [IMP] Creating new row in db also update write_date and write_uid
bzr revid: cto@openerp.com-20120323150850-26j5ht8eexue86sh
2012-03-23 16:08:50 +01:00
Vo Minh Thu 634a1090e0 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120323111750-jwvm1m533x2qc25t
2012-03-23 12:17:50 +01:00
Vo Minh Thu 05422654b6 [IMP+FIX] fields: removed references to one2one, but also
corrected some typo `.. in (xxx)` instead of `.. in (xxx,)` (Note the trailing comma).
There is still a (non-harmful) reference to one2one in the base_synchro addons.

bzr revid: vmt@openerp.com-20120322164540-9rl8iidj4wrjohru
2012-03-22 17:45:40 +01:00
Vo Minh Thu 46a190aaf8 [IMP] fields: removed any reference to integer_big.
bzr revid: vmt@openerp.com-20120322163850-sxfd9g1x96jstr51
2012-03-22 17:38:50 +01:00
Vo Minh Thu c5ef5e1394 [IMP] fields: removed deprecated fields (time, integer_big, one2one).
bzr revid: vmt@openerp.com-20120322161825-dlbnj9p2xe0mhhxx
2012-03-22 17:18:25 +01:00
Atul Patel (OpenERP) 258722cc1c [MERGE]: Merge with lp:openobject-server
bzr revid: atp@tinyerp.com-20120316042909-gb2e5cmrilyyhsef
bzr revid: atp@tinyerp.com-20120320050251-bgk9xhsfmb1fws1p
2012-03-20 10:32:51 +05:30
Raphael Collet cd47a2fcaf [MERGE] from trunk
bzr revid: rco@openerp.com-20120319092142-bk2yjoao67g712nb
2012-03-19 10:21:42 +01:00
Quentin (OpenERP) 3f9ce80a7d [MERGE] merge with main server trunk
bzr revid: qdp-launchpad@openerp.com-20120316125320-6ua2vcsajlsxsr1p
2012-03-16 13:53:20 +01:00
Atul Patel (OpenERP) 5bf4aa302a [ADD]: ADd condition for insert constraint if not exists.
bzr revid: atp@tinyerp.com-20120312095355-q3r8bz8i7n50bf47
2012-03-12 15:23:55 +05:30
Raphael Collet 82f492bc2c [FIX] related fields: fix and simplify search (was wrong with a single indirection)
bzr revid: rco@openerp.com-20120309152938-n467ap8hnw406rau
2012-03-09 16:29:38 +01:00
Atul Patel (OpenERP) 180a23c7cc [FIX]: uninstall module.
Remove foreign key references.
Remove sql constraint .
Remove workflow activity and transition based on deleted cascade.
Drop ir model fields columns and drop table.

bzr revid: atp@tinyerp.com-20120309124753-c4yzeoij5p2fmhgg
2012-03-09 18:17:53 +05:30
Raphael Collet 3904353be7 [FIX] osv/fields: undo change
bzr revid: rco@openerp.com-20120309093822-s3tktmveggr5d7yh
2012-03-09 10:38:22 +01:00
olt@tinyerp.com 6aa9f06dae [FIX] 'create_instance' method: the check for parent_model existence need to be done before accessing that object attributes or methods
bzr revid: olt@tinyerp.com-20120309081929-g4b8d34e93at49wf
2012-03-09 09:19:29 +01:00
Raphael Collet 0e1b0b16fa [IMP] undo rev. 4158 for osv/fields.py, fix it in another branch
bzr revid: rco@openerp.com-20120309075516-8g1yke3onu3pjjba
2012-03-09 08:55:16 +01:00
Bhumika (OpenERP) a3a2c698ab [Fix]base/res: res.parnter.address inherit compatiblity and open the address view
bzr revid: sbh@tinyerp.com-20120309065422-2wz5ch29x9qs8lf3
2012-03-09 12:24:22 +05:30
Raphael Collet 79787b73d2 [FIX] base/res_partner: small fix for backward compatibility
bzr revid: rco@openerp.com-20120308091745-vtyit22743qx3wl6
2012-03-08 10:17:45 +01:00
Vo Minh Thu 43b8317657 [MERGE] merged 6.1.
bzr revid: vmt@openerp.com-20120305163730-tkva77i5hhdy9jd1
2012-03-05 17:37:30 +01:00
Atul Patel (OpenERP) 3465869df7 [FIX]: Remove workflow activity and drop constraint during uninstalling module.
bzr revid: atp@tinyerp.com-20120229135343-g0v04jb5nc723w9q
2012-02-29 19:23:43 +05:30
Olivier Dony 769ea34281 [FIX] orm: model auto-init - better algorithm for detecting stale constraints during update
bzr revid: odo@openerp.com-20120223175851-bihxp0l0ax1xhf5g
2012-02-23 18:58:51 +01:00
Olivier Dony 819334f0aa [FIX] orm: inherited `active` fields should be used for the implicit filtering
This is for example used by hr.employee which
inherits from resource.resource, with the
`active` field located on the resource model.
Simplified some code too.

bzr revid: odo@openerp.com-20120223141635-p117b5wvvreuj40c
2012-02-23 15:16:35 +01:00
olt@tinyerp.com 3be394de8a [FIX] pep8: tab -> space
bzr revid: olt@tinyerp.com-20120223094355-ejsm256vn58bn4i2
2012-02-23 10:43:55 +01:00
Olivier Dony b5db852b3a [FIX] fields.binary: allow writing base64 unicode string values
The fields.binary type allows storing arbitrary
byte arrays, but it has been used historically
to store base64-encoded versions of the binaries.
This was partially related to the way these binary
values are serialized when transferred using the
standard XML-RPC protocol.
With the introduction of JSON-based RPC calls
alongside the 6.1 web client, these base64-encoded
binaries may now be deserialized as unicode ASCII
strings instead of 8-bit strings. That seems like
an acceptable behavior and we can simply coerce
these unicode strings to bytes strings as we know
they will be pure ASCII. Any non-ASCII unicode
value for binary field makes no sense and should
be passed as a byte string directly.

Thanks to Rui Barreiros for providing the final
hint in bug 919982 comments that lead to the
identification of this bug.

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

bzr revid: odo@openerp.com-20120222093937-quifmtsfc9gaa9ar
2012-02-22 10:39:37 +01:00
Olivier Dony 3f6524a6e2 [FIX] Correct remaining SQL now() calls, must use UTC
This is essential to have the proper behavior for
timestamps: on the database side we exclusively 
store UTC data (no DST issues, etc.) as naive
timestamps (to prevent Postgres from messing with them).
Inside OpenERP server/addons we work again with
pure UTC data (much simpler), and only render
them according to the user's timezone when they
are displayed in the user interface or rendered
in a PDF report.

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

bzr revid: odo@openerp.com-20120220105943-v3m0i50phrurt8x6
2012-02-20 11:59:43 +01:00
Olivier Dony 0e97ec4a12 [MERGE] Fix bug 932170 - formatLang() should render using context timezone
bzr revid: odo@openerp.com-20120215144727-4vtoxdz7dk9si3wn
2012-02-15 15:47:27 +01:00
Olivier Dony e9143a0ba8 [FIX] reports: formatLang() should render datetime values in appropriate timezone
lp bug: https://launchpad.net/bugs/932170 fixed

bzr revid: odo@openerp.com-20120215133748-2iodxq0z1vqhyz13
2012-02-15 14:37:48 +01:00
Vo Minh Thu 64ba0da663 [FIX] fields: duplicate float fields per registry (because they are stateful).
lp bug: https://launchpad.net/bugs/929483 fixed

bzr revid: vmt@openerp.com-20120215101714-zjsdcizzb1m2x6k5
2012-02-15 11:17:14 +01:00
Olivier Dony 3d637db6d0 [FIX] fields.sparse: fix multiple relational sparse fields on same model, courtesy of Guewen Baconnier (Camptocamp)
lp bug: https://launchpad.net/bugs/912203 fixed

bzr revid: odo@openerp.com-20120214125725-p2ayh1lckr50vebi
2012-02-14 13:57:25 +01:00
Olivier Dony aa658124a6 [FIX] fields.date.context_today: proper signature for call by default_get()
The ORM automatically passes a Model instance
as the first argument to _default callables,
historically provided to give lambda functions
access to the Model instance.
context_today() does not need it but takes it
for compatibility purposes.
This also means that when called explicitly
within business code we should now pass a
Model instance as first argument, typically 'self'

bzr revid: odo@openerp.com-20120214122413-rznpdyqajrzswk4o
2012-02-14 13:24:13 +01:00
Olivier Dony ed677bbfae [IMP] fields.date.context_today: actually use the optional timestamp + better naming
- optional datetime was not being used
- parameter renamed to timestamp to better
  indicate that it must be a datetime, not
  a simple date

bzr revid: odo@openerp.com-20120214085044-unpa77hork25gtif
2012-02-14 09:50:44 +01:00
Olivier Dony 2b8a0616c7 [ADD] field.date.context_today: added function to use as _defaults for date fields
As discussed on bug 925361, in order to have
a consistent behavior everywhere we need default
values to be using the client's timezone, just
as if the user had set the value themselves
using their local clock.
Because fields.date values are timezone
agnostic by design, they must be correctly
initialized from the start, no conversion
happens later.
The new context_today method is mean to be
easily usable as _defaults initialize, i.e.:
 'date_field': fields.date.context_today
is all that is needed.
It also avoids the classical mistake of
forgetting to make the default value
dynamic and directly passing the result of
a time.strftime() call.

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

bzr revid: odo@openerp.com-20120213180355-ruyw5j2w7r06kyue
2012-02-13 19:03:55 +01:00
Vo Minh Thu d62b48b1a5 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120209094736-wrwytl473g3fu30j
2012-02-09 10:47:36 +01:00
Vo Minh Thu 79d7e883f5 [IMP] fields: turn the warning() in a debug() for the required bool/int/float deprecation message.
bzr revid: vmt@openerp.com-20120209094342-n1n7ex5ef25bjvfw
2012-02-09 10:43:42 +01:00
Vo Minh Thu b90736b3e7 [IMP] gunicorn: signaling used for more than just execute().
bzr revid: vmt@openerp.com-20120208161312-pv9dl8rezsvs00o7
2012-02-08 17:13:12 +01:00
Vo Minh Thu 589c12ada0 [IMP] gunicorn: moved database signaling to RegistryManager.
bzr revid: vmt@openerp.com-20120208142834-52oxaq72gghj687h
2012-02-08 15:28:34 +01:00
Florent Xicluna d8b25ca182 [MRG] merge trunk.
bzr revid: florent.xicluna@gmail.com-20120208141358-emgwspa0s58gtsez
2012-02-08 15:13:58 +01:00
Vo Minh Thu d201a4a746 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120208123610-x1xhon259p2ffxpo
2012-02-08 13:36:10 +01:00
Vo Minh Thu ba70c43dc1 [IMP] inter-process signaling, proof-of-concept.
bzr revid: vmt@openerp.com-20120202173522-2grq11zfm7855i6s
2012-02-02 18:35:22 +01:00
Vo Minh Thu 1ab6f8883c [IMP] logging: _logger.warn() replaced by _logger.warning().
bzr revid: vmt@openerp.com-20120202092634-pylu3098p5c0mays
2012-02-02 10:26:34 +01:00
Antony Lesuisse 91ef8c1c51 [FIX] review according to xmo :)
bzr revid: al@openerp.com-20120201235604-tr5iq676pzk8bi1m
2012-02-02 00:56:04 +01:00
Antony Lesuisse 1a62602c86 [MERGE] trunk
bzr revid: al@openerp.com-20120131211744-whzzo0dh6w1kptng
2012-01-31 22:17:44 +01:00
Vo Minh Thu 283304f9a2 [IMP] warnings: turn warnings.warn into logging.warning:
Warnings are handled with the other logs (and not always sent to stderr),
they also appear under a module __name__ channel instead of py.warn.
The disadvantage is that there is no longer specific warnings,
such as pending deprecation warning or deprecation warning.

bzr revid: vmt@openerp.com-20120125132407-u33idc0qh7ecs1i5
2012-01-25 14:24:07 +01:00
Xavier Morel d181a5e7ac [IMP] move browse_record to logging, __init__ docstring to sphinx info fields
bzr revid: xmo@openerp.com-20120125113429-6stglci05rxpfo5j
2012-01-25 12:34:29 +01:00
Vo Minh Thu f057f2afa5 [IMP] openerp.loglevels: removed calls to openerp.loglevels.Logger().
bzr revid: vmt@openerp.com-20120124173017-c66z3kq11wmbrrke
2012-01-24 18:30:17 +01:00
Vo Minh Thu f22f2fc770 [IMP] openerp.{modules,osv}: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124124252-91g3ysf33zsq4nhd
2012-01-24 13:42:52 +01:00
Florent Xicluna efef81654b [REF] replace deprecated <> symbol.
bzr revid: florent.xicluna@gmail.com-20120119191838-r07oybyiqbkfehsz
2012-01-19 20:18:38 +01:00
Florent Xicluna e7838dfbc4 [REF] fix weird indentation, not multiple of four.
bzr revid: florent.xicluna@gmail.com-20120119191756-niny262vp1nvmpp8
2012-01-19 20:17:56 +01:00
Florent Xicluna 82f780e948 [REM] unused imports.
bzr revid: florent.xicluna@gmail.com-20120119191654-scm8c3o07icyz5b1
2012-01-19 20:16:54 +01:00
Olivier Dony c68045e497 [FIX] expression: properly care for implicitly defined m2m fields used in search() domains
Now that m2m fields may be defined without explicitly
specifying the name of the relationship table and its
foreign key columns, all access to these internal
names should be done via m2m._sql_names().
This seems better than lazily initializing these
internal names and hoping that nothing accesses
them before the init.

bzr revid: odo@openerp.com-20120119151012-c38k5zl7rqherhth
2012-01-19 16:10:12 +01:00
Vo Minh Thu 0f9721533d [IMP] fields: use simplejson instead of json (for consistency with orm.py).
bzr revid: vmt@openerp.com-20120118123334-xxunyo1ph8jiwxc0
2012-01-18 13:33:34 +01:00
Vo Minh Thu b5caa70b83 [IMP] tools: removed some functools functions (they were there for previous python versions).
bzr revid: vmt@openerp.com-20120118114109-txh1cjv503xautty
2012-01-18 12:41:09 +01:00
Vo Minh Thu 0ed4377cf8 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120112155027-u3bagec0g9fqr0yi
bzr revid: vmt@openerp.com-20120116110434-ckhp01ze83cwm32y
2012-01-16 12:04:34 +01:00
Vo Minh Thu daa41b61c1 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120110154333-kdwsff0faftcwvku
2012-01-10 16:43:33 +01:00
Vo Minh Thu 013794b978 [IMP] orm: cosmetics (and the runbot will build this branch again).
bzr revid: vmt@openerp.com-20120110153448-ot1vpcmwjbeykx9t
2012-01-10 16:34:48 +01:00
Olivier Dony 4dfc1e53f5 [FIX] fields.o2m: respect static @domain when clearing a field (writing [(5,..)])
bzr revid: odo@openerp.com-20120109140432-3np49l2esds0l1yb
2012-01-09 15:04:32 +01:00
Vo Minh Thu 455e47e5e8 [IMP] openerp.addons: openerp.addons is used instead of
openerp.modules as the namespace of the OpenERP addons.

bzr revid: vmt@openerp.com-20120109124120-06gguu3lzxv49i3j
2012-01-09 13:41:20 +01:00
Vo Minh Thu f24a29717e [FIX] orm: correctly set the module name on the model, even when imported with
`import openerp.modules.<module_name>`.

bzr revid: vmt@openerp.com-20120109101647-4hvy3n6eifzeozzq
2012-01-09 11:16:47 +01:00
niv-openerp 9b998a6551 [fix] forgot debugging lines
bzr revid: nicolas.vanhoren@openerp.com-20120105161621-ej6wkj5g6qi052rs
2012-01-05 17:16:21 +01:00
niv-openerp 4d3387c54c [imp] added service in object_service to be able to call a method specifying kwargs
bzr revid: nicolas.vanhoren@openerp.com-20120105160351-0xy697sjeihplx6v
2012-01-05 17:03:51 +01:00