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

[16.0][FIX] l10n_es_aeat: Take into account inactive tax templates #3745

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions l10n_es_aeat/models/l10n_es_aeat_report_tax_mapping.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
# Copyright 2016-2017 Tecnativa - Pedro M. Baeza <pedro.baeza@tecnativa.com>
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016,2024 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import _, api, exceptions, fields, models
Expand Down Expand Up @@ -30,6 +30,7 @@ def calculate(self):
tax_code_map = (
self.env["l10n.es.aeat.map.tax"]
.sudo()
.with_context(active_test=False)
.search(
[
("model", "=", report.number),
Expand Down
9 changes: 7 additions & 2 deletions l10n_es_aeat/views/aeat_tax_code_mapping_view.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
Copyright 2018 Tecnativa - Pedro M. Baeza
Copyright 2018,2024 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="l10n_es_aeat_map_tax_tree" model="ir.ui.view">
Expand Down Expand Up @@ -28,7 +28,12 @@
</group>
</group>
<group string="Mapping Lines" col="4">
<field name="map_line_ids" nolabel="1" colspan="4" />
<field
name="map_line_ids"
context="{'active_test': False}"
nolabel="1"
colspan="4"
/>
</group>
</sheet>
</form>
Expand Down
Loading