Samus CTO
7f88681186
[FIX] context_timestamp MUST return a "timezone aware" timestamp
2014-08-13 14:58:55 +02:00
Alexandre Fayolle
4bfcbb2a48
[FIX] fields property: do not create empty properties
...
fixes #595
In the case where a property for the company exists but has no related record (e.g. in case of type m2o with no defined value), not setting a value to this field for a new record would create a new property (as browse_null is not an instance of browse_record)
2014-06-25 10:57:10 +02:00
Martin Trigaux
86acc1a62f
[FIX] orm: avoir errors reading twice a field
...
_read_flat: remove duplicated fields in read call
get many2one: as False is instance of int, check the value of x first to avoid calling a name_get with a list of False
When we were reading twice a m2o field where at least one result is null, the first call to name_get would set the value to False instead of None and then accepted by the filter 'isinstance(x, (int,long))'
2014-06-12 16:14:41 +02:00
Jeremy Kersten
100eba8eaf
[FIX] fields.py - avoid dict comprehension inside a dict comprehension
2014-06-11 10:30:00 +02:00
Christophe Simonis
517162ce14
[FIX] orm: do not recompute m2o stored function field at read.
...
The get() method of m2o function fields is used for 2 different things:
- call the function defining the m2o
- get the name_get representation of the value
Until this pathc, only the first case was handled, resulting to a useless
recomputation of the field when reading it.
2014-06-06 10:53:42 +02:00
Martin Trigaux
85805282b6
[FIX] fields: when executing (4, *) operations on o2m fields, check the existence based on the sql model of the table.
...
If the o2m field linked to the o2m is stored on a different table (eg: model with _inherit), previous request would crash as the field do not exists in the '_table' sql table
bzr revid: mat@openerp.com-20140327111241-klftr0s8v8i68nxp
2014-03-27 12:12:41 +01:00
Martin Trigaux
33c6f108c0
[FIX] parent_model is null if local column
...
bzr revid: mat@openerp.com-20140324164334-pvzevi2bnmb642ak
2014-03-24 17:43:34 +01:00
Martin Trigaux
66d6fb065f
[FIX] fields: when executing (4, *) operations on o2m fields, check the existence based on the sql model of the table.
...
If the o2m field linked to the o2m is stored on a different table (eg: inherit), previous request would crash as the field do not exists in the '_table' sql table
bzr revid: mat@openerp.com-20140324162130-fyotk8vqmkha43eb
2014-03-24 17:21:30 +01:00
Martin Trigaux
3668f09108
[IMP] avoid changing the API by passing the company_id in context
...
bzr revid: mat@openerp.com-20140213100836-wte9zec4easb0cmw
2014-02-13 11:08:36 +01:00
Martin Trigaux
6f8811e7f6
[MERGE] sync with 7.0
...
bzr revid: mat@openerp.com-20140213095713-b1ys0nu8u7o8ybyr
2014-02-13 10:57:13 +01:00
Cecile Tonglet
a48c8119ca
[FIX] name_search() where _rec_name is a reference field and links are broken
...
bzr revid: cto@openerp.com-20131211103842-i1n9t8mg9kuw77v3
2013-12-11 11:38:42 +01:00
Martin Trigaux
d2ca43402e
[FIX] orm: inverting the condition seems to work (don't ask why)
...
bzr revid: mat@openerp.com-20131206142220-nfqiyeic9fdkejxy
2013-12-06 15:22:20 +01:00
Martin Trigaux
0be3333f96
[FIX] orm: ignore existing link for operation (4, x) in one2many fields
...
bzr revid: mat@openerp.com-20131206125403-r6uemlh7jagw01gh
2013-12-06 13:54:03 +01:00
Martin Trigaux
9635119fc1
[FIX] fields: execute name_get for function field of type many2one as SUPERUSER_ID (same behaviour as classical many2one)
...
bzr revid: mat@openerp.com-20131125125008-wmpssjk5vygdcc0w
2013-11-25 13:50:08 +01:00
Christophe Simonis
2859897815
[FIX] allow falsy extra attributes on fields.
...
bzr revid: chs@openerp.com-20131024135448-e2bpgaqu7mvg1icn
2013-10-24 15:54:48 +02:00
Martin Trigaux
a0059326fc
[IMP] remove useless comment
...
bzr revid: mat@openerp.com-20131008111631-y47f0y4wyf8hsf2g
2013-10-08 13:16:31 +02:00
Martin Trigaux
9680b1cd39
[IMP] move comment to the right line
...
bzr revid: mat@openerp.com-20131008105412-pqxpo2q12odjyqp4
2013-10-08 12:54:12 +02:00
Martin Trigaux
241c054b35
[IMP] correctly bound _symbol_f and redifine self._symbol_set_char to keep the API
...
bzr revid: mat@openerp.com-20131008104737-eellli48re2pfmos
2013-10-08 12:47:37 +02:00
Martin Trigaux
3ae73d572d
[FIX] function fields: bound symbol methods of function field (type char) to the correct methods of the char field
...
lp bug: https://launchpad.net/bugs/1208074 fixed
bzr revid: mat@openerp.com-20131008102135-r7lqvky0vd75yo1q
2013-10-08 12:21:35 +02:00
Olivier Dony
9a5e317618
[FIX] OPW 592482: browse_record should not prefetch binary fields
...
This was apparently a long-standing issue due to a
strange handling of the _prefetch attribute on
columns: accessing a column would only trigger
the prefetching if its _prefetch attribute was
True, but the prefetching itself would also
prefetch columns that had _prefetch False.
We clearly want it the other way around, or
at least we want _prefetch to decide whether
a column is included in any given prefetching
pass. We can skip the prefetching pass when
the only field being accessed has _prefetch
False because it is likely the other fields
have already been prefetched separately.
This last subtlety should not make any
noticeable performance difference.
lp bug: https://launchpad.net/bugs/1177965 fixed
bzr revid: odo@openerp.com-20130620131057-v7s4qfqj976j3ufo
2013-06-20 15:10:57 +02:00
Amit Dodiya
244c82fe4f
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130604110137-jclbsmkohs5mm66w
2013-06-04 16:31:37 +05:30
Amit Dodiya
f7d2e495fd
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130531120925-s10hwscv2gexh27a
2013-05-31 17:39:25 +05:30
Amit Dodiya
f1db39aab1
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130531115736-ecrpaer2f2yhnvs5
2013-05-31 17:27:36 +05:30
Amit Dodiya
bfa4ab09f6
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130531101249-1w17yuoklhmiv2cc
2013-05-31 15:42:49 +05:30
Amit Dodiya
99d4732f04
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130527115951-7zssei2fnxyqzrpq
2013-05-27 17:29:51 +05:30
Amit Dodiya
b7e1be5539
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130527114601-tqzlrna1n9jssou2
2013-05-27 17:16:01 +05:30
c01e2fe122
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130520090111-h20jboltev763mj6
2013-05-20 14:31:11 +05:30
Olivier Dony
8e5f0e2ce2
[FIX] fields.date[time]: context_today()/context_timestamp() should fallback to user TZ if context TZ is missing
...
This takes care of cases where the context is missing,
e.g. for workflow-based operations, and is similar
to the way tools.translate._() falls back to the user
language.
lp bug: https://launchpad.net/bugs/949516 fixed
bzr revid: odo@openerp.com-20130111175717-u8r1t7s8872bz2rx
2013-01-12 06:57:17 +13:00
Raphael Collet
3040114651
[MERGE] trunk-style-improvements-xmo (Python stylistic improvement)
...
bzr revid: rco@openerp.com-20121217110150-4ijt04ic17miktq7
2012-12-17 12:01:50 +01:00
Xavier Morel
c6079dd6bb
[REM] unnecessary parens
...
bzr revid: xmo@openerp.com-20121214123803-6xu2s1ndnoyj4i3e
2012-12-14 13:38:03 +01:00
Xavier Morel
a5cb8460c6
[FIX] __init__ can't return values
...
bzr revid: xmo@openerp.com-20121214122525-bd5207viiz4vqi8x
2012-12-14 13:25:25 +01:00
Vo Minh Thu
1a4fd71880
[FIX] test_fields: _all_columns must be modified similarly to _columns.
...
(Because of the newly added method check_field_access_rights().)
bzr revid: vmt@openerp.com-20121212134755-ykfdykqepwzti5uf
2012-12-12 14:47:55 +01:00
Thibault Delavallée
f0abd6f49e
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20121210083805-1t45n6xxmptpo28o
2012-12-10 09:38:05 +01:00
Antony Lesuisse
2f1f17ead9
[IMP] fields warning display args to locate them
...
bzr revid: al@openerp.com-20121209193952-ukk0aie3d8fg18q2
2012-12-09 20:39:52 +01:00
Thibault Delavallée
ea01dfe9dd
[CLEAN] fields.py: added auto_join in one2many and many2one __init__, binded on _auto_join. Added some short explanations in fields.py about the attribute.
...
bzr revid: tde@openerp.com-20121205153410-07vo3j1c641xgmda
2012-12-05 16:34:10 +01:00
Thibault Delavallée
638fc20618
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20121130093658-uvm0gbo90su88psh
bzr revid: tde@openerp.com-20121203131657-4gcp4wreylnmw2or
bzr revid: tde@openerp.com-20121204082427-7zdzn6f21xzvxby9
2012-12-04 09:24:27 +01:00
Thibault Delavallée
1bda6f44db
[ADD] fields.py: added _auto_join attribute. This attribute will be used to automatically generate join queries, instead of doing sub-queries returning an 'id in' domain.
...
bzr revid: tde@openerp.com-20121127153432-3ttqm8pmgk3l7a77
2012-11-27 16:34:32 +01:00
Olivier Dony
7f5ad72429
[MERGE] Forward-port 6.1 bugfixes up to rev. 4307
...
rev.4307 = rev-id launchpad_translations_on_behalf_of_openerp-20121125065030-g5if5pybr61la4yj
bzr revid: odo@openerp.com-20121126160320-t2suuik6lhk6wl0x
bzr revid: odo@openerp.com-20121126161836-mv8yymzgbnmif4ve
bzr revid: odo@openerp.com-20121126162023-ejvsapwouyudw6c6
bzr revid: odo@openerp.com-20121126181527-d4yx15372bis77qj
2012-11-26 19:15:27 +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
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
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
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
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
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
Xavier Morel
1e4a677f05
[MERGE] from trunk
...
bzr revid: xmo@openerp.com-20121010154436-wz29sdkbs9vvhjba
2012-10-10 17:44:36 +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
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
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