2
0

[10.0][MIGRATION] Migrated module 'account_fiscal_year' to V10 (#407)

[MIG] Migrated module 'account_fiscal_year' to V10
This commit is contained in:
Antonio Esposito 2016-10-11 10:16:41 +02:00 committed by Benoit Aimont
parent 3946ee6b05
commit 3ecb0a079e
13 changed files with 77 additions and 24 deletions

View File

@ -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
<https://github.com/OCA/{project_repo}/issues>`_. In case of trouble, please
<https://github.com/OCA/account-financial-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.

View File

@ -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)',

View File

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="0">
<odoo>
<record id="fiscalyear" model="date.range.type">
<field name="name">Fiscal Year</field>
<field name="allow_overlap" eval="False"/>
<field name="fiscal_year" eval="True"/>
</record>
</data>
</openerp>
</odoo>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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):

View File

@ -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),

View File

@ -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()

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<record id="view_date_range_type_fiscalyear_tree" model="ir.ui.view">
<field name="name">date.range.type.tree</field>
@ -29,5 +28,4 @@
<menuitem action="date_range.date_range_type_action"
id="menu_date_range_type_action_accounting" parent="menu_date_range_accounting"/>
</data>
</openerp>
</odoo>