Commit Graph

80 Commits

Author SHA1 Message Date
Olivier Dony b5b19a7a01 [FIX] generate_tracking_message_id: use more randomness to avoid duplicates
When several message IDs had to be generated for the same
record at the same time, there was a high chance to
get non-unique results. This possibly lead to data loss because
some mail implementations might ignore multiple mails with the
same ID (including OpenERP itself). On most operating systems
the available time resolution precision is better than what
we used (due to the float rounding of `%s`).
Adding a bit of randomness doesn't hurt, as OpenERP will
be used in increasingly distributed environments, so
we now add an extra random part as well.

bzr revid: odo@openerp.com-20121022162421-qr7nq8idihp5781u
2012-10-22 18:24:21 +02:00
Olivier Dony e06e3aad4a [IMP] tools.html2plaintext: consistent use of lxml.etree.HTMLParser to convert HTML to plaintext
We used to switch to using BeautifulSoup when available, but that
lead to inconsistent behavior depending on the installed Python
packages, and sometimes lead to bad surprises. There is no advantage
in using BeautifulSoup rather than HTMLParser, and the latter is
always available.

bzr revid: odo@openerp.com-20121015120934-njaylf99dc5zekfw
2012-10-15 14:09:34 +02:00
Xavier Morel 1e4a677f05 [MERGE] from trunk
bzr revid: xmo@openerp.com-20121010154436-wz29sdkbs9vvhjba
2012-10-10 17:44:36 +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
Stephane Wirtel 3d2355df04 [MERGE] improve the tools.misc.scan_languages function
bzr revid: stw@openerp.com-20120912104713-jhvkxp9egpchs2ti
2012-09-12 12:47:13 +02:00
Stephane Wirtel ff438c8eb7 [FIX] openerp.tools.misc.file_open: Very little fix to display coherent error message when file not found occurs.
bzr revid: stw@openerp.com-20120912095946-chjiq2y4bltisfw9
2012-09-12 11:59:46 +02:00
Stephane Wirtel 5bd3b4f0a2 [MERGE] base: fix typo of some languages
bzr revid: stw@openerp.com-20120911152531-h5naowr08c3lqva0
2012-09-11 17:25:31 +02:00
Thibault Delavallée 1f84036086 [MERGE] Merged with server/trunk.
bzr revid: tde@openerp.com-20120904075105-ljg3lgn6tf958kvd
2012-09-04 09:51:05 +02:00
Olivier Dony 869564ce28 [MERGE] file_open: give precedence to directory before zip, courtesy of Florent Xicluna
lp bug: https://launchpad.net/bugs/928376 fixed
lp bug: https://launchpad.net/bugs/928507 fixed

