Commit Graph

35 Commits

Author SHA1 Message Date
Sylvain GARANCHER f4cb884cdc [FIX] base: Add missing return values
The _auto_init method was overriden without keeping the return value of
the super on some models.
This break the new stored computed fields computation at field creation.

Closes #11985
opw-677232
2016-05-17 10:39:54 +02:00
Olivier Dony cc724c2e61 [FIX] base: centralize custom data serialization for builtin types only 2016-02-02 22:42:31 +01:00
Martin Trigaux cd013aa09a Revert 3dec090 "[FIX] ir_values: fallback when no condition"
An ir.value without condition should not match when searching with a condition.
When a field with change_default on it is modified, the method get_defaults is called with the new value. This means that manually modifying a field with this trigger would put back the default value (opw 611193).
2014-07-28 14:35:44 +02:00
Martin Trigaux 3dec09079e [FIX] ir_values: fallback when no condition
When searching for default values, if we set a condition (e.g. 'type=out_invoice'), fetch also the default values without any condition set. Thanks to the order by clause, the one with a condition have an higher priority than the one without and will not affect existing result.
This fixes default journal/currency on an invoice where the journal is retrieved in the onchange_company_id method (domain is forced). Without this patch only ir.values with a domain set will match, opw 610645
2014-07-17 15:07:58 +02:00
Martin Trigaux b87db84c0d [FIX] ir_values: try to evaluate the given expression before saving it in pickle form (opw 607398)
The value_unpickled given by xml data is usualy already evaluated but when it is given by the web client, a str is recieved by the method (as the field is a text field). In the later case, we need to evaluate the field before storing to be correctly evaluated as a default value.

bzr revid: mat@openerp.com-20140509130412-ki211x7qdccdnv5w
2014-05-09 15:04:12 +02:00
Ravi Gohil (OpenERP) 166b8efabb [FIX] Modifying default value for other than char/string/selection fields from 'Setting/Technical/Actions/User-defined Defaults' view sets wrong pickle value for respective record. (Maintenance Case: 607398)
lp bug: https://launchpad.net/bugs/1153628 fixed

bzr revid: rgo@tinyerp.com-20140506055725-ryorjswf236plhlc
2014-05-06 11:27:25 +05:30
Ravi Gohil (OpenERP) 636e825876 [FIX] Modifying default value for other than char/string/selection fields from 'Setting/Technical/Actions/User-defined Defaults' view sets wrong pickle value for respective record. (Maintenance Case: 607398)
lp bug: https://launchpad.net/bugs/1153628 fixed

bzr revid: rgo@tinyerp.com-20140506054055-xse0aywu6p3hl138
2014-05-06 11:10:55 +05:30
Ravi Gohil (OpenERP) 1e1c2230fd [FIX] Modifying default value for other than char/string/selection fields from 'Setting/Technical/Actions/User-defined Defaults' view sets wrong pickle value for respective record. (Maintenance Case: 607398)
lp bug: https://launchpad.net/bugs/1153628 fixed

bzr revid: rgo@tinyerp.com-20140505115121-lwz1crjjoxyqfgax
2014-05-05 17:21:21 +05:30
Christophe Matthieu de9777bf56 [IMP] Improve typos in warning (Grammar mistake, Capitalize title, Typos)
bzr revid: chm@openerp.com-20130607090251-2ym7dx73jdigq93w
2013-06-07 11:02:51 +02:00
Cecile Tonglet ad8b76de53 [MERGE] From trunk (second time)
bzr revid: cto@openerp.com-20121217144753-1rboqdw01h8yrehj
2012-12-17 15:47:53 +01:00
Cecile Tonglet 5f0070dcb6 [FIX] Remove unused imports and fix some imports that doesn't use the new namespace
bzr revid: cto@openerp.com-20121217143029-e9ki4ftwihq7pdme
2012-12-17 15:30:29 +01:00
Xavier Morel 5155f30303 [REM] unused local variables
bzr revid: xmo@openerp.com-20121214132533-aafgbov19ckb9ksp
2012-12-14 14:25:33 +01:00
Xavier Morel 5d3d3868f6 [IMP] use augmented assignments
bzr revid: xmo@openerp.com-20121214131924-bpl48ht21ic4g34b
2012-12-14 14:19:24 +01:00
Vo Minh Thu 509a084e79 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121210152723-mv4dykfu6ip1991h
2012-12-10 16:27:23 +01:00
Raphael Collet 1a3a33b6d5 [MERGE] from trunk
bzr revid: rco@openerp.com-20120403082743-7lf3rb6h0ff95w7f
2012-04-03 10:27:43 +02:00
Olivier Dony 697e034d54 [FIX] ir.values: predictible ordering for sidebar items (based on IDs i.e. creation order)
bzr revid: odo@openerp.com-20120320113851-lsg8ju1w0cvdo0tj
2012-03-20 12:38:51 +01:00
Raphael Collet c05563ff6f [ADD] base: add model res.config.settings for preferences wizard
bzr revid: rco@openerp.com-20120302134156-afohe4jxay2eq0id
2012-03-02 14:41:56 +01:00
Raphael Collet 2c2432ad33 [FIX] ir_ui_menu: do not create a menu binding when field 'action' is False
bzr revid: rco@openerp.com-20120210082637-tn4cyvgfa4jrxpj4
2012-02-10 09:26:37 +01:00
Olivier Dony d163de7b55 [FIX] ir.values: avoid returning conditional defaults when condition is not set
This should un-break the tests introduced
 in previous revision

