diff --git a/account_fiscal_year_closing/README.rst b/account_fiscal_year_closing/README.rst index c326e39350f..7bcaa453efe 100644 --- a/account_fiscal_year_closing/README.rst +++ b/account_fiscal_year_closing/README.rst @@ -14,14 +14,14 @@ Fiscal year closing :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--closing-lightgray.png?logo=github - :target: https://github.com/OCA/account-closing/tree/14.0/account_fiscal_year_closing + :target: https://github.com/OCA/account-closing/tree/16.0/account_fiscal_year_closing :alt: OCA/account-closing .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-closing-14-0/account-closing-14-0-account_fiscal_year_closing + :target: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_fiscal_year_closing :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/89/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/account-closing&target_branch=16.0 + :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -104,7 +104,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. @@ -126,6 +126,7 @@ Contributors * `CorporateHub `__ * Alexey Pelykh +* Giuseppe Borruso Maintainers ~~~~~~~~~~~ @@ -140,6 +141,6 @@ 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-closing `_ project on GitHub. +This module is part of the `OCA/account-closing `_ 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_closing/__manifest__.py b/account_fiscal_year_closing/__manifest__.py index c242d660f43..6a9a4fef599 100644 --- a/account_fiscal_year_closing/__manifest__.py +++ b/account_fiscal_year_closing/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Fiscal year closing", "summary": "Generic fiscal year closing wizard", - "version": "14.0.1.0.1", + "version": "16.0.1.0.0", "category": "Accounting & Finance", "website": "https://github.com/OCA/account-closing", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/account_fiscal_year_closing/models/account_fiscalyear_closing.py b/account_fiscal_year_closing/models/account_fiscalyear_closing.py index 3393971387e..a96faf4a16c 100644 --- a/account_fiscal_year_closing/models/account_fiscalyear_closing.py +++ b/account_fiscal_year_closing/models/account_fiscalyear_closing.py @@ -65,7 +65,6 @@ def _default_company_id(self): ("posted", "Posted"), ("cancelled", "Cancelled"), ], - string="State", readonly=True, default="draft", ) @@ -150,7 +149,7 @@ def _prepare_mapping(self, tmpl_mapping): @api.model def _prepare_type(self, tmpl_type): return { - "account_type_id": tmpl_type.account_type_id, + "account_type": tmpl_type.account_type, "closing_type": tmpl_type.closing_type, } @@ -387,7 +386,7 @@ class AccountFiscalyearClosingConfig(models.Model): string="Closing types", ) date = fields.Date(string="Move date") - enabled = fields.Boolean(string="Enabled", default=True) + enabled = fields.Boolean(default=True) journal_id = fields.Many2one(required=True) move_id = fields.Many2one(comodel_name="account.move", string="Move") @@ -416,7 +415,7 @@ def closing_type_get(self, account): self.ensure_one() closing_type = self.closing_type_default closing_types = self.closing_type_ids.filtered( - lambda r: r.account_type_id == account.user_type_id + lambda r: r.account_type == account.account_type ) if closing_types: closing_type = closing_types[0].closing_type @@ -551,11 +550,12 @@ class AccountFiscalyearClosingMapping(models.Model): string="Destination account", ) - @api.model - def create(self, vals): - if "dest_account_id" in vals: - vals["dest_account_id"] = vals["dest_account_id"][0] - res = super(AccountFiscalyearClosingMapping, self).create(vals) + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + if "dest_account_id" in vals: + vals["dest_account_id"] = vals["dest_account_id"][0] + res = super(AccountFiscalyearClosingMapping, self).create(vals_list) return res def write(self, vals): diff --git a/account_fiscal_year_closing/models/account_fiscalyear_closing_abstract.py b/account_fiscal_year_closing/models/account_fiscalyear_closing_abstract.py index 2da426baef5..97e7914bd54 100644 --- a/account_fiscal_year_closing/models/account_fiscalyear_closing_abstract.py +++ b/account_fiscal_year_closing/models/account_fiscalyear_closing_abstract.py @@ -30,7 +30,7 @@ class AccountFiscalyearClosingConfigAbstract(models.AbstractModel): _order = "sequence asc, id asc" name = fields.Char(string="Description", required=True) - sequence = fields.Integer(string="Sequence", index=True, default=1) + sequence = fields.Integer(index=True, default=1) code = fields.Char(string="Unique code", required=True) inverse = fields.Char( string="Inverse config", @@ -81,8 +81,27 @@ class AccountFiscalyearClosingTypeAbstract(models.AbstractModel): required=True, default="unreconciled", ) - account_type_id = fields.Many2one( - comodel_name="account.account.type", - string="Account type", + account_type = fields.Selection( + selection=[ + ("asset_receivable", "Receivable"), + ("asset_cash", "Bank and Cash"), + ("asset_current", "Current Assets"), + ("asset_non_current", "Non-current Assets"), + ("asset_prepayments", "Prepayments"), + ("asset_fixed", "Fixed Assets"), + ("liability_payable", "Payable"), + ("liability_credit_card", "Credit Card"), + ("liability_current", "Current Liabilities"), + ("liability_non_current", "Non-current Liabilities"), + ("equity", "Equity"), + ("equity_unaffected", "Current Year Earnings"), + ("income", "Income"), + ("income_other", "Other Income"), + ("expense", "Expenses"), + ("expense_depreciation", "Depreciation"), + ("expense_direct_cost", "Cost of Revenue"), + ("off_balance", "Off-Balance Sheet"), + ], + string="Type", required=True, ) diff --git a/account_fiscal_year_closing/readme/CONTRIBUTORS.rst b/account_fiscal_year_closing/readme/CONTRIBUTORS.rst index 782fb139658..6458bf51d09 100644 --- a/account_fiscal_year_closing/readme/CONTRIBUTORS.rst +++ b/account_fiscal_year_closing/readme/CONTRIBUTORS.rst @@ -5,3 +5,4 @@ * `CorporateHub `__ * Alexey Pelykh +* Giuseppe Borruso diff --git a/account_fiscal_year_closing/static/description/index.html b/account_fiscal_year_closing/static/description/index.html index 7c45f53e7cf..decc065de75 100644 --- a/account_fiscal_year_closing/static/description/index.html +++ b/account_fiscal_year_closing/static/description/index.html @@ -3,7 +3,7 @@ - + Fiscal year closing