bzr revid: odo@openerp.com-20120903130536-5sqwp9tnhk1ntee3
2012-09-03 15:05:36 +02:00
Olivier Dony 6803862711 [IMP] res.partner: simplified+corrected parsing of partner name and email in name_create, added tests, made this internal method private
bzr revid: odo@openerp.com-20120831225205-04l4udn95cz3n72o
2012-09-01 00:52:05 +02:00
Olivier Dony d37745559e [ADD] tools.misc: new function append_to_html, can be used to inject blocks (html or plaintext) to existing HTML snippets
bzr revid: odo@openerp.com-20120831132337-of2p1wlh5l4lpvez
2012-08-31 15:23:37 +02:00
Thibault Delavallée ec85db8e83 [REVIEW] tools: removed duplicate email_split in tools.
bzr revid: tde@openerp.com-20120828080939-5bt3klbep49gjw47
2012-08-28 10:09:39 +02:00
Thibault Delavallée bc5da1a02b [REVIEW] tools: moved email_split function in emails section, instead of 'somwhere in the file'.
bzr revid: tde@openerp.com-20120828073414-lt4bpubxtv3235b6
2012-08-28 09:34:14 +02:00
Turkesh Patel (Open ERP) 7b36f6a7bd [MRG] merge with lp:openobject-server.
bzr revid: tpa@tinyerp.com-20120823050804-nrpewpzqtcqgl6fq
2012-08-23 10:38:04 +05:30
Fabien Pinckaers 3c8c168f85 merge_trunk
bzr revid: fp@tinyerp.com-20120822133509-v4irlqdjjba0wxxn
2012-08-22 15:35:09 +02:00
Christophe Simonis 4eafc023b3 [IMP] tools.misc.mute_logger can now be used as decorator
bzr revid: chs@openerp.com-20120822122013-9uxjwr9oqohseton
2012-08-22 14:20:13 +02:00
Turkesh Patel (Open ERP) 568288c3e1 [MRG] merge with main branch.
bzr revid: tpa@tinyerp.com-20120822115641-3l3yla4kji6xaxm6
2012-08-22 17:26:41 +05:30
Christophe Simonis 89f1693653 [IMP] remove unwanted log in test
bzr revid: chs@openerp.com-20120822110604-il0sxlvf592wasur
2012-08-22 13:06:04 +02:00
Thibault Delavallée b772da168f [FIX] tools: emails_split -> email-split.
bzr revid: tde@openerp.com-20120821151413-9hxmsyp51q3ny32f
2012-08-21 17:14:13 +02:00
Fabien Pinckaers b9bdf2c29a [IMP] tools.email_split
bzr revid: fp@tinyerp.com-20120816164239-yl1vzp83w6z5xi5i
2012-08-16 18:42:39 +02:00
Olivier Dony f5e7d53bce [IMP] tools.reference_re: support matching model name as well
bzr revid: odo@openerp.com-20120807161202-jav73f2kj86pzil4
2012-08-07 18:12:02 +02:00
Turkesh Patel (Open ERP) c49f2418c2 [FIX] Typo in Portuguese official language names.
bzr revid: tpa@tinyerp.com-20120704051748-y41la206dwk67klv
2012-07-04 10:47:48 +05:30
Divyesh Makwana (Open ERP) 9fbdc7c526 [IMP] Improved the typos.
bzr revid: mdi@tinyerp.com-20120423102313-0mboqhctzoje5ize
2012-04-23 15:53:13 +05:30
Christophe Simonis 91b8829050 [FIX] tools.email_send: use correct kwarg
bzr revid: chs@openerp.com-20120306173319-6tmhco83w0we5hl6
2012-03-06 18:33:19 +01:00
Xavier Morel 18d38fb5ee [IMP] document tools.misc.scan_languages, make its implementation less retarded
bzr revid: xmo@openerp.com-20120223103207-ra1a0dzcyoe745cx
2012-02-23 11:32:07 +01:00
Xavier Morel 2332c23c30 [IMP] replaces tools.misc.get_languages by the static dictionary it returns, rename that dict to ALL_LANGUAGES for clarity
bzr revid: xmo@openerp.com-20120223103045-a44cl5kdkrnehc66
2012-02-23 11:30:45 +01:00
Florent Xicluna 9769884ca5 [MERGE] file_open: give precedence to directory before zip.
bzr revid: florent.xicluna@gmail.com-20120208222801-p2gfhmsnptujdfru
2012-02-08 23:28:01 +01:00
Olivier Dony 69a5eca5b4 [IMP] Give precedence to module directories instead of zips while locating resources
The previous behavior gave the precedence to zipped
modules, without any apparent reason, and this is
sub-optimal for several reasons:

1. The default is to have regular modules, not
zipped modules, so looking first for a regular
module is more efficient.
2. Keeping a zipped module next to a regular
module with the same name is not a documented
or supported feature.
3. Even if you were relying on this behavior
having the extracted module take precedence
is more practical: you could simply extract
the zipped module to test a quick fix.

We have another issue related to this feature
because the code looking for zipped modules
escapes the addons paths chroot and goes
up to the filesystem root looking for a zip
module at each step. This is described in
bug 928376 and a fix for it should follow.

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

bzr revid: odo@openerp.com-20120208173932-pwhz53vxxdzbo8ja
2012-02-08 18:39:32 +01:00
Florent Xicluna 44e02f756b [FIX] file_open should not search zip files outside its root directory. Fix the returned value with pathinfo=True.
lp bug: https://launchpad.net/bugs/928507 fixed
lp bug: https://launchpad.net/bugs/928376 fixed

