From f0325da092a4793e91787d85647b03c4ce22ef7b Mon Sep 17 00:00:00 2001 From: David Ramia Date: Sat, 20 Jan 2024 14:28:37 +0100 Subject: [PATCH] [MIG] l10n_es_aeat: Migration to 17.0 --- l10n_es_aeat/__manifest__.py | 4 +- l10n_es_aeat/data/aeat_account.xml | 4 + l10n_es_aeat/data/aeat_tax.xml | 4 + l10n_es_aeat/hooks.py | 4 +- l10n_es_aeat/models/__init__.py | 2 + l10n_es_aeat/models/account_move.py | 2 - l10n_es_aeat/models/account_tax.py | 3 +- l10n_es_aeat/models/aeat_account.py | 48 + l10n_es_aeat/models/aeat_tax.py | 46 + .../models/l10n_es_aeat_map_tax_line.py | 6 +- l10n_es_aeat/models/l10n_es_aeat_report.py | 35 +- l10n_es_aeat/models/res_company.py | 19 +- l10n_es_aeat/security/ir.model.access.csv | 4 + .../tests/test_l10n_es_aeat_export_config.py | 2 +- .../tests/test_l10n_es_aeat_map_tax.py | 4 +- .../tests/test_l10n_es_aeat_mod_base.py | 7 +- .../tests/test_l10n_es_aeat_report.py | 6 +- .../tests/test_l10n_es_aeat_taxinfo.py | 27 +- l10n_es_aeat/views/account_journal_view.xml | 2 +- l10n_es_aeat/views/account_move_view.xml | 8 +- .../views/aeat_export_configuration_view.xml | 21 +- l10n_es_aeat/views/aeat_report_view.xml | 73 +- l10n_es_aeat/views/res_partner_view.xml | 3 +- .../wizard/compare_boe_file_views.xml | 13 +- l10n_es_aeat/wizard/export_to_boe.py | 6 +- l10n_es_aeat/wizard/export_to_boe_wizard.xml | 8 +- .../static/description/index.html | 910 +++++++++--------- test-requirements.txt | 1 + 28 files changed, 686 insertions(+), 586 deletions(-) create mode 100644 l10n_es_aeat/data/aeat_account.xml create mode 100644 l10n_es_aeat/data/aeat_tax.xml create mode 100644 l10n_es_aeat/models/aeat_account.py create mode 100644 l10n_es_aeat/models/aeat_tax.py create mode 100644 test-requirements.txt diff --git a/l10n_es_aeat/__manifest__.py b/l10n_es_aeat/__manifest__.py index 833e8c28bfe..0eef01f20e8 100644 --- a/l10n_es_aeat/__manifest__.py +++ b/l10n_es_aeat/__manifest__.py @@ -11,7 +11,7 @@ { "name": "AEAT Base", "summary": "Modulo base para declaraciones de la AEAT", - "version": "16.0.2.2.0", + "version": "17.0.1.0.0", "author": "Pexego, " "Acysos S.L., " "AvanzOSC, " @@ -27,6 +27,8 @@ "data": [ "security/aeat_security.xml", "security/ir.model.access.csv", + "data/aeat_tax.xml", + "data/aeat_account.xml", "data/aeat_partner.xml", "data/ir_config_parameter.xml", "data/aeat_tax_agency_data.xml", diff --git a/l10n_es_aeat/data/aeat_account.xml b/l10n_es_aeat/data/aeat_account.xml new file mode 100644 index 00000000000..92037b06d8a --- /dev/null +++ b/l10n_es_aeat/data/aeat_account.xml @@ -0,0 +1,4 @@ + + + + diff --git a/l10n_es_aeat/data/aeat_tax.xml b/l10n_es_aeat/data/aeat_tax.xml new file mode 100644 index 00000000000..f0cd571deb3 --- /dev/null +++ b/l10n_es_aeat/data/aeat_tax.xml @@ -0,0 +1,4 @@ + + + + diff --git a/l10n_es_aeat/hooks.py b/l10n_es_aeat/hooks.py index ba3a55e566e..3bf845a822f 100644 --- a/l10n_es_aeat/hooks.py +++ b/l10n_es_aeat/hooks.py @@ -31,5 +31,5 @@ def create_column_thirdparty_invoice(cr): cr.execute("UPDATE account_journal SET thirdparty_invoice = False") -def pre_init_hook(cr): - create_column_thirdparty_invoice(cr) +def pre_init_hook(env): + create_column_thirdparty_invoice(env.cr) diff --git a/l10n_es_aeat/models/__init__.py b/l10n_es_aeat/models/__init__.py index fe449462071..ba944f57fe6 100644 --- a/l10n_es_aeat/models/__init__.py +++ b/l10n_es_aeat/models/__init__.py @@ -16,3 +16,5 @@ from . import aeat_soap from . import aeat_tax_agency from . import account_move +from . import aeat_tax +from . import aeat_account diff --git a/l10n_es_aeat/models/account_move.py b/l10n_es_aeat/models/account_move.py index 25d8802f607..1e5b2e90d91 100644 --- a/l10n_es_aeat/models/account_move.py +++ b/l10n_es_aeat/models/account_move.py @@ -24,8 +24,6 @@ class AccountMove(models.Model): thirdparty_number = fields.Char( string="Third-party number", index=True, - readonly=True, - states={"draft": [("readonly", False)]}, copy=False, help="Número de la factura emitida por un tercero.", ) diff --git a/l10n_es_aeat/models/account_tax.py b/l10n_es_aeat/models/account_tax.py index 7f4c6a32cd7..f3034ade801 100644 --- a/l10n_es_aeat/models/account_tax.py +++ b/l10n_es_aeat/models/account_tax.py @@ -8,8 +8,7 @@ class AccountTax(models.Model): _inherit = "account.tax" def _clear_tax_id_from_tax_template_cache(self): - Company = self.env["res.company"] - Company._get_tax_id_from_tax_template.clear_cache(Company) + self.env.registry.clear_cache() @api.model_create_multi def create(self, vals_list): diff --git a/l10n_es_aeat/models/aeat_account.py b/l10n_es_aeat/models/aeat_account.py new file mode 100644 index 00000000000..5e139bc464b --- /dev/null +++ b/l10n_es_aeat/models/aeat_account.py @@ -0,0 +1,48 @@ +# Copyright 2016 Tecnativa - Antonio Espinosa +# Copyright 2019 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl +import logging +import traceback + +from odoo import api, fields, models + +_logger = logging.getLogger() + + +class AeatAccount(models.Model): + _name = "aeat.account" + _description = "AEAT Account" + _order = "name" + + name = fields.Char() + xmlid = fields.Char() + + @api.model + def update_accounts(self): + try: + chart_template = self.env["account.chart.template"].sudo() + accounts = {} + data = chart_template._parse_csv("es_common", "account.account", "l10n_es") + for key in data: + accounts[ + key + ] = f"{data[key]['code']} - {data[key].get('name@es') or data[key]['name']}" + self._update_accounts(accounts) + except Exception: + _logger.error(traceback.format_exc()) + raise + + def _update_accounts(self, account_data): + accounts = self.env["aeat.account"].search([]) + accounts.filtered(lambda x: x.xmlid not in account_data).unlink() + accounts._load_records( + [ + { + "xml_id": f"l10n_es_aeat.{key}", + "noupdate": True, + "values": {"xmlid": key, "name": name}, + } + for key, name in account_data.items() + ], + update=True, + ) diff --git a/l10n_es_aeat/models/aeat_tax.py b/l10n_es_aeat/models/aeat_tax.py new file mode 100644 index 00000000000..9370b576041 --- /dev/null +++ b/l10n_es_aeat/models/aeat_tax.py @@ -0,0 +1,46 @@ +# Copyright 2016 Tecnativa - Antonio Espinosa +# Copyright 2019 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl +import logging +import traceback + +from odoo import api, fields, models + +_logger = logging.getLogger() + + +class AeatTax(models.Model): + _name = "aeat.tax" + _description = "AEAT Tax" + _order = "name" + + name = fields.Char() + xmlid = fields.Char() + + @api.model + def update_taxes(self): + try: + chart_template = self.env["account.chart.template"].sudo() + taxes = {} + data = chart_template._parse_csv("es_common", "account.tax", "l10n_es") + for key in data: + taxes[key] = data[key].get("description@es") or data[key]["description"] + self._update_taxes(taxes) + except Exception: + _logger.error(traceback.format_exc()) + raise + + def _update_taxes(self, tax_data): + taxes = self.env["aeat.tax"].search([]) + taxes.filtered(lambda x: x.xmlid not in tax_data).unlink() + taxes._load_records( + [ + { + "xml_id": f"l10n_es_aeat.{key}", + "noupdate": True, + "values": {"xmlid": key, "name": name}, + } + for key, name in tax_data.items() + ], + update=True, + ) diff --git a/l10n_es_aeat/models/l10n_es_aeat_map_tax_line.py b/l10n_es_aeat/models/l10n_es_aeat_map_tax_line.py index e1bfc6eb324..ae339497f61 100644 --- a/l10n_es_aeat/models/l10n_es_aeat_map_tax_line.py +++ b/l10n_es_aeat/models/l10n_es_aeat_map_tax_line.py @@ -10,11 +10,9 @@ class L10nEsAeatMapTaxLine(models.Model): _description = "AEAT tax mapping line" field_number = fields.Integer(required=True) - tax_ids = fields.Many2many( - comodel_name="account.tax.template", string="Taxes templates" - ) + tax_ids = fields.Many2many(comodel_name="aeat.tax", string="Taxes templates") account_id = fields.Many2one( - comodel_name="account.account.template", + comodel_name="aeat.account", string="Account Template", ) name = fields.Char(required=True) diff --git a/l10n_es_aeat/models/l10n_es_aeat_report.py b/l10n_es_aeat/models/l10n_es_aeat_report.py index b7e38625e85..ac670fdd078 100644 --- a/l10n_es_aeat/models/l10n_es_aeat_report.py +++ b/l10n_es_aeat/models/l10n_es_aeat_report.py @@ -86,16 +86,12 @@ def _get_export_config(self, date): comodel_name="res.company", string="Company", required=True, - readonly=True, default=lambda self: self.env.company, - states={"draft": [("readonly", False)]}, ) company_vat = fields.Char( string="VAT number", size=9, required=True, - readonly=True, - states={"draft": [("readonly", False)]}, ) number = fields.Char( string="Model number", @@ -107,7 +103,6 @@ def _get_export_config(self, date): previous_number = fields.Char( string="Previous declaration number", size=13, - states={"done": [("readonly", True)]}, ) contact_name = fields.Char( string="Full Name", @@ -115,46 +110,33 @@ def _get_export_config(self, date): help="Must have name and surname.", required=True, readonly=True, - states={"draft": [("readonly", False)]}, ) contact_phone = fields.Char( string="Phone", size=9, required=True, - readonly=True, - states={"draft": [("readonly", False)]}, ) contact_email = fields.Char( size=50, - readonly=True, - states={"draft": [("readonly", False)]}, ) representative_vat = fields.Char( string="L.R. VAT number", size=9, - readonly=True, help="Legal Representative VAT number.", - states={"draft": [("readonly", False)]}, ) year = fields.Integer( default=_default_year, required=True, - readonly=True, - states={"draft": [("readonly", False)]}, ) statement_type = fields.Selection( selection=[("N", "Normal"), ("C", "Complementary"), ("S", "Substitutive")], default="N", - readonly=True, required=True, - states={"draft": [("readonly", False)]}, ) support_type = fields.Selection( selection=[("C", "DVD"), ("T", "Telematics")], default="T", - readonly=True, required=True, - states={"draft": [("readonly", False)]}, ) calculation_date = fields.Datetime() state = fields.Selection( @@ -194,24 +176,18 @@ def _get_export_config(self, date): selection="get_period_type_selection", required=True, default=_default_period_type, - readonly=True, - states={"draft": [("readonly", False)]}, ) date_start = fields.Date( string="Starting date", required=True, - readonly=True, store=True, compute="_compute_dates", - states={"draft": [("readonly", False)]}, ) date_end = fields.Date( string="Ending date", required=True, - readonly=True, store=True, compute="_compute_dates", - states={"draft": [("readonly", False)]}, ) allow_posting = fields.Boolean(compute="_compute_allow_posting") counterpart_account_id = fields.Many2one( @@ -226,7 +202,6 @@ def _get_export_config(self, date): domain="[('type', '=', 'general'), ('company_id', '=', company_id)]", default=_default_journal, help="Journal in which post the move.", - states={"done": [("readonly", True)]}, ) move_id = fields.Many2one( comodel_name="account.move", @@ -322,12 +297,7 @@ def _compute_dates(self): f"{report.year}-{starting_month}-01" ) report.date_end = fields.Date.to_date( - "%s-%s-%s" - % ( - report.year, - ending_month, - monthrange(report.year, ending_month)[1], - ) + f"{report.year}-{ending_month}-{monthrange(report.year, ending_month)[1]}" ) elif report.period_type in ( "01", @@ -347,8 +317,7 @@ def _compute_dates(self): month = int(report.period_type) report.date_start = fields.Date.to_date(f"{report.year}-{month}-01") report.date_end = fields.Date.to_date( - "%s-%s-%s" - % (report.year, month, monthrange(report.year, month)[1]) + f"{report.year}-{month}-{monthrange(report.year, month)[1]}" ) @api.depends("date_start") diff --git a/l10n_es_aeat/models/res_company.py b/l10n_es_aeat/models/res_company.py index a485a503f36..343a8d631cb 100644 --- a/l10n_es_aeat/models/res_company.py +++ b/l10n_es_aeat/models/res_company.py @@ -35,26 +35,15 @@ def _get_tax_id_from_tax_template(self, tax_template, company): """Low level cached search for a tax given its tax template and company. """ - xmlids = ( - self.sudo() - .env["ir.model.data"] - .search_read( - [ - ("model", "=", "account.tax.template"), - ("res_id", "=", tax_template.id), - ], - ["name", "module"], - ) - ) return ( - xmlids + tax_template and self.sudo() .env["ir.model.data"] .search( [ ("model", "=", "account.tax"), - ("module", "=", xmlids[0]["module"]), - ("name", "=", "{}_{}".format(company.id, xmlids[0]["name"])), + ("module", "=", "account"), + ("name", "=", f"{company.id}_{tax_template.xmlid}"), ] ) .res_id @@ -98,7 +87,7 @@ def get_taxes_from_templates(self, tax_templates): tax_ids = [] # We need to rebrowse the records to avoid a problem with the ormcache # and virtual records that populate m2m as NewId. - for tmpl in self.env["account.tax.template"].browse(tax_templates.ids): + for tmpl in self.env["aeat.tax"].browse(tax_templates.ids): tax_id = self._get_tax_id_from_tax_template(tmpl, self) if tax_id: tax_ids.append(tax_id) diff --git a/l10n_es_aeat/security/ir.model.access.csv b/l10n_es_aeat/security/ir.model.access.csv index 7c79fd1f124..a781ae5579a 100644 --- a/l10n_es_aeat/security/ir.model.access.csv +++ b/l10n_es_aeat/security/ir.model.access.csv @@ -7,6 +7,10 @@ access_model_l10n_es_aeat_map_tax_admin,aeat.mod.map.tax.code admin,model_l10n_e access_model_l10n_es_aeat_map_tax_aeat,aeat.mod.map.tax.code aeat,model_l10n_es_aeat_map_tax,group_account_aeat,1,0,0,0 access_model_l10n_es_aeat_map_tax_line_admin,aeat.mod.map.tax.code.line admin,model_l10n_es_aeat_map_tax_line,base.group_system,1,1,1,1 access_model_l10n_es_aeat_map_taxe_line_aeat,aeat.mod.map.tax.code.line aeat,model_l10n_es_aeat_map_tax_line,group_account_aeat,1,0,0,0 +access_model_l10n_es_aeat_tax_admin,aeat.tax admin,model_aeat_tax,base.group_system,1,1,1,1 +access_model_l10n_es_aeat_tax_aeat,aeat.tax aeat,model_aeat_tax,group_account_aeat,1,0,0,0 +access_model_l10n_es_aeat_account_admin,aeat.account admin,model_aeat_account,base.group_system,1,1,1,1 +access_model_l10n_es_aeat_account_aeat,aeat.account aeat,model_aeat_account,group_account_aeat,1,0,0,0 access_model_l10n_es_aeat_tax_line_aeat,l10n.es.aeat.tax.line aeat,model_l10n_es_aeat_tax_line,group_account_aeat,1,1,1,1 access_l10n_es_aeat_certificate_manager,l10n_es_aeat_certificate manager,model_l10n_es_aeat_certificate,account.group_account_manager,1,1,1,1 access_aeat_tax_agency_account,access_aeat_tax_agency_account,model_aeat_tax_agency,base.group_user,1,0,0,0 diff --git a/l10n_es_aeat/tests/test_l10n_es_aeat_export_config.py b/l10n_es_aeat/tests/test_l10n_es_aeat_export_config.py index 3b37b772ae6..ea3d56a543b 100644 --- a/l10n_es_aeat/tests/test_l10n_es_aeat_export_config.py +++ b/l10n_es_aeat/tests/test_l10n_es_aeat_export_config.py @@ -163,7 +163,7 @@ def test_export_config_file(self): ], } ) - new_report = self.env["l10n.es.aeat.report"].new({"name": "Test Report"}) + new_report = self.env["l10n.es.aeat.report"] export_to_boe = self.env["l10n.es.aeat.report.export_to_boe"].create( {"name": "test_export_to_boe.txt"} ) diff --git a/l10n_es_aeat/tests/test_l10n_es_aeat_map_tax.py b/l10n_es_aeat/tests/test_l10n_es_aeat_map_tax.py index 2eaf6715abd..9c0515b10dc 100644 --- a/l10n_es_aeat/tests/test_l10n_es_aeat_map_tax.py +++ b/l10n_es_aeat/tests/test_l10n_es_aeat_map_tax.py @@ -72,7 +72,7 @@ def _test_map_line_overlap(self, from1, to1, from2, to2, raise_exception): def test_map_line_overlaps(self): for from1, to1, from2, to2, raise_exception in _DATES_MAPPING: _logger.info( - "Tax map 1 with date_from %s and date_to %s against tax map 2 " - "with date_from %s and date_to %s" % (from1, to1, from2, to2) + f"Tax map 1 with date_from {from1} and date_to {to1} against tax map 2 " + f"with date_from {from2} and date_to {to2}" ) self._test_map_line_overlap(from1, to1, from2, to2, raise_exception) diff --git a/l10n_es_aeat/tests/test_l10n_es_aeat_mod_base.py b/l10n_es_aeat/tests/test_l10n_es_aeat_mod_base.py index 731da90b872..5b6edcbbaf1 100644 --- a/l10n_es_aeat/tests/test_l10n_es_aeat_mod_base.py +++ b/l10n_es_aeat/tests/test_l10n_es_aeat_mod_base.py @@ -41,13 +41,12 @@ def _chart_of_accounts_create(cls): cls.company = cls.env["res.company"].create( {"name": "Spanish test company", "currency_id": cls.env.ref("base.EUR").id} ) - cls.chart = cls.env.ref("l10n_es.account_chart_template_pymes") cls.env.ref("base.group_multi_company").write({"users": [(4, cls.env.uid)]}) cls.env.user.write( {"company_ids": [(4, cls.company.id)], "company_id": cls.company.id} ) - chart = cls.env.ref("l10n_es.account_chart_template_pymes") - chart.try_loading() + chart = cls.env["account.chart.template"] + chart.try_loading(template_code="es_pymes", company=cls.company) cls.with_context(company_id=cls.company.id) return True @@ -101,7 +100,7 @@ def _get_taxes(cls, descs): taxes = cls.env["account.tax"] for desc in descs.split(","): parts = desc.split(".") - module = parts[0] if len(parts) > 1 else "l10n_es" + module = parts[0] if len(parts) > 1 else "l10n_es_aeat" xml_id = parts[1] if len(parts) > 1 else parts[0] if xml_id.lower() != xml_id and len(parts) == 1: # shortcut for not changing existing tests with old codes diff --git a/l10n_es_aeat/tests/test_l10n_es_aeat_report.py b/l10n_es_aeat/tests/test_l10n_es_aeat_report.py index db73ff71c68..612ca5cae1a 100644 --- a/l10n_es_aeat/tests/test_l10n_es_aeat_report.py +++ b/l10n_es_aeat/tests/test_l10n_es_aeat_report.py @@ -54,14 +54,12 @@ def test_compute_dates(self): self.assertEqual( report.date_start, fields.Date.to_date(date_start), - "Incorrect start date for period %s: %s." - % (period_type, report.date_start), + f"Incorrect start date for period {period_type}: {report.date_start}.", ) self.assertEqual( report.date_end, fields.Date.to_date(date_end), - "Incorrect end date for period %s: %s." - % (period_type, report.date_end), + f"Incorrect end date for period {period_type}: {report.date_end}.", ) report.invalidate_recordset(["date_start", "date_end"]) diff --git a/l10n_es_aeat/tests/test_l10n_es_aeat_taxinfo.py b/l10n_es_aeat/tests/test_l10n_es_aeat_taxinfo.py index fc216b5e594..7625437a0eb 100644 --- a/l10n_es_aeat/tests/test_l10n_es_aeat_taxinfo.py +++ b/l10n_es_aeat/tests/test_l10n_es_aeat_taxinfo.py @@ -39,28 +39,27 @@ class TestL10nEsAeatTaxInfoGroup(TestL10nEsAeatModBase): @classmethod def _chart_of_accounts_create(cls): - cls.env["account.tax.template"]._load_records( + super()._chart_of_accounts_create() + cls.env["account.tax"]._load_records( [ { - "xml_id": "l10n_es.account_tax_template_s_ivag1021b", + "xml_id": f"account.{cls.company.id}_account_tax_template_s_ivag1021b", "noupdate": True, "values": { "type_tax_use": "sale", "name": "Grupo IVA 10%/21% (Bienes)", - "chart_template_id": cls.env.ref( - "l10n_es.account_chart_template_common" - ).id, "amount_type": "group", + "tax_scope": "consu", "children_tax_ids": [ ( 6, 0, [ cls.env.ref( - "l10n_es.account_tax_template_s_iva10b" + f"account.{cls.company.id}_account_tax_template_s_iva10b" ).id, cls.env.ref( - "l10n_es.account_tax_template_s_iva21b" + f"account.{cls.company.id}_account_tax_template_s_iva21b" ).id, ], ) @@ -69,7 +68,19 @@ def _chart_of_accounts_create(cls): } ] ) - return super()._chart_of_accounts_create() + cls.env["aeat.tax"]._load_records( + [ + { + "xml_id": "l10n_es_aeat.account_tax_template_s_ivag1021b", + "noupdate": True, + "values": { + "xmlid": "account_tax_template_s_ivag1021b", + "name": "Grupo IVA 10%/21% (Bienes)", + }, + } + ] + ) + return def test_tax_info_1021B(self): invoice = self._invoice_sale_create("2018-02-01", {}) diff --git a/l10n_es_aeat/views/account_journal_view.xml b/l10n_es_aeat/views/account_journal_view.xml index eee12705bc8..8ef36092a25 100644 --- a/l10n_es_aeat/views/account_journal_view.xml +++ b/l10n_es_aeat/views/account_journal_view.xml @@ -7,7 +7,7 @@ - + diff --git a/l10n_es_aeat/views/account_move_view.xml b/l10n_es_aeat/views/account_move_view.xml index d1860fa21d7..67b5a2534a6 100644 --- a/l10n_es_aeat/views/account_move_view.xml +++ b/l10n_es_aeat/views/account_move_view.xml @@ -7,8 +7,12 @@ - - + + diff --git a/l10n_es_aeat/views/aeat_export_configuration_view.xml b/l10n_es_aeat/views/aeat_export_configuration_view.xml index 343a7ae57b5..fc67c9c8e6d 100644 --- a/l10n_es_aeat/views/aeat_export_configuration_view.xml +++ b/l10n_es_aeat/views/aeat_export_configuration_view.xml @@ -44,7 +44,7 @@ name="web_ribbon" text="Archived" bg_color="bg-danger" - attrs="{'invisible': [('active', '=', True)]}" + invisible="active" /> @@ -106,7 +106,8 @@ @@ -117,16 +118,16 @@ string='Value' colspan="4" col="4" - attrs="{'invisible': [('export_type', '=', 'subconfig')]}" + invisible="export_type == 'subconfig'" > @@ -134,25 +135,25 @@ name="group_advanced_configuration" string="Advanced configuration" colspan="4" - attrs="{'invisible': [('export_type', 'in', ('string', 'subconfig'))]}" + invisible="export_type in ('string', 'subconfig')" > - + - + diff --git a/l10n_es_aeat/views/aeat_report_view.xml b/l10n_es_aeat/views/aeat_report_view.xml index 5dcc85a8d68..f4f4b7c2348 100644 --- a/l10n_es_aeat/views/aeat_report_view.xml +++ b/l10n_es_aeat/views/aeat_report_view.xml @@ -27,42 +27,42 @@ name="button_calculate" type="object" string="Calculate" - states="draft" + invisible="state != 'draft'" icon="fa-cogs" />