diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-07-30 10:53:25 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-07-30 10:53:25 +0200 |
| commit | b8f866c57b7bcf45fe3fd8c8b9bde30a24d67bc9 (patch) | |
| tree | bbcd7ad0a24762a9bccc7bab999b08a3412d9e10 | |
| parent | 92a224ee3a6aafaf33911dd9a7cac8f53fc413f7 (diff) | |
| parent | 3a14b75518ab5c9a62dfb0238e9c5f04d957a25f (diff) | |
[MERGE] forward port branch 10.0 up to 3a14b75518a
| -rw-r--r-- | addons/event/data/email_template_data.xml | 1 | ||||
| -rw-r--r-- | odoo/addons/base/ir/ir_qweb/fields.py | 6 | ||||
| -rw-r--r-- | odoo/addons/test_converter/tests/test_html.py | 4 | ||||
| -rw-r--r-- | odoo/service/server.py | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/addons/event/data/email_template_data.xml b/addons/event/data/email_template_data.xml index 27dfb81ce1d..2e61e2bc781 100644 --- a/addons/event/data/email_template_data.xml +++ b/addons/event/data/email_template_data.xml @@ -328,7 +328,6 @@ <td style="padding:25px 0px;"> <strong>Add this event to your calendar</strong> <a href="https://www.google.com/calendar/render?action=TEMPLATE&text=${object.event_id.name}&dates=${date_begin}/${date_end}&location=${location}" style="padding:3px 5px;border:1px solid #875A7B;color:#875A7B;text-decoration:none;border-radius:3px;" target="new"><img src="/web_editor/font_to_img/61525/rgb(135,90,123)/16" style="vertical-align:middle;" height="16"> Google</a> - <a href="https://bay02.calendar.live.com/calendar/calendar.aspx?rru=addevent&summary=${object.event_id.name}&dtstart=${date_begin}&dtend=${date_end}&location=${location}" style="padding:3px 5px;border:1px solid #875A7B;color:#875A7B;text-decoration:none;border-radius:3px;" target="new"><img src="/web_editor/font_to_img/61525/rgb(135,90,123)/16" style="vertical-align:middle;" height="16"> Outlook</a> <a href="https://calendar.yahoo.com/?v=60&view=d&type=20&title=${object.event_id.name}&in_loc=${location}&st=${format_tz(object.event_id.date_begin, tz='UTC', format='%Y%m%dT%H%M%S')}&et=${format_tz(object.event_id.date_end, tz='UTC', format='%Y%m%dT%H%M%S')}" style="padding:3px 5px;border:1px solid #875A7B;color:#875A7B;text-decoration:none;border-radius:3px;" target="new"><img src="/web_editor/font_to_img/61525/rgb(135,90,123)/16" style="vertical-align:middle;" height="16"> Yahoo</a> </td> </tr> diff --git a/odoo/addons/base/ir/ir_qweb/fields.py b/odoo/addons/base/ir/ir_qweb/fields.py index 28d60940978..fd7f9b22f71 100644 --- a/odoo/addons/base/ir/ir_qweb/fields.py +++ b/odoo/addons/base/ir/ir_qweb/fields.py @@ -122,7 +122,7 @@ class IntegerConverter(models.AbstractModel): @api.model def value_to_html(self, value, options): - return unicodifier(self.user_lang().format('%d', value, grouping=True).replace(r'-', u'\u2011')) + return unicodifier(self.user_lang().format('%d', value, grouping=True).replace(r'-', u'-\N{ZERO WIDTH NO-BREAK SPACE}')) class FloatConverter(models.AbstractModel): @@ -142,7 +142,7 @@ class FloatConverter(models.AbstractModel): value = float_utils.float_round(value, precision_digits=precision) fmt = '%.{precision}f'.format(precision=precision) - formatted = self.user_lang().format(fmt, value, grouping=True).replace(r'-', u'\u2011') + formatted = self.user_lang().format(fmt, value, grouping=True).replace(r'-', u'-\N{ZERO WIDTH NO-BREAK SPACE}') # %f does not strip trailing zeroes. %g does but its precision causes # it to switch to scientific notation starting at a million *and* to @@ -326,7 +326,7 @@ class MonetaryConverter(models.AbstractModel): lang = self.user_lang() formatted_amount = lang.format(fmt, display_currency.round(value), - grouping=True, monetary=True).replace(r' ', u'\N{NO-BREAK SPACE}').replace(r'-', u'\u2011') + grouping=True, monetary=True).replace(r' ', u'\N{NO-BREAK SPACE}').replace(r'-', u'-\N{ZERO WIDTH NO-BREAK SPACE}') pre = post = u'' if display_currency.position == 'before': diff --git a/odoo/addons/test_converter/tests/test_html.py b/odoo/addons/test_converter/tests/test_html.py index c9bb6769d08..61c457e7b8e 100644 --- a/odoo/addons/test_converter/tests/test_html.py +++ b/odoo/addons/test_converter/tests/test_html.py @@ -73,7 +73,7 @@ class TestFloatExport(TestBasicExport): converter = self.get_converter('float') value = converter(-42.0) - self.assertEqual(value, u"\u201142.0") + self.assertEqual(value, u"-\N{ZERO WIDTH NO-BREAK SPACE}42.0") value = converter(42.0100) self.assertEqual(value, "42.01") @@ -120,7 +120,7 @@ class TestCurrencyExport(TestExport): converted = self.convert(obj, dest=currency) self.assertEqual( - converted, u'<span class="oe_currency_value">\u20110.12</span>' + converted, u'<span class="oe_currency_value">-\N{ZERO WIDTH NO-BREAK SPACE}0.12</span>' u'\N{NO-BREAK SPACE}{symbol}'.format( obj=obj, symbol=currency.symbol.encode('utf-8') diff --git a/odoo/service/server.py b/odoo/service/server.py index 45b02f9f1da..b1fb4068d88 100644 --- a/odoo/service/server.py +++ b/odoo/service/server.py @@ -130,7 +130,7 @@ class FSWatcher(object): if isinstance(event, (FileCreatedEvent, FileModifiedEvent, FileMovedEvent)): if not event.is_directory: path = getattr(event, 'dest_path', event.src_path) - if path.endswith('.py'): + if path.endswith('.py') and not os.path.basename(path).startswith('.~'): try: source = open(path, 'rb').read() + '\n' compile(source, path, 'exec') |