bzr revid: florent.xicluna@gmail.com-20120208153304-9443zx2z09bws10x
2012-02-08 16:33:04 +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 a142292f91 [IMP] openerp.tools: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124140056-hqoy49bh7wyr1xce
2012-01-24 15:00:56 +01:00
Vo Minh Thu a236a3ac75 [IMP] tools: removed deprecated debug() function.
bzr revid: vmt@openerp.com-20120118114910-xrynwguzu0e5zsng
2012-01-18 12:49:10 +01:00
Vo Minh Thu 8c3daeea12 [IMP] tools: removed __builtin__.{all,any} (they were there for previous python versions).
bzr revid: vmt@openerp.com-20120118114640-sm71f9fi48n4qn3q
2012-01-18 12:46:40 +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
Olivier Dony 9ddd05fb3a [REF] float_utils: moved in its own python module
bzr revid: odo@openerp.com-20111216160426-gya8d1d1zymcz8os
2011-12-16 17:04:26 +01:00
Olivier Dony ba2b2bdae1 [IMP] tools.float_*: more tests with negative values, some cleanup
bzr revid: odo@openerp.com-20111115113605-l5e6gg675qbrvjz6
2011-11-15 12:36:05 +01:00
Olivier Dony ffe640cece [IMP] tools.float_*: added tests and docstrings
bzr revid: odo@openerp.com-20111114182310-kkzh78uej0uuwhaz
2011-11-14 19:23:10 +01:00
Olivier Dony dcb5ff6eac [IMP] res.currency,base: factor out float rounding methods in tools to allow use without currency
Pending: addition of tests

bzr revid: odo@openerp.com-20111114163617-kw7u8rxcie7m2hj5
2011-11-14 17:36:17 +01:00
niv-openerp e42256c478 [imp] switched the dates to UTC. I'm so happy.
bzr revid: nicolas.vanhoren@openerp.com-20110922095443-3pzaup9ryb2vb25m
2011-09-22 11:54:43 +02:00
Olivier Dony caef9821a3 [MERGE] latest trunk
bzr revid: odo@openerp.com-20110906080822-tyadkxvycrx7bl1d
2011-09-06 10:08:22 +02:00
Antony Lesuisse fd83621463 [MERGE] trunk
bzr revid: al@openerp.com-20110824160936-ej26wcvgvku3lkm7
2011-08-24 18:09:36 +02:00
Olivier Dony fc4874e5f6 [IMP] tools.misc: update msg tracking id pattern: 'openobject'->'openerp'
bzr revid: odo@openerp.com-20110819141044-liat57ztdyydl5xm
2011-08-19 16:10:44 +02:00
Olivier Dony 6e3e3c3b8b [MERGE] sync with trunk
bzr revid: odo@openerp.com-20110715003655-vx3h5n4109hpa7i2
2011-07-15 02:36:55 +02:00
Olivier Dony 3080ba3452 [IMP] ir.mail_server: another round of cleanup
bzr revid: odo@openerp.com-20110715002809-ryvm27wi4ktv8v49
2011-07-15 02:28:09 +02:00
Vo Minh Thu cadfd7d85f [FIX] fields.property: typos/misnamed variables.
bzr revid: vmt@openerp.com-20110711161558-kac442kzcu3ujvj4
2011-07-11 18:15:58 +02:00
Vo Minh Thu 2fe91df6ad [IMP] fields.py: tidying up before merging in trunk.
bzr revid: vmt@openerp.com-20110711123414-5nf29awpui5x0pp6
2011-07-11 14:34:14 +02:00
Quentin (OpenERP) dae911decc [FIX] tools: get_and_sort_by_field function fixed and cleaned as asked in merge proposal
- fixed error of undefined variable set_field
- improved docstring to follow standard RST formatting
- renamed function into get_and_group_by_field to depict more precisely what it's doing
- created a specific function get_and_group_by_company to hide the complexity

bzr revid: qdp-launchpad@openerp.com-20110708132537-d7c4trk0nl5ngny0
2011-07-08 15:25:37 +02:00
Quentin (OpenERP) 242a9e9b05 [IMP] tools: added a function to get and sort by field
bzr revid: qdp-launchpad@openerp.com-20110707132614-c6letgrkz4d6vm0i
2011-07-07 15:26:14 +02:00
P. Christeas cf6e623f7d API docs: settings file and titles at modules
bzr revid: xrg@linux.gr-20110623090357-nazly8vpfnw0iskr
2011-06-23 12:03:57 +03:00
P. Christeas b0f06f7e52 orm, tools, addons: Doc strings improvements
bzr revid: xrg@linux.gr-20110623090228-4gn6xoyykcvfhv13
2011-06-23 12:02:28 +03:00