bzr revid: odo@openerp.com-20120209130854-x73j0ouyjsjnhsdg
2012-02-09 14:08:54 +01:00
Numerigraphe - Lionel Sausin a2f4f2669b [IMP] Added missing vim mode lines
lp bug: https://launchpad.net/bugs/524279 fixed

bzr revid: ls@numerigraphe.fr-20111122085848-1atcrcw8e64altcp
2011-11-22 09:58:48 +01:00
Vo Minh Thu b04d607ec4 [FIX] ir_values: missing trimming of the condition (as done elsewhere).
bzr revid: vmt@openerp.com-20111003154008-k8dm2r3yhintm0ql
2011-10-03 17:40:08 +02:00
Olivier Dony fbb6e5e56a [FIX] ir.values.get_defaults: typo in SQL query - spotted by Naresh, thanks!
bzr revid: odo@openerp.com-20110908113833-z2cgkj093940usys
2011-09-08 13:38:33 +02:00
Olivier Dony e333a2eb2e [IMP] ir.values: improved defaults doc + removed `object` column completely
The `object` column actually directly depended on the value of
the `key` column, so it can be totally removed with no side-effects.
Docstrings updated following review comments.

bzr revid: odo@openerp.com-20110905141058-xa01o77l1rto6hg9
2011-09-05 16:10:58 +02:00
Olivier Dony d0af2f830c [FIX] ir.values: get_defaults() should cut the condition at 200 chars to match the conditions that were set
bzr revid: odo@openerp.com-20110902151442-rqrh62z67g8k921o
2011-09-02 17:14:42 +02:00
Olivier Dony 32020e1353 [FIX] ir.values: re-binding of actions should properly delete the previous one
bzr revid: odo@openerp.com-20110902125648-x0cir5m7818h9ba6
2011-09-02 14:56:48 +02:00
Olivier Dony 38ddb76960 [IMP] ir.values: minor cleanup/view improvements
bzr revid: odo@openerp.com-20110902101530-13r328uwhwdpudn5
2011-09-02 12:15:30 +02:00
Olivier Dony 75e0749542 [IMP] ir.values: separated defaults and actions API, added different views
This should prepare for a future split of the two parts
currently composing ir.values entries: user defaults and
action bindings to a model's UI.

bzr revid: odo@openerp.com-20110901181254-g14lyeogs0wv23bz
2011-09-01 20:12:54 +02:00
Vo Minh Thu d4adda9d06 [MERGE] ir_values: added asserts on the models argument type.
bzr revid: vmt@openerp.com-20110610101924-al1z5vvmcehbcgva
2011-06-10 12:19:24 +02:00
P. Christeas ba03d85325 ir.values: whitespace cleaning, put assertions on arg types
res.lang was calling with modules='string', which was not right.
Don't allow such a case.

bzr revid: xrg@linux.gr-20110610091852-y8083s085gn6kwcs
2011-06-10 12:18:52 +03:00
Vo Minh Thu 5d83528841 [MERGE] merged trunk
bzr revid: vmt@openerp.com-20110525151722-w9qt1qjficpv71re
2011-05-25 17:17:22 +02:00
Vo Minh Thu 261cb1079d [REF] ir_values:
- context=None instead of context={}
- removed common.ir_{set,get,del} from xmlrpc as it is not used anymore.

bzr revid: vmt@openerp.com-20110518154832-42f1k6ii093r12vs
2011-05-18 17:48:32 +02:00
Vo Minh Thu b9b3251af5 [IMP] ir_value: forgot to add some comment.
bzr revid: vmt@openerp.com-20110517141552-3hrj3itt7axxjol0
2011-05-17 16:15:52 +02:00
Vo Minh Thu 6a189e8c96 [Fix] Set default value for current login user
lp bug: https://launchpad.net/bugs/780418 fixed

bzr revid: vmt@openerp.com-20110517140410-1f3rlewsa5f4238r
2011-05-17 16:04:10 +02:00
RGA (OpenERP) e48c0c8ef2 [Fix] Set default value for current login user
lp bug: https://launchpad.net/bugs/780418 fixed

bzr revid: rga@tinyerp.com-20110513102119-aw4n336m5wcm0c9o
2011-05-13 15:51:19 +05:30
Vo Minh Thu f8572e5c60 [IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies

bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00