Commit Graph

113 Commits

Author SHA1 Message Date
Thibault Delavallée 12294252d4 [MERGE] Merged with server/trunk.
bzr revid: tde@openerp.com-20120903081949-ucy4e1kpbb30dhko
2012-09-03 10:19:49 +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
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
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
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
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 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
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 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
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 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 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
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
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
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
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 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
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 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 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
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
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
Guewen Baconnier 8b8a0234f0 [FIX] Sparse field: get relation of the correct field
bzr revid: guewen.baconnier@camptocamp.com-20120105104051-7jn2n5kd92nexa31
2012-01-05 11:40:51 +01:00
Olivier Dony bdce754108 [IMP] cleanup deprecated method=True param for function fields
bzr revid: odo@openerp.com-20120104133027-oaydmngk2dfc22mk
2012-01-04 14:30:27 +01:00
Olivier Dony 482aee1951 [IMP] fields.sparse: custom sparse field creation now working + handle deleted resources properly
bzr revid: odo@openerp.com-20111222182405-425rzyl6idg9aocu
2011-12-22 19:24:05 +01:00
Olivier Dony d925235e62 [MERGE] sync with trunk
bzr revid: odo@openerp.com-20111222102555-bydsozbdu6urkj31
2011-12-22 11:25:55 +01:00
Olivier Dony f93bb856e2 [MERGE] Fix bug 891544 - prevent double-encoding of binary fields
lp bug: https://launchpad.net/bugs/891544 fixed

bzr revid: odo@openerp.com-20111128124535-s8cesplj379ssfqm
2011-11-28 13:45:35 +01:00
Naresh (OpenERP) c11d1f06a9 [FIX]:Incorect format of report in OpenOffice
lp bug: https://launchpad.net/bugs/891544 fixed

bzr revid: nch@tinyerp.com-20111128100836-ad40b5hvoeqyoggm
2011-11-28 15:38:36 +05:30
Olivier Dony 29574262c5 [FIX] fields.related: lazy init should avoid race conditions as much as possible
bzr revid: odo@openerp.com-20111118131104-a16vg7q2ws8se2ob
2011-11-18 14:11:04 +01:00
Olivier Dony ca5fcc2bdf [IMP] orm,fields: some cleanup for sparse field implementation (wip)
bzr revid: odo@openerp.com-20111117143010-9nv7inr5ijzykgem
2011-11-17 15:30:10 +01:00
Olivier Dony 3bf3279f25 [MERGE] Implementation of sparse field (to review), by Sebastien Beau, Akretion
bzr revid: odo@openerp.com-20111116172525-rmri79n9hpf2plwg
2011-11-16 18:25:25 +01:00