Commit Graph
13 Commits
Author SHA1 Message Date
Xavier ALT c5e1bffa3d [FIX] tools: formatLang should use cached lang 2018-08-13 11:18:00 +02:00
Olivier Dony ef017ab1ab [FIX] base: always preload dateutil
The dateutil package uses lazy import to selectively expose its
features: `parser`, `relativedelta`, `rrule`, `tz`.

Depending on installed modules and order of initialization, there was no
guarantee that a given feature was already loaded during the preparation
of the action context.

This patch ensures that we always preload the feature set we need, and
only that feature set. This way we have a consistent `dateutil` lib in
the action context at all times.
2018-07-23 16:15:10 +02:00
Nicolas Martinelli a9beee42d6 [FIX] tools: lang in formatLang
- Install French language
- Set language of Customer A to French
- Create an invoice due in the past
- Open the Customer Statements

The customer statement of A is translated in French, but the amounts are
formatted in the company's user language (English by default).

We add the possiblity to take into account the lang in the context when
calling `formatLang`.
2017-11-15 12:57:19 +01:00
Adrien Peiffer (ACSONE) 0fff391c38 [FIX] tools: empty name
Check if name isn't empty before executing regex. xlsxwriter can handle
an empty name.

opw-769163
Closes #18877
2017-08-31 13:47:41 +02:00
Fabien Meghazi 2c0f6f39d7 [IMP] http: improve dumpstacks and remaining requests handling during tests (#18640)
This patch modifies Root#dispatch() in order to keep the httprequest url
in the current thread's attribute and use if for dumpstacks and the
phantomjs tests remaining requests handling.

Also added a counter in order to avoid looping forever when trying to join unclosed http requests
in phantomjs test suite after a phantomjs failure + added a log.warning in such a case so it's easier to troubleshoot runbot's ir.logging.
2017-08-03 10:50:18 +02:00
Christophe Monniez c1e154bee1 [FIX] tools: ensure xlsx worksheet names are valid
When xlsx is used, the worksheet name may be longer than 31 chars and
raise an exception.

This fix will troncate the name up to 31 chars and will remove invalid
chars.

Similar patch was already done at 0122c05eff for xlwt

xlsxwriter 0.9.8 has added a parameter worksheet_class=None so adding **kw to be
compatible with installs with the latest version (requirements.txt asks for
version 0.9.3)

Closes #18077
opw-751157
2017-07-07 09:44:09 +02:00
Olivier Dony 76cd8d2558 [FIX] tools: verify path before opening 2017-06-02 22:13:36 +02:00
Christophe Simonis 5dc1c57601 [MERGE] forward port branch saas-11 up to 7842498 2016-12-01 16:59:33 +01:00
Christophe Simonis 0acd63d073 [MERGE] forward port branch saas-12 up to 27dc061 2016-10-12 17:03:55 +02:00
Raphael Collet 9374892bb9 [IMP] tools: make OrderedSet implement the full set API 2016-09-06 12:23:06 +02:00
Olivier Dony 6ea36beec5 [FIX] models: preserve order when merging recordsets
RecordSets were not preserving order when combined
with AND/OR set operators. Order was lost as well
through mapped().

This caused various recurring "heisenbugs" during
tests executions on runbot, specifically comming
in the test of stock_landed_costs.

Using OrderedSets instead of basic Sets to resolve
these operation avoids the indetermination.

This required an implementation of __or__ / __and__
for OrderedSet.
2016-09-05 12:17:04 +02:00
Raphael Collet 4a700d0ad9 [FIX] odoo: rename imports and adapt import hooks 2016-09-02 17:28:12 +02:00
Raphael Collet 9e64f9f951 [REF] openerp: move openerp to odoo 2016-09-02 17:28:12 +02:00