Commit Graph

1006 Commits

Author SHA1 Message Date
Olivier Dony 79570179bf [MERGE] Forward-port saas-5 up to acbdac4 2014-08-14 14:56:57 +02:00
Olivier Dony acbdac4e9f [MERGE] Forward-port saas-4 up to 9a84d55 2014-08-14 14:54:37 +02:00
Olivier Dony 9a84d55036 [MERGE] Forward-port saas-3 up to 9b55532 2014-08-14 14:37:42 +02:00
Olivier Dony 8b12d1c566 [MERGE] Forward-port of 7.0 up to 85d2b45 2014-08-14 04:11:33 +02:00
Olivier Dony 69eef5ac8d [FIX] tools.translate: addons path resolution failed with duplicates
When the addons_path config contained the
default path, the system was working with
an empty addons_path in the middle of the
other paths. This empty one matched for all
files, making all files appear to belong to
the root path component, e.g. `home` if the
root path is in /home.
Refactored a bit to avoid duplicates and
redundant path calculations.
2014-08-14 02:07:59 +02:00
Vo Minh Thu 680214c47e [FIX] tools.translate: when loading entries from a PO file, use also the POT.
On Launchpad, as commented on bug 933496, PO entries (and their comments) are
shared between series. This mean that e.g. the 7.0 series can have the wrong
`reference` comments (those beginning with #:) as they would be copied from say
the trunk series. Those `reference` comments are used to import translations
and look them up.

This patch adds a few lines of code to tools.translate so that targets
defined in the POT `reference` comments are used in addition to those from the
PO file.

Also adds a test module to validate the new behavior.

This patch stems from:
 - the 6.1 branch by Vo Minh Thu:
    https://code.launchpad.net/+branch/~openerp-dev/openobject-server/6.1-fix-po-targets-933496-vmt
 - the 7.0 port by Numerigraphe:
    https://code.launchpad.net/~numerigraphe-team/openobject-server/7.0-fix-po-targets-933496-vmt
2014-08-13 23:07:40 +02:00
Olivier Dony 868a77616d [FIX] ir.translation: export/import of QWeb terms
Fixes the translation term import/export logic to
support terms inside QWeb templates.

Refactored a bit the export code so the babel-based
QWeb terms extractor for ./static/src/*.xml files
uses the same logic as the regular extractor for
ir.ui.views with type QWeb.

Server-side QWeb rendering uses a mix of the native
 view inheritance mechanism and the template inclusion
(t-call) mechanism. During rendering the translations
are only applied at "template" level, *after* the
view inheritance has already been resolved.
As a result translations are local to a template,
not to the inherited view in which they are actually
written.
In terms of exporting PO[T] files, this is done by
resolving the "root" QWeb template a view belongs
to, and using it as the location of the translated term.

During import there is one extra quirk for QWeb
terms: they need to be linked to the `website` model
rather than the actual `ir.ui.view` model they
are really pointing to, so the rendering phase can
properly recognize them.
2014-08-13 11:08:02 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Thibault Delavallée c64b077362 [FIX] mail: fixed bounce email recognition + invite email headers + mass mailing statistics not lost anymore
- [FIX] bounce regex: too many emails were considered as bounce and therefore
not displayed in the chatter and lost for the communication history. The regex
was not correctly looking for the bounce alias in the email_to.
- [FIX] invite email: replying to the invitation email (invitation as new
follower) now replies to the user sending the invitation.
- [FIX] mass_mailing: added a column to store the id of the original email
in addition to the many2one column. The many2one is set to null when deleting
the original email. As the information is necessary, it is saved on another
field. The many2one is necessary for indexes purpose as the inverse of
a one2many.
2014-08-11 15:39:26 +02:00
Denis Ledoux 0739bc4eda [MERGE] forward port of branch saas-4 up to 7ecaab9 2014-08-11 15:31:04 +02:00
Denis Ledoux 7ecaab9fe2 [MERGE] forward port of branch saas-3 up to 2f4be42 2014-08-11 15:30:37 +02:00
Denis Ledoux 2f4be42d8c [MERGE] forward port of branch 7.0 up to 3632949 2014-08-11 15:28:54 +02:00
Denis Ledoux 2b0487113a [FIX] yaml tests: Set on_change keys not in view logger as debug instead of warning
This is related to commit d31faceb67
(This is to avoid the runbot being yellow if on_change methods have extra keys in the returned value, this is not wrong, the web client will simply ignore them).
2014-08-11 11:11:36 +02:00
Denis Ledoux 7c647ec876 [MERGE] forward port of branch saas-4 up to 0a1e4a0 2014-08-08 17:27:29 +02:00
Denis Ledoux 0a1e4a05b2 [MERGE] forward port of branch saas-3 up to 81a902a 2014-08-08 17:06:39 +02:00
Denis Ledoux 81a902a07d [MERGE] forward port of branch 7.0 up to 5f696ba 2014-08-08 16:18:35 +02:00
Raphael Collet 207013c74f [IMP] refactoring: move function topological_sort to openerp.tools 2014-08-08 14:12:06 +02:00
Denis Ledoux d31faceb67 [FIX] yaml tests: extra key in on_change result isn't that bad.
In the return result of an on_change, having keys which are not ine the view is not that bad, it is not an actual problem.

Display warning instead of asserting all the keys are in the views.
2014-08-08 11:40:30 +02:00
Thibault Delavallée f5688cd8fd [FIX] tools: html_sanitize: keep mako tags (<% ... %>), required for example in the portal sale quotation email. 2014-08-07 16:47:58 +02:00
Wolfgang Taferner b09a766f0a [IMP] workflow: add sequence for ordering workflow transitions (split/join mode especially for XOR)
Makes ordering transitions easier and more deterministic.

(Rebase of #1564)
2014-08-05 12:26:28 +02:00
Christophe Simonis fd4fd35e32 [MERGE] forward port of branch saas-5 up to e4cb520 2014-07-30 20:52:14 +02:00
Christophe Simonis e4cb5202a0 [MERGE] forward port of branch saas-4 up to fa07bc8 2014-07-30 20:30:14 +02:00
Christophe Simonis fa07bc8532 [MERGE] forward port of branch saas-3 up to 310d3fe 2014-07-30 19:09:33 +02:00
Christophe Simonis 310d3fe4c4 [MERGE] forward port of branch 7.0 up to 39f3e40 2014-07-30 18:55:31 +02:00
Olivier Dony c60dc65857 [ADD] safe_eval: allow YIELD_VALUE, used e.g. for generator comprehension 2014-07-30 13:24:39 +02:00
Olivier Dony 77769ce74d [IMP] BaseModel: new `_translate` attribute to disable translations
Can be defined to False in any model to completely
disable translations for this model, when they are
irrelevant. This is useful e.g. for test classes
that use attributes that would normally be translatable.
2014-07-30 13:24:39 +02:00
Olivier Dony 9a9ef37c65 [IMP] tools.translate: unused import 2014-07-30 13:24:39 +02:00
Denis Ledoux 88c022dfc8 [MERGE] forward port of branch 7.0 up to bbb8d8f25a 2014-07-29 11:42:10 +02:00
Denis Ledoux 6b1a804b29 [MERGE] forward port of branch 7.0 up to b91a75f7ef
Conflicts:
	addons/base_vat/base_vat.py
	openerp/tools/safe_eval.py
2014-07-29 10:42:50 +02:00
Mathieu Benoit 40b1fccb2a [FIX] translate: Fix debug print when parse path list to translate. 2014-07-25 16:17:29 -04:00
Denis Ledoux 46ef1356d6 [ADD] safe_eval: UNPACK_SEQUENCE and Exception
Allowing UNPACK_SEQUENCE allows the use of the "multi" assignation:
a, b = [1,2]
for a,b in items
2014-07-25 13:00:17 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Xavier Morel f98c610310 [FIX] creation of new threads where a new API environment should be initialized
* fix #1149 courtesy of @andreparames
* remove useless threaded yaml import
* openerp.service.server thread spawning get an API environment further down
  the stack
2014-07-15 13:33:38 +02:00
Xavier Morel 29a6dad803 [REM] threaded yaml import (useless and unused) 2014-07-15 13:21:57 +02:00
Christophe Simonis a5419ca800 [MERGE] forward port of branch saas-5 up to e0759c1 2014-07-15 11:21:59 +02:00
Christophe Simonis e0759c1350 [MERGE] forward port of branch saas-4 up to de696f1 2014-07-15 10:39:08 +02:00
Christophe Simonis de696f14f8 [MERGE] forward port of branch saas-3 up to 24484c8 2014-07-15 10:38:14 +02:00
Christophe Simonis 24484c8bcd [MERGE] forward port of branch 7.0 up to 7a928b1 2014-07-15 10:36:54 +02:00
Thibault Delavallée 7a928b151a [FIX] tools: mail: fixed last commit, solving an issue with the html2plaintext introduced another issue with notes. Reverting to the first version. 2014-07-11 16:21:01 +02:00
Olivier Dony 924e4b1a08 [MERGE] Fwd-port saas-4 up to e31fd6a 2014-07-11 12:00:42 +02:00
Olivier Dony e31fd6a1e1 [MERGE] Fwd-port saas-3 up to a9d2b65 2014-07-11 11:53:07 +02:00
Olivier Dony a9d2b65da5 [MERGE] Fwd-port 7.0 up to 783b9e1 2014-07-11 11:51:06 +02:00
Christophe Simonis a361947143 [MERGE] forward port of branch saas-3 up to a35aec2 2014-07-10 22:02:58 +02:00
Christophe Simonis a35aec2a0b [MERGE] forward port of branch 7.0 up to 6e96ffd 2014-07-10 22:02:01 +02:00
Anand-Dharampuriya 5cbc611361 [FIX] Solve some mail issues which are currently present in 7.0 2014-07-10 16:29:54 +02:00
Fabien Meghazi c0aa86b9ab [FIX] configuration file dbfilter's option has no effect
lp bug: https://launchpad.net/bugs/940439 fixed

bzr revid: fme@openerp.com-20140508075025-yszqmzie1z4n7l4j
2014-07-07 18:08:31 +02:00
Christophe Simonis e5b0933743 [FIX] data-dir management
- sessions are now shared between series.
- use site data dir instead of user data dir if user has no home dir.
- in http and module handling, `data-dir` was used before being
initialized, using the default value instead of user input

(fixes #308, #904)
2014-07-07 15:49:24 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Olivier Dony 0f01df42ea [MERGE] Forward-port saas-5 up to f15cbd6 2014-06-12 18:59:15 +02:00
Olivier Dony f15cbd6520 [MERGE] Forward-port saas-4 bugfixes up to ad4c6ca 2014-06-12 18:54:36 +02:00
Fabien Meghazi 619ee620f7 [ADD] Pseudo `clone` mode for <templates> using primary="True"
When @primary="True" is present on <template> tag, we'll set
the t-name to the full canonical xmlid of current template (@id)
Providing a "kind of" clone mode for templates.
2014-06-11 17:03:02 +02:00
Olivier Dony 6b85d80f23 [FIX] Wrap werkzeug.utils.escape() to accomodate signature change in 0.9
We always want to escape quotes (") as part of the process of
generating HTML output. This option (quote=True) turned into
an implicit flag with a DeprecationWarning in werkzeug 0.9.0
It is likely to disappear in a future release of werkzeug too.
A wrapper avoids this warning without loss of compatibility
2014-06-10 18:46:40 +02:00
Christophe Simonis b4283f0271 [FIX] logging PostgreSQLHandler: expand message + use contextmanagers to handle exceptions and cursor 2014-05-28 11:43:24 +02:00
Olivier Dony 04211015fc [MERGE] Forward-port of latest saas-4 fixes, up to 0452851 2014-05-27 20:49:49 +02:00
Xavier Morel e06f5b414b [IMP] inherit_option_id -> application 2014-05-27 12:13:51 +02:00
Xavier Morel 8b9f774a22 [ADD] support for primary mode in <template>
should probably validate that there's an inherit_id (?)
2014-05-27 11:57:02 +02:00
Simon Lejeune b50421e551 [FIX] ir_actions: adapt render_report when called in a tests/qweb report context to generate the pdf only if a directory has been provided 2014-05-21 13:11:27 +02:00
Fabien Meghazi 05f376e310 If no addons-path provided, include the main addons 2014-05-20 22:33:49 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Christophe Simonis bb26dea60b [MERGE] forward port of branch saas-3 up to revid 38abc8a 2014-05-20 19:00:50 +02:00
Christophe Simonis 38abc8a006 [MERGE] forward port of branch 7.0 up to revid b09b6a0 2014-05-20 18:57:04 +02:00
Kiril Vangelovski c0882872be [ADD] Macedonian language 2014-05-18 22:57:07 +02:00
Martin Trigaux 4f5cc00420 Forward-port of latest saas-4, up to revision 5211 (revid fme@openerp.com-20140509164408-rtml4brrhpiv4zz9) 2014-05-12 10:05:23 +02:00
Fabien Meghazi cf87afbe0a [FIX] configuration file dbfilter's option has no effect
lp bug: https://launchpad.net/bugs/940439 fixed

bzr revid: fme@openerp.com-20140508075025-yszqmzie1z4n7l4j
2014-05-08 09:50:25 +02:00
Olivier Dony 4a248b029a [MERGE] I18N: make fr_CA one of the default installation languages, courtesy of Maxime Chambreuil (SavoirFaireLinux)
bzr revid: odo@openerp.com-20140507123155-blwh7uvmltajkmf5
2014-05-07 14:31:55 +02:00
Denis Ledoux fbbefe43c0 [MERGE] Forward-port of latest saas-3 bugfixes, up to rev. 5122 revid:dle@openerp.com-20140506121627-4oyw4zl4o6azy73w
bzr revid: dle@openerp.com-20140506121755-15gj3h43oqof6xx9
2014-05-06 14:17:55 +02:00
Denis Ledoux b882dd7109 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5294 revid:odo@openerp.com-20140505074636-bl2y5pst4pfmpz3u
bzr revid: dle@openerp.com-20140506121627-4oyw4zl4o6azy73w
2014-05-06 14:16:27 +02:00
Olivier Dony 188930bb01 [FIX] convert: gracefully ignore missing XML IDs when processing <delete> tags + warn in log
bzr revid: odo@openerp.com-20140505074636-bl2y5pst4pfmpz3u
2014-05-05 09:46:36 +02:00
Antony Lesuisse 7e25b9ae55 [MERGE] saas-4 report_webkit missing dependency on report
bzr revid: al@openerp.com-20140501152604-4cobh5ui47dt4pem
bzr revid: al@openerp.com-20140501155633-gefnc3zqcsr2rhaz
bzr revid: al@openerp.com-20140501161156-4wbsvhh8gz4r22h3
2014-05-01 18:11:56 +02:00
Olivier Dony 4836354a16 [FIX] safe_eval: allow STORE_FAST and DELETE_FAST opcodes, used e.g. for comprehension expressions
bzr revid: odo@openerp.com-20140428151133-uz7mphscch35dl6o
2014-04-28 17:11:33 +02:00
Christophe Simonis c16780df83 [MERGE] forward port of branch saas-3 up to revid 5120 chs@openerp.com-20140424125338-26k5atvtqwmmfv4e
bzr revid: chs@openerp.com-20140424131405-4oannh1102x42m8b
2014-04-24 15:14:05 +02:00
Christophe Simonis e59aecca94 [MERGE] forward port of branch 7.0 up to revid 5288 mat@openerp.com-20140423150215-578nzug1glccvpwy
bzr revid: chs@openerp.com-20140424125338-26k5atvtqwmmfv4e
2014-04-24 14:53:38 +02:00
Martin Trigaux 91bf583b1c [FIX] amount_to_text: make sure accented string is in unicode
bzr revid: mat@openerp.com-20140423150215-578nzug1glccvpwy
2014-04-23 17:02:15 +02:00
Martin Trigaux 901bb47235 [MERGE] [IMP] mail sanitizer: do not remove comments in html body when cleaning (and do not remove too many content) (opw 605315)
bzr revid: mat@openerp.com-20140423131919-q3vbw12tokglwdsq
2014-04-23 15:19:19 +02:00
Fabien Meghazi 8370d3f60e [MERGE] upstream
bzr revid: fme@openerp.com-20140423123808-q58dtl8a0bb2ymlf
2014-04-23 14:38:08 +02:00
Martin Trigaux 1db082db9d [FIX] convert: use _all_columns instead of _columns as it contain fields from inherited models.
bzr revid: mat@openerp.com-20140418164552-2mlprexkdlqlui2h
2014-04-18 18:45:52 +02:00
Xavier Morel 4934579abb [IMP] No cause to store self.fget.__name__ to its own attribute when it's only used once
bzr revid: xmo@openerp.com-20140418130629-30vp1veih7jfmnx7
2014-04-18 15:06:29 +02:00
Anael Closson 1528f9273b [FIX] tools: Comments in e-mail templates are removed before mako/jinja2 processing - opw 605315
bzr revid: acl@openerp.com-20140415143736-bcgwgribsv2hsbvo
2014-04-15 16:37:36 +02:00
Christophe Simonis 3d2e9b4d2b [MERGE] forward port of branch 7.0 up to revid 5281 launchpad_translations_on_behalf_of_openerp-20140412094159-mhy3v2prb3ctx32k
bzr revid: jke@openerp.com-20140409153527-mic1a8afcvdhsd27
bzr revid: chs@openerp.com-20140410102422-fcwxhjk40z0oy8x5
bzr revid: chs@openerp.com-20140415133650-y46i0o3qkb2atbvi
2014-04-15 15:36:50 +02:00
Antony Lesuisse f0dcf52159 [FIX] instrumentation to debug a deadlock probably due to a race condition in
the test cursor

bzr revid: al@openerp.com-20140411143645-ojb4t9plop4dmizh
2014-04-11 16:36:45 +02:00
Christophe Simonis 15680c94e1 [MERGE] forward port of branch saas-3 up to revid 5115 chs@openerp.com-20140410102422-fcwxhjk40z0oy8x5
bzr revid: chs@openerp.com-20140410105454-6utwgruj80h8wdss
2014-04-10 12:54:54 +02:00
Kersten Jeremy 3285feab53 [FIX] Allow missing opcodes, harden check for private attributes (dunder), check inside embedded code objects.
bzr revid: jke@openerp.com-20140409151659-xwttchbtbj02v1w7
2014-04-09 17:16:59 +02:00
Raphael Collet 5640f3076a [MERGE] test_cursor: implement a cursor mockup that never commits to database, and use it for http tests
bzr revid: rco@openerp.com-20140409145830-rop8esgic2y435kf
2014-04-09 16:58:30 +02:00
Raphael Collet e5e00e4c0a [IMP] registry: now cursor() simply returns a cursor, which may itself be used as a context manager
bzr revid: rco@openerp.com-20140409095604-joh9dt0qkma12ykm
2014-04-09 11:56:04 +02:00
Raphael Collet 6bc60505f4 [IMP] registry: add method get_cursor() to simply retrieve a new cursor, and refactor code to use it
bzr revid: rco@openerp.com-20140408125122-ki0zmin3m21k2itd
2014-04-08 14:51:22 +02:00
Simon Lejeune 2599ff5590 [MERGE] trunk
bzr revid: sle@openerp.com-20140407133627-36iijkx89552bwa0
bzr revid: sle@openerp.com-20140407174628-24wysrr3g8x0fijd
bzr revid: sle@openerp.com-20140408135137-0ficpzark3mjys9r
2014-04-08 15:51:37 +02:00
Christophe Simonis 0161666e8b [MERGE] forward port of branch saas-3 up to revid 5112 chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
bzr revid: chs@openerp.com-20140407160548-ttuc877kknuycoqw
2014-04-07 18:05:48 +02:00
Simon Lejeune 590fe996ad [FIX] as render_report is adapted to qweb, no need to filter in _exec_action
bzr revid: sle@openerp.com-20140402121237-t9tsnm9birhekj0b
2014-04-02 14:12:37 +02:00
Christophe Simonis 11af46b2b1 [FIX] resize_image: auto convert BMP images to PNG
bzr revid: chs@openerp.com-20140401154417-c8buuqybdsihn3om
2014-04-01 17:44:17 +02:00
Simon Lejeune c8aa0cc7f1 [FIX] Adapted the render_report and try_report_action methods used in yml test to work with qweb reports
bzr revid: sle@openerp.com-20140401153339-3n0xw5whx82uu0pu
2014-04-01 17:33:39 +02:00
Fabien Meghazi e6aadeb58c [FIX] Set correct record id for <template> tag converter
bzr revid: fme@openerp.com-20140327103844-irs3dga2xs969mdk
2014-03-27 11:38:44 +01:00
Fabien Meghazi 2eea637227 [MERGE] upstream
bzr revid: fme@openerp.com-20140326152307-d0rn3yuzel11457g
2014-03-26 16:23:07 +01:00
Antony Lesuisse 483bc96682 [IMP] wsgi and http cleanups, static http is now handled in http.py
bzr revid: al@openerp.com-20140326132057-scuiqvqma9dhyorl
2014-03-26 14:20:57 +01:00
Christophe Simonis 5b2634bd6e [FIX] init logger earlier, right after config loading
bzr revid: chs@openerp.com-20140325154627-cmodvx26jayj3k4a
2014-03-25 16:46:27 +01:00
Fabien Meghazi f86967960d [MERGE] upstream
bzr revid: fme@openerp.com-20140325153725-67hb463km4yvsnoe
2014-03-25 16:37:25 +01:00
Christophe Simonis c8eddb7d22 [ADD] openerp.tools.func.lazy_property():
Decorator for a lazy property of an object, i.e., an object attribute
 that is determined by the result of a method call evaluated once. To
 reevaluate the property, simply delete the attribute on the object, and
 get it again.

bzr revid: chs@openerp.com-20140324120001-935d90ye7tb8a5q4
2014-03-24 13:00:01 +01:00
Maxime Chambreuil 046f19fa9b [IMP] Add fr_CA translation
bzr revid: maxime.chambreuil@savoirfairelinux.com-20140323000805-vead0t0gcgkqzthh
2014-03-22 20:08:05 -04:00
Christophe Simonis fdd1f69294 [FIX] duplicate/rename/drop database: handle filestore
bzr revid: chs@openerp.com-20140321155659-gvg4br76214lur4l
2014-03-21 16:56:59 +01:00
Christophe Simonis 806648d611 [IMP] tools.exec_pg_command: hide command output
bzr revid: chs@openerp.com-20140321155605-u96hd1da3rrrmcgg
2014-03-21 16:56:05 +01:00
Kersten Jeremy 720339ed1d [MERGE] Merge branch lp:~numerigraphe/openobject-server/7.0-translation-order-933496-numerigraphe
bzr revid: jke@openerp.com-20140320090105-fl2jt7hhplwu6dgr
2014-03-20 10:01:05 +01:00
Antony Lesuisse e73230d0fc ir_logging fix logger names
bzr revid: al@openerp.com-20140320000912-1a5hngnw8ilq22k8
2014-03-20 01:09:12 +01:00
Antony Lesuisse 6e4db0a0a6 ir_logging fix config option
bzr revid: al@openerp.com-20140320000524-gs98xy6iqh2ceev6
2014-03-20 01:05:24 +01:00
Antony Lesuisse 666f4d0801 [MERGE] trunk
bzr revid: al@openerp.com-20140319235117-7trt1y3927mml13u
2014-03-20 00:51:17 +01:00
Fabien Meghazi 43419ed6e9 [IMP] Allow openerp.tools.convert_file() to optionally take the full path name
bzr revid: fme@openerp.com-20140319084931-1ipjqi2dd3ug7i2t
2014-03-19 09:49:31 +01:00
Christophe Simonis 8f8ca3bd84 [MERGE] forward port of branch saas-3 up to revid 5093 chs@openerp.com-20140318114540-l50kmo4azb57g31x
bzr revid: chs@openerp.com-20140318124112-cj65l3wysk2rhwlw
2014-03-18 13:41:12 +01:00
Xavier Morel 6a8f39533a [REM] forced filetype on resize_image_*, fix incorrect size spec on big
bzr revid: xmo@openerp.com-20140317094625-00mjd8ymcxvvl9yg
2014-03-17 10:46:25 +01:00
Xavier Morel 2688ac29a0 [FIX] keep image type intact during resize
Unless specficially requested, the output image should have the same file type
as the input (JPEG -> JPEG, PNG -> PNG), everything should not be converted to
PNG by default.

bzr revid: xmo@openerp.com-20140317084123-wvn8r4ot79610k1r
2014-03-17 09:41:23 +01:00
Antony Lesuisse 3168c3c1ca [MERGE] trunk
bzr revid: al@openerp.com-20140316183515-fthpvudn1rbmru4q
2014-03-16 19:35:15 +01:00
Antony Lesuisse e9d047e611 sql loggin cleanups
- prepare for netsvc will be renamed to logging
- move back log from http.py has it's used by the cron
- move sql handler to netsvc, simplify to use sql_db
- remove unused handler
- close plaform specific #ifdef pandora's box

bzr revid: al@openerp.com-20140316182933-jkcji9yqfbsokcmg
2014-03-16 19:29:33 +01:00
Christophe Simonis c7d114d9a9 [MERGE] forward port of branch saas-2 up to revid 5020 chs@openerp.com-20140312174526-a5rhh83g0fw8djuc
bzr revid: chs@openerp.com-20140312180614-8yb454s3mkjwnk2q
2014-03-12 19:06:14 +01:00
Antony Lesuisse 96db6703dd [MERGE] db dump/restore zip-based format.
The new format uses plain text sql and includes the filestore.
The old pg_dump format is still supported for db restore.

bzr revid: al@openerp.com-20140312174233-0ulbcwn784ujuk6p
2014-03-12 18:42:33 +01:00
Stephane Wirtel 4bbcfddc13 [MERGE] from trunk
bzr revid: stw@openerp.com-20140312102948-1n3b2d1vqedzojzb
2014-03-12 11:29:48 +01:00
Olivier Dony 46e1470987 [IMP] safe_eval: allowed opcodes: break, continue, raise ; extra builtins: unicode,int,float,long,enumerate,sum,all,any,ord,chr,cmp,divmod,isinstance,[x]range,zip
bzr revid: odo@openerp.com-20140306165849-1sxr9iv5cr87k77n
2014-03-06 17:58:49 +01:00
Christophe Simonis ec36a494fe [FIX] do not expose posix only config options on windows
bzr revid: chs@openerp.com-20140306115214-8wrfivy4runpzoar
2014-03-06 12:52:14 +01:00
Christophe Simonis 447d597815 [IMP] new backup format.
The new backup format is a zip containing the sql dump of the
database and the filestore of this database.

Old backups can still be restored

bzr revid: chs@openerp.com-20140304175656-iu3un6q43ttnhjfz
2014-03-04 18:56:56 +01:00
Stephane Wirtel 5918ad323e [MERGE] from Trunk
bzr revid: stw@openerp.com-20140228161338-8yjlkwacuube7vir
2014-02-28 17:13:38 +01:00
Stephane Wirtel 047d071a48 [IMP] Add a new Logging Handler, where we will store in the database of OpenERP.
this database can be overrided via the --log-pgsql-database

bzr revid: stw@openerp.com-20140228161147-s9nnrfq2tc94vq5p
2014-02-28 17:11:47 +01:00
Antony Lesuisse 8fec899f9b [FIX] move appsdirs to tools
bzr revid: al@openerp.com-20140227163259-asal833qjv3gylit
2014-02-27 17:32:59 +01:00
Antony Lesuisse 38d1ca1ff2 [MERGE] trunk
bzr revid: al@openerp.com-20140227161819-p9chmskfifo0rygs
2014-02-27 17:18:19 +01:00
Stephane Wirtel 855836e96e [IMP] Move the netsvc.dispatch_rpc function from netsvc to openerp.http
bzr revid: stw@openerp.com-20140227125648-kunaefr22y28honx
2014-02-27 13:56:48 +01:00
Christophe Simonis 65db3c635e [MERGE] forward port of branch saas-2 up to revid 5014 mat@openerp.com-20140220145701-6y7s1roj88q7ys13
bzr revid: chs@openerp.com-20140220160548-0rhulha4cml6t08v
2014-02-20 17:05:48 +01:00
Martin Trigaux c83247c38b [MERGE] Forward-port of latest saas-2 bugfixes, up to rev.5012 revid:mat@openerp.com-20140219134943-60ssztc01cxdtk09
bzr revid: mat@openerp.com-20140219140617-na0q47yaloblb67i
2014-02-19 15:06:17 +01:00
Martin Trigaux e635ebe6c1 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5238 revid:launchpad_translations_on_behalf_of_openerp-20140219053940-dvi4g7ajttoj6h9k
bzr revid: mat@openerp.com-20140219134943-60ssztc01cxdtk09
2014-02-19 14:49:43 +01:00
openerp-sle 3ef93918a8 [FIX] Increased allowed virtual memory per worker
bzr revid: openerp-sle@openerp-sle.home-20140212225240-nhu8dj68z84rm9u5
2014-02-12 23:52:40 +01:00
Martin Trigaux 94b3b0d6f6 [FIX] image tools: do not crop an image when resizing it, use reduce the size instead and add transparency background (opw 593992)
bzr revid: mat@openerp.com-20140212155104-zc6hhkzqw6711e9m
2014-02-12 16:51:04 +01:00
Denis Ledoux 1b2c0f74dc [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5229 revid:launchpad_translations_on_behalf_of_openerp-20140211064034-ghuxxk02n715othj
bzr revid: dle@openerp.com-20140211163902-ya86jr7lwlj1mkk9
2014-02-11 17:39:02 +01:00
Martin Trigaux e328c0a40e [FIX] html_sanitize: partial backport of trunk revision 5047.
Unescape elements that have been wrongly escaped.

Some elements (eg: 'href' tag in links) are sanitised in templates which prevents the execution of mako templates.

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

bzr revid: mat@openerp.com-20140210144023-9sp8cqn07ta5o64y
2014-02-10 15:40:23 +01:00
Antony Lesuisse 002ac937c1 add python --test-file support
bzr revid: al@openerp.com-20140209014636-2fbl15q8wrubmiup
2014-02-09 02:46:36 +01:00
Antony Lesuisse 82372e6a02 move tests
move test modules
remove xml test
add phantomjs test
readd remove uninstall test (currently disabled because of cr.commit)

bzr revid: al@openerp.com-20140209003745-ehrx8ikwkmusa644
2014-02-09 01:37:45 +01:00
Antony Lesuisse 4a5b4a8c3f [IMP] sale_eval break continue raise control flow opcodes
bzr revid: al@openerp.com-20140206124019-07in9p9capmznlo2
2014-02-06 13:40:19 +01:00
Christophe Simonis 500fea28b7 [MERGE] forward port of branch saas-2 up to revid 5007 chs@openerp.com-20140206110220-myn57cryam1y4k9v
bzr revid: chs@openerp.com-20140206110423-qe4h5ip2dg6dm7ph
2014-02-06 12:04:23 +01:00
Christophe Simonis a69f789b41 [MERGE] forward port of branch 7.0 up to revid 5224 chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
bzr revid: dle@openerp.com-20140205105045-j95kduyjiq83e57z
bzr revid: dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: dle@openerp.com-20140116161158-u95vcs3os4tk2zob
bzr revid: dle@openerp.com-20140121172737-gzawfi3ssg7xifef
bzr revid: chs@openerp.com-20140129094554-c3abc8x3qz9mpszr
bzr revid: chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140206110220-myn57cryam1y4k9v
2014-02-06 12:02:20 +01:00
Christophe Simonis c234d8547d [FIX] _(): avoid useless warning where translating string without a cursor
bzr revid: chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
2014-02-06 11:51:41 +01:00
Antony Lesuisse ec45bc96f9 [IMP] safe_eval add int float range, rename public user
bzr revid: al@openerp.com-20140130034238-qlgbu41d7mg9ns6i
2014-01-30 04:42:38 +01:00
Christophe Simonis eb091de615 [FIX] yaml import: not all views have a name
bzr revid: chs@openerp.com-20140127180230-eybz2dlc7qdjy1yh
2014-01-27 19:02:30 +01:00
Thibault Delavallée 2bcf4cca79 [FIX] tools: mail: support \[ and \] in tmeplates
bzr revid: tde@openerp.com-20140123152842-21b3gsey1mxt4v37
2014-01-23 16:28:42 +01:00
Thibault Delavallée 69af79ff3d [FIX] tools: mail: fixed last commit, now simply using replace
bzr revid: tde@openerp.com-20140123141435-jstfcaemjplbn7b1
2014-01-23 15:14:35 +01:00
Thibault Delavallée 5f1ec49ecd [FIX] tools: mail: when cleaning, unescape mako specific symbols.
Indeed those are escaped when contained inside an href or mailto element
of a tag, leading to mako not rendering the element.

bzr revid: tde@openerp.com-20140123125137-4u4i88f1ajybg5f2
2014-01-23 13:51:37 +01:00
Xavier Morel 5528b9b2d8 [FIX] sprurious error in log during javascript unit tests
During some tests, the runner performs sequences of DUPLICATE and DROP
on databases. Each DUPLICATE is followed by some operations then a
DROP.

Problem is, after a DROP the next DUPLICATE RPC query will attempt a
connection to the just-dropped database, openerp.sql_db will log an
OperationalError ("Connection to the database failed" since the db it
tries to connect to was removed) then the HTTP dispatcher will just
switch to "nodb" and continue on its merry way.

Mute the sql_db logger while attempting to fetch the ir.http object.

Also assert that the logger name is a string in mute_logger, as
`mute_logger(openerp.sql_db)` is syntactically valid, but will not do
anything.

bzr revid: xmo@openerp.com-20140123115413-ax5patcomdfp3ue3
2014-01-23 12:54:13 +01:00
Christophe Simonis a45b2c6b90 merge upstream
bzr revid: chs@openerp.com-20140117092206-ha47ryhjc4ph50nl
2014-01-17 10:22:06 +01:00
Thibault Delavallée c76a3aba8f [CLEAN] ir_qweb: simplified and cleaned QWebcontext implementation
- now using openerp.tools.safe_eval, instead of a custom eval with custom builtins
- removed undefined_handler, hardcoded to a lambda function that returns None for
a missing attribute

tools.safe_eval: added a parameter locals_builtins. This allows to copy the builtins
in the locals. This hack is due to the fact that the locals always returns None, allowing
to simplify templates. Otherwise we would have to test the existence of each variable
before actually using it.
However as the locals always return None for every key, the globals are never checked.
Copying the builtins inside the local allows to have a complete locals, but sligtly
break the globals/locals separation.

To be reviewed and approved.

bzr revid: tde@openerp.com-20140116182750-1rnw8iljt5a9gb4u
2014-01-16 19:27:50 +01:00
Christophe Simonis c48f11041b [IMP] chmod data-dir
bzr revid: chs@openerp.com-20140116164406-p2gtb2uziwhchp68
2014-01-16 17:44:06 +01:00
Christophe Simonis db10e1d3a5 [FIX] http: store sessions in data-dir
bzr revid: chs@openerp.com-20140116164142-ikcw82lyfopoj46k
2014-01-16 17:41:42 +01:00
Christophe Simonis a73c02075a [FIX] ensure data-dir (and subdirs) exists
bzr revid: chs@openerp.com-20140116100243-ltp6yunvm1bnvn5q
2014-01-16 11:02:43 +01:00
Thibault Delavallée ab5c23079a [MERGE] Sync with trunk, solved conflicts.
bzr revid: tde@openerp.com-20140116091716-zk1n5ots94i65io5
2014-01-16 10:17:16 +01:00
Christophe Simonis 0771ca2692 [MERGE] forward port of branch saas-2 up to revid 5002 dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: chs@openerp.com-20140115205357-arptzm69logz3osm
2014-01-15 21:53:57 +01:00
Christophe Simonis 5269664102 [FIX] correct uses of addons_path
bzr revid: chs@openerp.com-20140115180313-pqcrfmstci2w21y8
2014-01-15 19:03:13 +01:00
Christophe Simonis 5d87753ef2 [ADD] new cli argument: -D/--data-dir
bzr revid: chs@openerp.com-20140115171323-eiy2h61qi098n0q3
2014-01-15 18:13:23 +01:00
Thibault Delavallée c63ffed24d [IMP] tools: mail: the cleaner, by parsing and serializing the html content,
encapsulatse the whole content inside a div. This means that html fields are
not editor-clean after being sanitized, because a div has been inserted as root
element. Removing this element allows to have snippets that can be dragged,
dropped, or to insert new snippets inside edited html content in html fields.

[IMP] tools: tests: mail: updated a test accordingly

bzr revid: tde@openerp.com-20140115142709-e4951b4nc06sfxf0
2014-01-15 15:27:09 +01:00
Thibault Delavallée 2c4600f242 [IMP] [READD] [IMP] tools: mail: have a strict mode for html_sanitizer (not default) with
options before website: without frames, with safe attributes only.
We will have to find a way to use the strict mode when parsing incoming
emails, but not when sending or storing openerp content.

Currently the not strict mode is the default one, to avoid side-effects with
the website.

bzr revid: tde@openerp.com-20140115141319-g15zl1kqrp8sgoa3
2014-01-15 15:13:19 +01:00
Olivier Dony 7a819ca8d0 [FIX] tools.email_split: improve email extraction using stdlib + extra tests
The original code was having issues telling apart
names containing emails from the actual email.
This patch is inspired by Etienne Hirt's patch
on bug 1165531 for OpenERP 6.1.
This will also help solve bug 1199386, if we can
centralize all email parsing through this helper.

lp bug: https://launchpad.net/bugs/1199386 fixed
lp bug: https://launchpad.net/bugs/1165531 fixed

bzr revid: odo@openerp.com-20140114154426-usu6intv5139egd3
2014-01-14 16:44:26 +01:00
Thibault Delavallée fe0af74eab [REV] Reverted last commit.
bzr revid: tde@openerp.com-20140113165423-8nu3838d4yj3h3j4
2014-01-13 17:54:23 +01:00
Thibault Delavallée 94357739bc [IMP] tools: mail: have a strict mode for html_sanitizer (not default) with
options before website: without frames, with safe attributes only.
We will have to find a way to use the strict mode when parsing incoming
emails, but not when sending or storing openerp content.

Currently the not strict mode is the default one, to avoid side-effects with
the website.

bzr revid: tde@openerp.com-20140113085701-f2bzu94cq1z3tl10
2014-01-13 09:57:01 +01:00
Stephane Wirtel 89f71281a7 [IMP] Backport one feature from website: this feature allows to specify a file
path on the field tag fetching the right file instead of using the base64
encoded file in the field.

<field name="image" type="base64" file="base/static/img/main_partner-image.png" />

bzr revid: stw@openerp.com-20140109154338-0spjbo109pxh75pp
2014-01-09 16:43:38 +01:00
Denis Ledoux 05aab83eb1 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9743 revid:qdp-launchpad@openerp.com-20140108160719-9i8xhrat49cn9l5e
bzr revid: chs@openerp.com-20140107141524-xzz39a2ym66swr0t
bzr revid: chs@openerp.com-20140107172248-zic9mqg0rigy2czb
bzr revid: chs@openerp.com-20140108160418-ph17jgy5hlejj9hr
bzr revid: dle@openerp.com-20140108171400-8r0fwv3wi36w2im0
2014-01-08 18:14:00 +01:00
Xavier Morel 6aa79d8cb3 [IMP] attempt to improve yaml test message in order to make its errors somewhat less cryptic
and make it easier to understand why it's whining.

bzr revid: xmo@openerp.com-20140108133722-9ac9l3w7wij0pl1i
2014-01-08 14:37:22 +01:00
Thibault Delavallée 7a72d858cb [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140103151324-jk0u8vmrxxomy5vx
2014-01-03 16:13:24 +01:00
Martin Trigaux 79f716c70f [MERGE] forward port of latest saas-2 until rev 4996 dle@openerp.com-20131218123130-vlejjv7r2klkzoj0
bzr revid: mat@openerp.com-20131218160041-58x5kij4v7earagu
2013-12-18 17:00:41 +01:00
Xavier ALT 4986d636b4 [FIX] translation: force clearing of cached translated term after a successfull `trans_load_data`
When re-loading a translation (with 'Overwrite Existing Terms') we need to
  empty the translation cache to ensure overwritten terms get their new values.

bzr revid: xal@openerp.com-20131217145738-9oy2fjhbc46yzonq
2013-12-17 15:57:38 +01:00
Fabien Meghazi a859a53e72 [FIX] ir.model.data#_update() should honor the noupdate flag
In `init` mode, a record can still be filled with multiple record
nodes with the first node being in a data@noupdate="1" and the other
nodes without @noupdate attribute but this won't be the case anymore in
`update` mode

bzr revid: fme@openerp.com-20131216144304-2e8b9xvoks2fvlj9
2013-12-16 15:43:04 +01:00
Fabien Pinckaers f9e986ecea [IMP] allow frames in blogs (video, ...
bzr revid: fp@tinyerp.com-20131214211309-i2kk3cb60hnp1urz
2013-12-14 22:13:09 +01:00
Fabien Pinckaers 65a5ce8a92 [IMP] HMTL5 main element
bzr revid: fp@tinyerp.com-20131213214157-8ow63hpaii6hdvxl
2013-12-13 22:41:57 +01:00
Fabien Pinckaers 630e9ad64c [FIX] Don't remove data-... attributes like data-snippet-id
bzr revid: fp@tinyerp.com-20131209185406-newaf16v532l146p
2013-12-09 19:54:06 +01:00
Denis Ledoux 20be322c45 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9684 rev-id: dle@openerp.com-20131209145652-3g9rgnfz1w8k0whw
bzr revid: chs@openerp.com-20131202105848-33gcz1715w370rve
bzr revid: dle@openerp.com-20131204150643-is3y0b9n8enh3yql
bzr revid: chs@openerp.com-20131206152726-pirikn7v8pev90ic
bzr revid: dle@openerp.com-20131206162437-b9niay99mirk44qm
bzr revid: tde@openerp.com-20131209102019-kjeg0rx2au1d5e5v
bzr revid: dle@openerp.com-20131209155721-589zihxx8jmvlpvp
2013-12-09 16:57:21 +01:00
Martin Trigaux 0216a53a0f [FIX] convert: better error message when failed to load csv file (module name already in path, no need to append)
bzr revid: mat@openerp.com-20131204155244-sy223fbt0tmpeqw1
2013-12-04 16:52:44 +01:00
Cecile Tonglet 767aaeb8cc [FIX] Wrong error message when data cannot be loaded at module loading
bzr revid: cto@openerp.com-20131203092433-uu1brp5csqvvd8yh
2013-12-03 10:24:33 +01:00
Christophe Matthieu 8460122209 [MERGE] sync with trunk
bzr revid: chm@openerp.com-20131202150856-fzrfcoa8pmsjutau
2013-12-02 16:08:56 +01:00
Christophe Simonis 56bb1b9869 [MERGE] forward port of branch saas-2 up to revid 4992 chs@openerp.com-20131202105848-33gcz1715w370rve
bzr revid: chs@openerp.com-20131127110757-5kaay2kcxq0ysb59
bzr revid: chs@openerp.com-20131127161639-yur4rdh3wx43kxle
bzr revid: chs@openerp.com-20131127180647-f8uws77gaym5kfvd
bzr revid: chs@openerp.com-20131202110030-gf20dv2uj5fqv7c2
2013-12-02 12:00:30 +01:00
Fabien Pinckaers 3e26abe6ee [FIX] fix to support groups on tempaltes
bzr revid: fp@tinyerp.com-20131202085952-htkxqv3l3zdtecnu
2013-12-02 09:59:52 +01:00
Xavier Morel 228938ccba [ADD] formats support to date and datetime converters
bzr revid: xmo@openerp.com-20131202073313-tu79esduu5bvyaai
2013-12-02 08:33:13 +01:00
Fabien Pinckaers 4a3529afdf [IMP] Performance improvement: improved cache with context, better get_object
bzr revid: fp@tinyerp.com-20131130154723-05r90b2yhwwovpx4
2013-11-30 16:47:23 +01:00
Denis Ledoux f6d7ee39fc [FIX]tools, translate: more tolerant code, if the model does not exist anymore (impossible to syncrhonize translation terms if there are ir_model_fields with non-existing models)
bzr revid: dle@openerp.com-20131127161154-t8xfjiytqq8ja8fh
2013-11-27 17:11:54 +01:00
Christophe Simonis d26e253edd [IMP] dumpstack dumps greenlets when running in evented mode.
(forward port lost during previous commit)

bzr revid: chs@openerp.com-20131125155956-x92vq9w4r9ov4vcc
2013-11-25 16:59:56 +01:00
Christophe Simonis ab386c0f5f [MERGE] forward port of branch saas-2 up to revid 4984 chs@openerp.com-20131125151017-lmj53bxg1pfrr4a7
bzr revid: chs@openerp.com-20131125154140-cpbk4tcdml2a3b9n
2013-11-25 16:41:40 +01:00
Christophe Simonis 3211a29d9b [MERGE] forward port of branch 7.0 up to revid 5148 mat@openerp.com-20131125125008-wmpssjk5vygdcc0w
bzr revid: chs@openerp.com-20131125151017-lmj53bxg1pfrr4a7
2013-11-25 16:10:17 +01:00
Olivier Dony 4e4b5af3d9 [ADD] i18n: enable Lao language (Laos) as an installation option
bzr revid: odo@openerp.com-20131125084215-nddml5h65i2xkuf9
2013-11-25 09:42:15 +01:00
Christophe Simonis 84fd6ea4f1 [FIX] yaml import: for record tags, do not shadow values explicitly set in yaml.
bzr revid: chs@openerp.com-20131124115235-13sc11q51v95hxfr
2013-11-24 12:52:35 +01:00
Denis Ledoux 6fd552c3ce [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5139 rev-id: dle@openerp.com-20131121132305-qjlclgz5v9tze1fr
bzr revid: odo@openerp.com-20131120102545-2tlp031yib6viz35
bzr revid: chs@openerp.com-20131120161708-c8sbom592moukwxw
bzr revid: dle@openerp.com-20131121155457-lh7fzouk2upeiu16
2013-11-21 16:54:57 +01:00
Fabien Pinckaers 0eb2bed2ca [FIX] priority of templates are now working
bzr revid: fp@openerp.com-20131117072335-chwjkpcj8hv431z3
2013-11-17 08:23:35 +01:00
Christophe Simonis 7ba1d747cc [FIX] html_sanitize: handle the case of empty documents (after sanitization).
[IMP] test_mail: do not mute logger

bzr revid: chs@openerp.com-20131113113715-tzaog0d6o2u4q0x4
2013-11-13 12:37:15 +01:00
Thibault Delavallée 97f164ba99 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20131028163325-2hpks3hp23zop40n
2013-10-28 17:33:25 +01:00
Christophe Simonis d91819cb43 [MERGE] forward port of branch saas-2 up to revid 4965 chs@openerp.com-20131025103939-5gta1eifjhx1tsmi
bzr revid: chs@openerp.com-20131025104326-4k5hayl0bwdgt0mm
2013-10-25 12:43:26 +02:00
Xavier Morel a622a5ad55 [FIX] remove handling of parameters in ormcache clearing
It's completely broken in case of optional parameters
e.g. (ir.translation)._get_source, as a call with the optional
parameter won't be matched by a clear without, and the other way
around. This becomes even more problematic in the website branch as
_get_source now has *two* optional parameters (source and res_id).

After discussion with odo and discovery that in multiprocess only the
current node will use any granularity (other nodes not only clear all
of the current method cache, but all caches of all models), simplify
cache clearing, ignore parameters and just blow the current method's
cache entirely.

bzr revid: xmo@openerp.com-20131024132956-4tl3prum8za47igy
2013-10-24 15:29:56 +02:00
Thibault Delavallée 357676b6de [MERGE] [FIX] tools: mail: fixed shortening of html content.
Fixed length computation of text in html nodes: multiples successive whitespaces are considered as one whitespaces; better truncate position when adding a read more link; now always protect words (placed after the first word that exceeds the shorten position); pre nodes are preserved about whitespaces; when the read more link should go into a quote, it instead goes at the end of the first parent node not being quoted instead of at a wrong position.

Misc :
- removed an unnecessary loop by merging two root.iter() that do not interfere
- changed occurrences of getiterator to iter, because getiterator is deprecated
- nodes are cleaned after processing, removing all attributes used to tag nodes
- fixed a bug about cleaning span containing only whitespaces not always cleaned

Added tests for shorten position.

bzr revid: tde@openerp.com-20131024084411-pytwt9g1gdmoebzc
2013-10-24 10:44:11 +02:00
Thibault Delavallée dbe253b0e4 [FIX] Fixed bug due to copy-and-paste: outertext is now valid
bzr revid: tde@openerp.com-20131024083955-ipbsf8rxbzm0mag3
2013-10-24 10:39:55 +02:00
Thibault Delavallée e14de7a637 [FIX] Fixed previous commit, car go to len of the string.
bzr revid: tde@openerp.com-20131023123839-gvf9ugft2b2xmo9a
2013-10-23 14:38:39 +02:00
Thibault Delavallée 7f61d18ef9 [CLEAN] tools: cleaned modified code
bzr revid: tde@openerp.com-20131023122744-3b3hayy4f8ss2bjx
2013-10-23 14:27:44 +02:00
Thibault Delavallée 57c11338ae [IMP] tools: mail: added a protection in a string.find, could have a None argument
bzr revid: tde@openerp.com-20131022142908-sol44xaprx1b0b0a
2013-10-22 16:29:08 +02:00
Thibault Delavallée af29bf7bc9 [FIX] tools: mail: fixed shortening of html content.
Fixed length computation of text in html nodes: multiples successive
whitespaces are considered as one whitespaces; better truncate position
when adding a read more link; now always protect words (placed after
the first word that exceeds the shorten position); pre nodes are preserved
about whitespaces; when the read more link should go into a quote, it instead
goes at the end of the first parent node not being quoted instead of at
a wrong position.

Added tests for shorten position.

bzr revid: tde@openerp.com-20131022135037-igauu2kkglvdrqu7
2013-10-22 15:50:37 +02:00
niv-openerp 5696282656 [MERGE] saas2
bzr revid: nicolas.vanhoren@openerp.com-20131018103501-sns9zca0nmpm9efn
2013-10-18 12:35:01 +02:00
Olivier Dony 71f1665b98 [FIX] tools.mail: typo causing infinite loop + fix test parameters to actually enter it
bzr revid: odo@openerp.com-20131018085118-9b2ltkpff5c8yzmr
2013-10-18 10:51:18 +02:00
Thibault Delavallée 6bc32a8b4b [FIX] tools: mail: fixed / improved html_email_clean.
Read more links could not appear when the shorten limit was obtained
inside a quote that is removed in the process, removing the read
more link node. It now get the first parent that is not inside a
quote to be sure the link is displayed.

Added the test-case that helped find this bug.

bzr revid: tde@openerp.com-20131017110525-etn0u5s91zbnvul1
2013-10-17 13:05:25 +02:00
Thibault Delavallée 983d5eb9fa [FIX] tools: html_email_clean: fixed regex for
signature that was buggy when having dots.
Also fixed read more link addition.

Added test case that triggered the error.

bzr revid: tde@openerp.com-20131016103516-w44j6r5oaljpwvmx
2013-10-16 12:35:16 +02:00
Xavier Morel 856e3d0b91 [MERGE] from trunk
bzr revid: xmo@openerp.com-20131007085815-sfzb0lrhysxsdxzg
2013-10-07 10:58:15 +02:00
Thibault Delavallée b74c255168 [MERGE] Sync with trunk until revision 4967 (including al cleaning)
bzr revid: tde@openerp.com-20131007081039-adyay7oy1tpx4g2k
2013-10-07 10:10:39 +02:00
Antony Lesuisse 40ba925691 [IMP] --auto-reload to enable code and xml auto reload, service cleanup.
Added an autoreload mecanism based on pyinotify that restart the server as soon
as a .py or .xml file change is detected, for xml updates the relevant -u are
automatically added to exec(2).

pyinotify is linux specific and should be replaced by a cross plaform library
such as watchdog. Unfortunatly watchdog is not yet packaged in debian. We could
support both libraries, patches are welcome.

Refactored the code in cli/* and service/*. The 3 running modes of openerp
(threaded, prefork, gevent) are now in openerp/service/server.py, one class per
mode, and they share the same interface.

Added a signal handler to increase or decrase the number of HTTP workers in
prefork mode (SIGTTIN, SIGTTOU).

bzr revid: al@openerp.com-20131005225740-hrxwy50ldi5yql0e
2013-10-06 00:57:40 +02:00
Antony Lesuisse 2170da5e1e merge trunk
bzr revid: al@openerp.com-20131005220411-l1op0sya6h515m5b
2013-10-06 00:04:11 +02:00
Antony Lesuisse 0a75a6b5ff simplier autoreload working
bzr revid: al@openerp.com-20131005212240-5lp8tgwukeg5wwdq
2013-10-05 23:22:40 +02:00
Xavier Morel 40ab4f6e83 [MERGE] from trunk
bzr revid: xmo@openerp.com-20131004144724-pj6kd1ftw0sy0lbd
2013-10-04 16:47:24 +02:00
Xavier Morel 81a82ca37f [IMP] make qweb into an openerp object
also attempt to improve/simplify a few implementation details

bzr revid: xmo@openerp.com-20131004114155-j2639jx6dwvkz3hh
2013-10-04 13:41:55 +02:00