Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][MIG] account_fiscal_year #706

Closed
wants to merge 11 commits into from
83 changes: 83 additions & 0 deletions account_fiscal_year/README.rst
@@ -0,0 +1,83 @@
===================
Account Fiscal Year
===================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github
:target: https://github.com/OCA/account-financial-tools/tree/12.0/account_fiscal_year
:alt: OCA/account-financial-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_fiscal_year
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/92/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends `date.range.type` to add `fiscal_year` flag.

Override official `res_company.compute_fiscal_year_dates` to get the
fiscal year date start / date end for any given date.
That methods first looks for a date range of type fiscal year that
encloses the give date.
If it does not find it, it falls back on the standard Odoo
technique based on the day/month of end of fiscal year.

**Table of contents**

.. contents::
:local:

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 <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_fiscal_year%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Camptocamp SA

Contributors
~~~~~~~~~~~~

* Damien Crier <damien.crier@camptocamp.com>
* Laurent Mignon <laurent.mignon@acsone.eu>
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
* Raf Ven <raf.ven@dynapps.be>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/12.0/account_fiscal_year>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions account_fiscal_year/__init__.py
@@ -0,0 +1,2 @@

from . import models
23 changes: 23 additions & 0 deletions account_fiscal_year/__manifest__.py
@@ -0,0 +1,23 @@
# Author: Damien Crier

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should go to 'author' section.

# Copyright 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Account Fiscal Year',
'version': '12.0.1.0.0',
'category': 'Accounting',
'author': 'Camptocamp SA,'
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/account-financial-tools',
'depends': [
'account',
'date_range'
],
'data': [
'data/date_range_type.xml',
'views/date_range_type.xml',
],
'installable': True,
'application': True,
'auto_install': False,
'license': 'AGPL-3',
}
8 changes: 8 additions & 0 deletions account_fiscal_year/data/date_range_type.xml
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
</odoo>
56 changes: 56 additions & 0 deletions account_fiscal_year/i18n/account_fiscal_year.pot
@@ -0,0 +1,56 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_fiscal_year
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \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 ""

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_type_action_accounting
msgid "Date Range Types"
msgstr ""

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_action_accounting
msgid "Date Ranges"
msgstr ""

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_accounting
msgid "Date ranges"
msgstr ""

#. module: account_fiscal_year
#: model:date.range.type,name:account_fiscal_year.fiscalyear
msgid "Fiscal Year"
msgstr ""

#. module: account_fiscal_year
#: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year
msgid "Is fiscal year?"
msgstr ""

#. module: account_fiscal_year
#: code:addons/account_fiscal_year/models/date_range_type.py:21
#, python-format
msgid "You cannot delete a date range type with flag \"fiscal_year\""
msgstr ""

#. module: account_fiscal_year
#: model:ir.model,name:account_fiscal_year.model_date_range_type
msgid "date.range.type"
msgstr ""

59 changes: 59 additions & 0 deletions account_fiscal_year/i18n/ar.po
@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_fiscal_year
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2018-06-29 04:11+0000\n"
"Last-Translator: Osoul <baruni@osoul.ly>\n"
"Language-Team: none\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
"X-Generator: Weblate 3.0.1\n"

#. module: account_fiscal_year
#: model:ir.model,name:account_fiscal_year.model_res_company
msgid "Companies"
msgstr "المؤسسات"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_type_action_accounting
msgid "Date Range Types"
msgstr "أنواع الفترات"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_action_accounting
msgid "Date Ranges"
msgstr "الفترات"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_accounting
msgid "Date ranges"
msgstr "الفترات"

#. module: account_fiscal_year
#: model:date.range.type,name:account_fiscal_year.fiscalyear
msgid "Fiscal Year"
msgstr "السنة المالية"

#. module: account_fiscal_year
#: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year
msgid "Is fiscal year?"
msgstr "سنة مالية؟"

#. module: account_fiscal_year
#: code:addons/account_fiscal_year/models/date_range_type.py:21
#, python-format
msgid "You cannot delete a date range type with flag \"fiscal_year\""
msgstr "لا يمكنك حذف فترة من نوع \"سنة مالية\""

#. module: account_fiscal_year
#: model:ir.model,name:account_fiscal_year.model_date_range_type
msgid "date.range.type"
msgstr "نوع الفترة"
58 changes: 58 additions & 0 deletions account_fiscal_year/i18n/da.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 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2018-09-06 08:12+0000\n"
"Last-Translator: Hans Henrik Gabelgaard <hhg@gabelgaard.org>\n"
"Language-Team: none\n"
"Language: da\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.1.1\n"

#. module: account_fiscal_year
#: model:ir.model,name:account_fiscal_year.model_res_company
msgid "Companies"
msgstr "Virksomheder"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_type_action_accounting
msgid "Date Range Types"
msgstr "Dato intervaltyper"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_action_accounting
msgid "Date Ranges"
msgstr "Dato intervaller"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_accounting
msgid "Date ranges"
msgstr "Dato intervaller"

#. module: account_fiscal_year
#: model:date.range.type,name:account_fiscal_year.fiscalyear
msgid "Fiscal Year"
msgstr "Regnskabsår"

#. module: account_fiscal_year
#: model:ir.model.fields,field_description:account_fiscal_year.field_date_range_type_fiscal_year
msgid "Is fiscal year?"
msgstr "Er regnskabsår?"

#. module: account_fiscal_year
#: code:addons/account_fiscal_year/models/date_range_type.py:21
#, python-format
msgid "You cannot delete a date range type with flag \"fiscal_year\""
msgstr "Du kan ikke slette en intervaltype markeret som \"Regnskabsår\""

#. module: account_fiscal_year
#: model:ir.model,name:account_fiscal_year.model_date_range_type
msgid "date.range.type"
msgstr ""
61 changes: 61 additions & 0 deletions account_fiscal_year/i18n/de.po
@@ -0,0 +1,61 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_fiscal_year
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-22 15:55+0000\n"
"PO-Revision-Date: 2017-12-22 15:55+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: account_fiscal_year
#: model:ir.model,name:account_fiscal_year.model_res_company
msgid "Companies"
msgstr "Unternehmen"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_type_action_accounting
msgid "Date Range Types"
msgstr "Arten von Zeiträumen"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_action_accounting
msgid "Date Ranges"
msgstr "Zeiträume"

#. module: account_fiscal_year
#: model:ir.ui.menu,name:account_fiscal_year.menu_date_range_accounting
msgid "Date ranges"
msgstr "Zeiträume"

#. module: account_fiscal_year
#: model:date.range.type,name:account_fiscal_year.fiscalyear
msgid "Fiscal Year"
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?"
msgstr "Ist Geschäftsjahr?"

#. module: account_fiscal_year
#: code:addons/account_fiscal_year/models/date_range_type.py:21
#, python-format
msgid "You cannot delete a date range type with flag \"fiscal_year\""
msgstr ""
"Sie dürfen eine Zeitraumart mit Kennzeichen \"Geschäftsjahr\" nicht löschen"

#. module: account_fiscal_year
#: model:ir.model,name:account_fiscal_year.model_date_range_type
msgid "date.range.type"
msgstr "date.range.type"