Skip to content

Commit 5c199dc

Browse files
committed
[MIG] datatime_formatter migration to 9.0
1 parent b747cfc commit 5c199dc

File tree

8 files changed

+15
-11
lines changed

8 files changed

+15
-11
lines changed

datetime_formatter/README.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,15 @@ If you are a developer, to use this module, you need to:
3737

3838
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
3939
:alt: Try me on Runbot
40-
:target: https://runbot.odoo-community.org/runbot/149/8.0
40+
:target: https://runbot.odoo-community.org/runbot/149/9.0
4141

4242
Bug Tracker
4343
===========
4444

4545
Bugs are tracked on `GitHub Issues
4646
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
4747
check there if your issue has already been reported. If you spotted it first,
48-
help us smashing it by providing a detailed and welcomed `feedback
49-
<https://github.com/OCA/
50-
server-tools/issues/new?body=module:%20
51-
datetime_formatter%0Aversion:%20
52-
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
53-
48+
help us smashing it by providing a detailed and welcomed feedback.
5449

5550
Credits
5651
=======
@@ -59,6 +54,7 @@ Contributors
5954
------------
6055

6156
* Jairo Llopis <[email protected]>
57+
* Vicent Cubells <[email protected]>
6258

6359
Maintainer
6460
----------

datetime_formatter/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
3+
# © 2016 Tecnativa, S.L. - Vicent Cubells
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45
from . import models

datetime_formatter/__openerp__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
3+
# © 2016 Tecnativa, S.L. - Vicent Cubells
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45

56
{
67
"name": "Date & Time Formatter",
78
"summary": "Helper functions to give correct format to date[time] fields",
8-
"version": "8.0.1.0.0",
9+
"version": "9.0.1.0.0",
910
"category": "Tools",
10-
"website": "https://grupoesoc.es",
11+
"website": "https://tecnativa.com",
1112
"author": "Grupo ESOC Ingeniería de Servicios, "
13+
"Tecnativa,"
1214
"Odoo Community Association (OCA)",
1315
"license": "AGPL-3",
1416
"installable": True,

datetime_formatter/exceptions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
3+
# © 2016 Tecnativa, S.L. - Vicent Cubells
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45
from openerp import _, exceptions
56

datetime_formatter/models.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
3+
# © 2016 Tecnativa, S.L. - Vicent Cubells
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45
from datetime import datetime, timedelta
5-
from openerp import api, exceptions, fields, models
6+
from openerp import api, fields, models
67
from openerp.tools import (DEFAULT_SERVER_DATE_FORMAT,
78
DEFAULT_SERVER_TIME_FORMAT)
89
from . import exceptions as ex
@@ -53,7 +54,7 @@ def best_match(self, lang=None, failure_safe=True):
5354

5455
try:
5556
record.ensure_one()
56-
except exceptions.except_orm:
57+
except ValueError:
5758
if not failure_safe:
5859
raise ex.BestMatchedLanguageNotFoundError(lang)
5960
else:

datetime_formatter/tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
3+
# © 2016 Tecnativa, S.L. - Vicent Cubells
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45
from . import test_best_matcher, test_formatter

datetime_formatter/tests/test_best_matcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
3+
# © 2016 Tecnativa, S.L. - Vicent Cubells
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45
from openerp.tests.common import TransactionCase
56
from .. import exceptions

datetime_formatter/tests/test_formatter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
3+
# © 2016 Tecnativa, S.L. - Vicent Cubells
34
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
45
import datetime
56
from random import random

0 commit comments

Comments
 (0)