forked from OCA/l10n-spain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] l10n_es_aeat: Take into account inactive tax templates
Since odoo/odoo#179797, IVA 5% taxes templates are deactivated, and if you calculate an AEAT report containing them, they are not included as not being included in the m2m field. This commit takes this situation into account. TT51059
- Loading branch information
1 parent
5eeca6e
commit e4457af
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Copyright 2016 Antonio Espinosa <[email protected]> | ||
# Copyright 2016-2017 Tecnativa - Pedro M. Baeza <[email protected]> | ||
# 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 | ||
|
@@ -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), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]> | ||
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"> | ||
|
@@ -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> | ||
|