Browse Source

[MIG] datatime_formatter migration to 9.0

pull/605/head
cubells 8 years ago
committed by Pedro M. Baeza
parent
commit
9ef3d766fe
  1. 10
      datetime_formatter/README.rst
  2. 1
      datetime_formatter/__init__.py
  3. 6
      datetime_formatter/__openerp__.py
  4. 1
      datetime_formatter/exceptions.py
  5. 5
      datetime_formatter/models.py
  6. 1
      datetime_formatter/tests/__init__.py
  7. 1
      datetime_formatter/tests/test_best_matcher.py
  8. 1
      datetime_formatter/tests/test_formatter.py

10
datetime_formatter/README.rst

@ -37,7 +37,7 @@ If you are a developer, to use this module, you need to:
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/8.0
:target: https://runbot.odoo-community.org/runbot/149/9.0
Bug Tracker
===========
@ -45,12 +45,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/
server-tools/issues/new?body=module:%20
datetime_formatter%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
@ -59,6 +54,7 @@ Contributors
------------
* Jairo Llopis <j.llopis@grupoesoc.es>
* Vicent Cubells <vicent.cubells@tecnativa.com>
Maintainer
----------

1
datetime_formatter/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2016 Tecnativa, S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

6
datetime_formatter/__openerp__.py

@ -1,14 +1,16 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2016 Tecnativa, S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Date & Time Formatter",
"summary": "Helper functions to give correct format to date[time] fields",
"version": "8.0.1.0.0",
"version": "9.0.1.0.0",
"category": "Tools",
"website": "https://grupoesoc.es",
"website": "https://tecnativa.com",
"author": "Grupo ESOC Ingeniería de Servicios, "
"Tecnativa,"
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,

1
datetime_formatter/exceptions.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2016 Tecnativa, S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import _, exceptions

5
datetime_formatter/models.py

@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2016 Tecnativa, S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import datetime, timedelta
from openerp import api, exceptions, fields, models
from openerp import api, fields, models
from openerp.tools import (DEFAULT_SERVER_DATE_FORMAT,
DEFAULT_SERVER_TIME_FORMAT)
from . import exceptions as ex
@ -53,7 +54,7 @@ class ResLang(models.Model):
try:
record.ensure_one()
except exceptions.except_orm:
except ValueError:
if not failure_safe:
raise ex.BestMatchedLanguageNotFoundError(lang)
else:

1
datetime_formatter/tests/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2016 Tecnativa, S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_best_matcher, test_formatter

1
datetime_formatter/tests/test_best_matcher.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2016 Tecnativa, S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.tests.common import TransactionCase
from .. import exceptions

1
datetime_formatter/tests/test_formatter.py

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# © 2016 Tecnativa, S.L. - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import datetime
from random import random

Loading…
Cancel
Save