[10.0][ADD] Module which provides a fiscal month date range type
This commit is contained in:
parent
21a0a1997d
commit
6076ac054d
55
account_fiscal_month/README.rst
Normal file
55
account_fiscal_month/README.rst
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
====================
|
||||||
|
Account Fiscal Month
|
||||||
|
====================
|
||||||
|
|
||||||
|
This module simply provides a date range type marked as 'Fiscal month'.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
Just Install it.
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
No configuration needed.
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues
|
||||||
|
<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.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Benjamin Willig <benjamin.willig@acsone.eu>
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
To contribute to this module, please visit https://odoo-community.org.
|
1
account_fiscal_month/__init__.py
Normal file
1
account_fiscal_month/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import models
|
21
account_fiscal_month/__manifest__.py
Normal file
21
account_fiscal_month/__manifest__.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 ACSONE SA/NV
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Account Fiscal Month',
|
||||||
|
'summary': """
|
||||||
|
Provide a fiscal month date range type""",
|
||||||
|
'version': '10.0.1.0.0',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'author': 'ACSONE SA/NV, Odoo Community Association (OCA)',
|
||||||
|
'website': 'https://www.acsone.eu',
|
||||||
|
'depends': [
|
||||||
|
'account',
|
||||||
|
'date_range',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
'data/date_range_type.xml',
|
||||||
|
'views/date_range_type.xml',
|
||||||
|
],
|
||||||
|
}
|
13
account_fiscal_month/data/date_range_type.xml
Normal file
13
account_fiscal_month/data/date_range_type.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright 2017 ACSONE SA/NV
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||||
|
|
||||||
|
<odoo noupdate="1">
|
||||||
|
|
||||||
|
<record model="date.range.type" id="date_range_fiscal_month">
|
||||||
|
<field name="name">Fiscal month</field>
|
||||||
|
<field name="allow_overlap" eval="False"/>
|
||||||
|
<field name="fiscal_month" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
45
account_fiscal_month/i18n/de.po
Normal file
45
account_fiscal_month/i18n/de.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: de\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Unternehmen"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr "date.range.type"
|
45
account_fiscal_month/i18n/el_GR.po
Normal file
45
account_fiscal_month/i18n/el_GR.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/el_GR/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: el_GR\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Εταιρείες"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
45
account_fiscal_month/i18n/es.po
Normal file
45
account_fiscal_month/i18n/es.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\n"
|
||||||
|
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: es\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Compañías"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr "date.range.type"
|
45
account_fiscal_month/i18n/es_EC.po
Normal file
45
account_fiscal_month/i18n/es_EC.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Cristian Salamea <ovnicraft@gmail.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: Cristian Salamea <ovnicraft@gmail.com>, 2017\n"
|
||||||
|
"Language-Team: Spanish (Ecuador) (https://www.transifex.com/oca/teams/23907/es_EC/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: es_EC\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Compañías"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
45
account_fiscal_month/i18n/fi.po
Normal file
45
account_fiscal_month/i18n/fi.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: fi\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Yritykset"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
45
account_fiscal_month/i18n/fr.po
Normal file
45
account_fiscal_month/i18n/fr.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Sociétés"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
45
account_fiscal_month/i18n/hr.po
Normal file
45
account_fiscal_month/i18n/hr.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Bole <bole@dajmi5.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
|
||||||
|
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: hr\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Poduzeća"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr "date.range.type"
|
45
account_fiscal_month/i18n/hr_HR.po
Normal file
45
account_fiscal_month/i18n/hr_HR.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: hr_HR\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Poduzeća"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr "date.range.type"
|
45
account_fiscal_month/i18n/it.po
Normal file
45
account_fiscal_month/i18n/it.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: it\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Azienda"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr "date.range.type"
|
45
account_fiscal_month/i18n/pt.po
Normal file
45
account_fiscal_month/i18n/pt.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Pedro Castro Silva <pedrocs@exo.pt>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-12-08 23:22+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-12-08 23:22+0000\n"
|
||||||
|
"Last-Translator: Pedro Castro Silva <pedrocs@exo.pt>, 2017\n"
|
||||||
|
"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: pt\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Empresas"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr "date.range.type"
|
45
account_fiscal_month/i18n/pt_BR.po
Normal file
45
account_fiscal_month/i18n/pt_BR.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: pt_BR\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Empresas"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr "date.range.type"
|
45
account_fiscal_month/i18n/sk.po
Normal file
45
account_fiscal_month/i18n/sk.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Slovak (https://www.transifex.com/oca/teams/23907/sk/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: sk\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Spoločnosti"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
45
account_fiscal_month/i18n/sl.po
Normal file
45
account_fiscal_month/i18n/sl.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||||
|
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: sl\n"
|
||||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Družbe"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
45
account_fiscal_month/i18n/tr.po
Normal file
45
account_fiscal_month/i18n/tr.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Ediz Duman <neps1192@gmail.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n"
|
||||||
|
"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: tr\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Firmalar"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
45
account_fiscal_month/i18n/tr_TR.po
Normal file
45
account_fiscal_month/i18n/tr_TR.po
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * account_fiscal_month
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Ediz Duman <neps1192@gmail.com>, 2017
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"PO-Revision-Date: 2017-11-28 23:23+0000\n"
|
||||||
|
"Last-Translator: Ediz Duman <neps1192@gmail.com>, 2017\n"
|
||||||
|
"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/tr_TR/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Language: tr_TR\n"
|
||||||
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_res_company
|
||||||
|
msgid "Companies"
|
||||||
|
msgstr "Firmalar"
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:date.range.type,name:account_fiscal_month.date_range_fiscal_month
|
||||||
|
msgid "Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model.fields,field_description:account_fiscal_month.field_date_range_type_fiscal_month
|
||||||
|
msgid "Is fiscal month?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: code:addons/account_fiscal_month/models/date_range_type.py:20
|
||||||
|
#, python-format
|
||||||
|
msgid "You can't delete date range type: Fiscal month"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: account_fiscal_month
|
||||||
|
#: model:ir.model,name:account_fiscal_month.model_date_range_type
|
||||||
|
msgid "date.range.type"
|
||||||
|
msgstr ""
|
2
account_fiscal_month/models/__init__.py
Normal file
2
account_fiscal_month/models/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from . import date_range_type
|
||||||
|
from . import res_company
|
22
account_fiscal_month/models/date_range_type.py
Normal file
22
account_fiscal_month/models/date_range_type.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 ACSONE SA/NV
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import api, fields, models, _
|
||||||
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
|
||||||
|
class DateRangeType(models.Model):
|
||||||
|
|
||||||
|
_inherit = 'date.range.type'
|
||||||
|
|
||||||
|
fiscal_month = fields.Boolean(string="Is fiscal month?", readonly=True)
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def unlink(self):
|
||||||
|
date_range_type_fm = self.env.ref(
|
||||||
|
'account_fiscal_month.date_range_fiscal_month')
|
||||||
|
if date_range_type_fm.id in self.ids:
|
||||||
|
raise UserError(_("You can't delete date range type: "
|
||||||
|
"Fiscal month"))
|
||||||
|
return super(DateRangeType, self).unlink()
|
21
account_fiscal_month/models/res_company.py
Normal file
21
account_fiscal_month/models/res_company.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 ACSONE SA/NV
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class ResCompany(models.Model):
|
||||||
|
|
||||||
|
_inherit = 'res.company'
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def find_daterange_fm(self, date_str):
|
||||||
|
self.ensure_one()
|
||||||
|
fm_id = self.env.ref('account_fiscal_month.date_range_fiscal_month')
|
||||||
|
return self.env['date.range'].search([
|
||||||
|
('type_id', '=', fm_id.id),
|
||||||
|
('date_start', '<=', date_str),
|
||||||
|
('date_end', '>=', date_str),
|
||||||
|
('company_id', '=', self.id),
|
||||||
|
])
|
BIN
account_fiscal_month/static/description/icon.png
Normal file
BIN
account_fiscal_month/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
1
account_fiscal_month/tests/__init__.py
Normal file
1
account_fiscal_month/tests/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import test_account_fiscal_month
|
44
account_fiscal_month/tests/test_account_fiscal_month.py
Normal file
44
account_fiscal_month/tests/test_account_fiscal_month.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 ACSONE SA/NV
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo.exceptions import UserError
|
||||||
|
from odoo.fields import Date
|
||||||
|
from odoo.tests.common import TransactionCase
|
||||||
|
|
||||||
|
|
||||||
|
class TestAccountFiscalMonth(TransactionCase):
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
super(TestAccountFiscalMonth, self).setUp()
|
||||||
|
self.DateRangeObj = self.env['date.range']
|
||||||
|
|
||||||
|
self.company = self.env.ref('base.main_company')
|
||||||
|
self.date_range_type_month = self.env.ref(
|
||||||
|
'account_fiscal_month.date_range_fiscal_month')
|
||||||
|
|
||||||
|
self.date_range_january_2017 = self.DateRangeObj.create({
|
||||||
|
'name': "January 2017",
|
||||||
|
'date_start': '2017-01-01',
|
||||||
|
'date_end': '2017-01-31',
|
||||||
|
'type_id': self.date_range_type_month.id,
|
||||||
|
'company_id': self.company.id,
|
||||||
|
})
|
||||||
|
self.date_range_january_no_comp_2017 = self.DateRangeObj.create({
|
||||||
|
'name': "January 2017",
|
||||||
|
'date_start': '2017-01-01',
|
||||||
|
'date_end': '2017-01-31',
|
||||||
|
'type_id': self.date_range_type_month.id,
|
||||||
|
'company_id': False,
|
||||||
|
})
|
||||||
|
|
||||||
|
def test_01_delete_type_fiscal_month(self):
|
||||||
|
with self.assertRaises(UserError):
|
||||||
|
self.date_range_type_month.unlink()
|
||||||
|
|
||||||
|
def test_02_search_date_range(self):
|
||||||
|
january_2017_1st = Date.from_string('2017-01-01')
|
||||||
|
date_ranges = self.company.find_daterange_fm(january_2017_1st)
|
||||||
|
|
||||||
|
self.assertEquals(len(date_ranges), 1)
|
||||||
|
self.assertEquals(date_ranges[0], self.date_range_january_2017)
|
33
account_fiscal_month/views/date_range_type.xml
Normal file
33
account_fiscal_month/views/date_range_type.xml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright 2017 ACSONE SA/NV
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="date_range_type_form_view">
|
||||||
|
<field name="name">date.range.type.form (in account_fiscal_month)</field>
|
||||||
|
<field name="model">date.range.type</field>
|
||||||
|
<field name="inherit_id" ref="date_range.view_date_range_type_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
|
||||||
|
<field name="allow_overlap" position="after">
|
||||||
|
<field name="fiscal_month"/>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="date_range_type_tree_view">
|
||||||
|
<field name="name">date.range.type.tree (in account_fiscal_month)</field>
|
||||||
|
<field name="model">date.range.type</field>
|
||||||
|
<field name="inherit_id" ref="date_range.view_date_range_type_tree"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
|
||||||
|
<field name="allow_overlap" position="after">
|
||||||
|
<field name="fiscal_month"/>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
Loading…
x
Reference in New Issue
Block a user