From 3ecb0a079ed8038e80c9e0192bffc28e20bc91a7 Mon Sep 17 00:00:00 2001 From: Antonio Esposito Date: Tue, 11 Oct 2016 10:16:41 +0200 Subject: [PATCH] [10.0][MIGRATION] Migrated module 'account_fiscal_year' to V10 (#407) [MIG] Migrated module 'account_fiscal_year' to V10 --- account_fiscal_year/README.rst | 4 +- .../{__openerp__.py => __manifest__.py} | 2 +- account_fiscal_year/data/date_range_type.xml | 6 +- account_fiscal_year/i18n/de.po | 2 +- account_fiscal_year/i18n/fr.po | 2 +- account_fiscal_year/i18n/hr_HR.po | 2 +- account_fiscal_year/i18n/it.po | 58 +++++++++++++++++++ account_fiscal_year/i18n/pt_BR.po | 2 +- account_fiscal_year/i18n/sl.po | 2 +- account_fiscal_year/models/date_range_type.py | 4 +- account_fiscal_year/models/res_company.py | 5 +- .../tests/test_account_fiscal_year.py | 6 +- account_fiscal_year/views/date_range_type.xml | 6 +- 13 files changed, 77 insertions(+), 24 deletions(-) rename account_fiscal_year/{__openerp__.py => __manifest__.py} (95%) create mode 100644 account_fiscal_year/i18n/it.po diff --git a/account_fiscal_year/README.rst b/account_fiscal_year/README.rst index 8142bb40..88b788cc 100644 --- a/account_fiscal_year/README.rst +++ b/account_fiscal_year/README.rst @@ -30,14 +30,14 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/92/9.0 + :target: https://runbot.odoo-community.org/runbot/92/10.0 Bug Tracker =========== Bugs are tracked on `GitHub Issues -`_. In case of trouble, please +`_. 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. diff --git a/account_fiscal_year/__openerp__.py b/account_fiscal_year/__manifest__.py similarity index 95% rename from account_fiscal_year/__openerp__.py rename to account_fiscal_year/__manifest__.py index dd5a290e..2aa2d5dd 100644 --- a/account_fiscal_year/__openerp__.py +++ b/account_fiscal_year/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Account Fiscal Year', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'category': 'Accounting', 'author': 'Camptocamp SA,' 'Odoo Community Association (OCA)', diff --git a/account_fiscal_year/data/date_range_type.xml b/account_fiscal_year/data/date_range_type.xml index 40ec799a..480afb3c 100644 --- a/account_fiscal_year/data/date_range_type.xml +++ b/account_fiscal_year/data/date_range_type.xml @@ -1,10 +1,8 @@ - - + Fiscal Year - - + diff --git a/account_fiscal_year/i18n/de.po b/account_fiscal_year/i18n/de.po index 9ce69d71..9fd78b89 100644 --- a/account_fiscal_year/i18n/de.po +++ b/account_fiscal_year/i18n/de.po @@ -45,7 +45,7 @@ msgstr "Geschäftsjahr" #. module: account_fiscal_year #: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year -msgid "Is fiscal year ?" +msgid "Is fiscal year?" msgstr "Ist Geschäftsjahr?" #. module: account_fiscal_year diff --git a/account_fiscal_year/i18n/fr.po b/account_fiscal_year/i18n/fr.po index 2bb3ca6f..429b8f49 100644 --- a/account_fiscal_year/i18n/fr.po +++ b/account_fiscal_year/i18n/fr.po @@ -44,7 +44,7 @@ msgstr "" #. module: account_fiscal_year #: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year -msgid "Is fiscal year ?" +msgid "Is fiscal year?" msgstr "" #. module: account_fiscal_year diff --git a/account_fiscal_year/i18n/hr_HR.po b/account_fiscal_year/i18n/hr_HR.po index 69d84672..9313e99d 100644 --- a/account_fiscal_year/i18n/hr_HR.po +++ b/account_fiscal_year/i18n/hr_HR.po @@ -45,7 +45,7 @@ msgstr "Fiskalna godina" #. module: account_fiscal_year #: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year -msgid "Is fiscal year ?" +msgid "Is fiscal year?" msgstr "Je fiskalna godina?" #. module: account_fiscal_year diff --git a/account_fiscal_year/i18n/it.po b/account_fiscal_year/i18n/it.po new file mode 100644 index 00000000..0c8f13ab --- /dev/null +++ b/account_fiscal_year/i18n/it.po @@ -0,0 +1,58 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_fiscal_year +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0alpha1e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-10-10 07:16+0000\n" +"PO-Revision-Date: 2016-10-10 07:16+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_res_company +msgid "Companies" +msgstr "Aziende" + +#. module: account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_type_action_accounting +msgid "Date Range Types" +msgstr "Tipi di Intervalli di Date" + +#. module: account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_action_accounting +msgid "Date Ranges" +msgstr "Intervalli di Date" + +#. module: account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_accounting +msgid "Date ranges" +msgstr "Intervalli di date" + +#. module: account_fiscal_year +#: model:date.range.type,name:account_fiscal_year.fiscalyear +msgid "Fiscal Year" +msgstr "Anno Fiscale" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year +msgid "Is fiscal year?" +msgstr "Anno Fiscale?" + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/date_range_type.py:22 +#, python-format +msgid "You cannot delete a date range type with flag \"fiscal_year\"" +msgstr "Non è possibile rimuovere un intervallo di date con flag \"Anno Fiscale\"" + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_date_range_type +msgid "date.range.type" +msgstr "date.range.type" + diff --git a/account_fiscal_year/i18n/pt_BR.po b/account_fiscal_year/i18n/pt_BR.po index 62548a45..3bdbacea 100644 --- a/account_fiscal_year/i18n/pt_BR.po +++ b/account_fiscal_year/i18n/pt_BR.po @@ -45,7 +45,7 @@ msgstr "Ano Fiscal" #. module: account_fiscal_year #: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year -msgid "Is fiscal year ?" +msgid "Is fiscal year?" msgstr "É ano fiscal?" #. module: account_fiscal_year diff --git a/account_fiscal_year/i18n/sl.po b/account_fiscal_year/i18n/sl.po index b7eea8c4..4cf7a844 100644 --- a/account_fiscal_year/i18n/sl.po +++ b/account_fiscal_year/i18n/sl.po @@ -44,7 +44,7 @@ msgstr "" #. module: account_fiscal_year #: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year -msgid "Is fiscal year ?" +msgid "Is fiscal year?" msgstr "" #. module: account_fiscal_year diff --git a/account_fiscal_year/models/date_range_type.py b/account_fiscal_year/models/date_range_type.py index 34dd8dfc..95b773c6 100644 --- a/account_fiscal_year/models/date_range_type.py +++ b/account_fiscal_year/models/date_range_type.py @@ -3,13 +3,13 @@ # Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields, api, _, exceptions +from odoo import models, fields, api, _, exceptions class DateRangeType(models.Model): _inherit = "date.range.type" - fiscal_year = fields.Boolean(string='Is fiscal year ?', default=False) + fiscal_year = fields.Boolean(string='Is fiscal year?', default=False) @api.multi def unlink(self): diff --git a/account_fiscal_year/models/res_company.py b/account_fiscal_year/models/res_company.py index b7741b1d..234517b2 100644 --- a/account_fiscal_year/models/res_company.py +++ b/account_fiscal_year/models/res_company.py @@ -2,8 +2,7 @@ # Author: Damien Crier # Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields, api -from openerp.tools import (DEFAULT_SERVER_DATETIME_FORMAT) +from odoo import models, fields, api class ResCompany(models.Model): @@ -15,7 +14,7 @@ class ResCompany(models.Model): with @param:date contained in its date_start/date_end interval """ fy_id = self.env.ref('account_fiscal_year.fiscalyear') - date_str = date.strftime(DEFAULT_SERVER_DATETIME_FORMAT) + date_str = fields.Datetime.to_string(date) s_args = [ ('type_id', '=', fy_id.id), ('date_start', '<=', date_str), diff --git a/account_fiscal_year/tests/test_account_fiscal_year.py b/account_fiscal_year/tests/test_account_fiscal_year.py index 0167437c..6f41c8ae 100644 --- a/account_fiscal_year/tests/test_account_fiscal_year.py +++ b/account_fiscal_year/tests/test_account_fiscal_year.py @@ -5,11 +5,11 @@ import datetime from dateutil.relativedelta import relativedelta -from openerp import fields -import openerp.tests.common as common +from odoo import fields +from odoo.tests.common import TransactionCase -class TestAccountFiscalYear(common.TransactionCase): +class TestAccountFiscalYear(TransactionCase): def setUp(self): super(TestAccountFiscalYear, self).setUp() diff --git a/account_fiscal_year/views/date_range_type.xml b/account_fiscal_year/views/date_range_type.xml index 4be9569a..ad260844 100644 --- a/account_fiscal_year/views/date_range_type.xml +++ b/account_fiscal_year/views/date_range_type.xml @@ -1,6 +1,5 @@ - - + date.range.type.tree @@ -29,5 +28,4 @@ - - +