diff --git a/account_fiscal_year/README.rst b/account_fiscal_year/README.rst index 040a6e7d6..6d1e98bfa 100644 --- a/account_fiscal_year/README.rst +++ b/account_fiscal_year/README.rst @@ -14,16 +14,16 @@ Account Fiscal Year :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/15.0/account_fiscal_year + :target: https://github.com/OCA/account-financial-tools/tree/16.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-15-0/account-financial-tools-15-0-account_fiscal_year + :target: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-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/15.0 + :target: https://runbot.odoo-community.org/runbot/92/16.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows to create and edit fiscal years from the menu: @@ -45,7 +45,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -90,8 +90,8 @@ promote its widespread use. Current `maintainer `__: -|maintainer-eLBati| +|maintainer-eLBati| -This module is part of the `OCA/account-financial-tools `_ project on GitHub. +This module is part of the `OCA/account-financial-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_fiscal_year/__manifest__.py b/account_fiscal_year/__manifest__.py index 0dfbc8100..0fe78383b 100644 --- a/account_fiscal_year/__manifest__.py +++ b/account_fiscal_year/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Account Fiscal Year", "summary": "Create Account Fiscal Year", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "development_status": "Production/Stable", "category": "Accounting", "website": "https://github.com/OCA/account-financial-tools" diff --git a/account_fiscal_year/i18n/account_fiscal_year.pot b/account_fiscal_year/i18n/account_fiscal_year.pot index bd73d422a..116129963 100644 --- a/account_fiscal_year/i18n/account_fiscal_year.pot +++ b/account_fiscal_year/i18n/account_fiscal_year.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/account_fiscal_year/i18n/es.po b/account_fiscal_year/i18n/es.po index 900cb9740..bfb770a5b 100644 --- a/account_fiscal_year/i18n/es.po +++ b/account_fiscal_year/i18n/es.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2022-05-20 19:05+0000\n" "Last-Translator: Dept. Técnico \n" diff --git a/account_fiscal_year/models/account_fiscal_year.py b/account_fiscal_year/models/account_fiscal_year.py index 6b67fcac2..9054f79ee 100644 --- a/account_fiscal_year/models/account_fiscal_year.py +++ b/account_fiscal_year/models/account_fiscal_year.py @@ -9,7 +9,6 @@ from odoo.osv import expression class AccountFiscalYear(models.Model): _name = "account.fiscal.year" _description = "Fiscal Year" - _rec_name = "name" name = fields.Char( required=True, diff --git a/account_fiscal_year/models/res_company.py b/account_fiscal_year/models/res_company.py index fbe6b0e1e..cc5e2ac6c 100644 --- a/account_fiscal_year/models/res_company.py +++ b/account_fiscal_year/models/res_company.py @@ -2,7 +2,7 @@ from datetime import timedelta from odoo import models -from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, date_utils +from odoo.tools import date_utils class ResCompany(models.Model): @@ -19,14 +19,13 @@ class ResCompany(models.Model): * [Optionally] record: The fiscal year record. """ self.ensure_one() - date_str = current_date.strftime(DEFAULT_SERVER_DATE_FORMAT) # Search a fiscal year record containing the date. fiscalyear = self.env["account.fiscal.year"].search( [ ("company_id", "=", self.id), - ("date_from", "<=", date_str), - ("date_to", ">=", date_str), + ("date_from", "<=", current_date), + ("date_to", ">=", current_date), ], limit=1, ) @@ -52,24 +51,22 @@ class ResCompany(models.Model): # => # The period 2017-02-02 - 2017-02-30 is not covered by a fiscal year record. - date_from_str = date_from.strftime(DEFAULT_SERVER_DATE_FORMAT) fiscalyear_from = self.env["account.fiscal.year"].search( [ ("company_id", "=", self.id), - ("date_from", "<=", date_from_str), - ("date_to", ">=", date_from_str), + ("date_from", "<=", date_from), + ("date_to", ">=", date_from), ], limit=1, ) if fiscalyear_from: date_from = fiscalyear_from.date_to + timedelta(days=1) - date_to_str = date_to.strftime(DEFAULT_SERVER_DATE_FORMAT) fiscalyear_to = self.env["account.fiscal.year"].search( [ ("company_id", "=", self.id), - ("date_from", "<=", date_to_str), - ("date_to", ">=", date_to_str), + ("date_from", "<=", date_to), + ("date_to", ">=", date_to), ], limit=1, ) diff --git a/account_fiscal_year/static/description/index.html b/account_fiscal_year/static/description/index.html index d9566ac90..76e8848a0 100644 --- a/account_fiscal_year/static/description/index.html +++ b/account_fiscal_year/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

Production/Stable License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

This module allows to create and edit fiscal years from the menu:

Invoicing > Configuration > Accounting > Fiscal Years

Table of contents

@@ -392,7 +392,7 @@ ul.auto-toc {

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -427,7 +427,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

eLBati

-

This module is part of the OCA/account-financial-tools project on GitHub.

+

This module is part of the OCA/account-financial-tools project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.