-
-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] l10n_es_aeat_mod303_oss: Migration to 17.0
- Loading branch information
Showing
12 changed files
with
59 additions
and
130 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
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
50 changes: 0 additions & 50 deletions
50
l10n_es_aeat_mod303_oss/data/2021-07/l10n_es_aeat_map_tax_line.xml
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
l10n_es_aeat_mod303_oss/data/2023/l10n.es.aeat.map.tax.line.csv
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id,field_number,field_type,inverse,map_parent_id:id,move_type,name,sum_type,account_xmlid_ids/id,tax_xmlid_ids/id | ||
aeat_mod303_2023_map_line_123,123,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,, | ||
aeat_mod303_2023_map_line_124,124,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,, | ||
aeat_mod303_2023_map_line_126,126,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,, | ||
aeat_mod303_2023_map_line_127,127,base,,l10n_es_aeat_mod303.aeat_mod303_2023_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,, |
50 changes: 0 additions & 50 deletions
50
l10n_es_aeat_mod303_oss/data/2023/l10n_es_aeat_map_tax_line.xml
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
l10n_es_aeat_mod303_oss/data/2024-10/l10n.es.aeat.map.tax.line.csv
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
id,field_number,field_type,inverse,map_parent_id:id,move_type,name,sum_type,account_xmlid_ids/id,tax_xmlid_ids/id | ||
aeat_mod303_2024_10_map_line_123,123,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,, | ||
aeat_mod303_2024_10_map_line_124,124,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,, | ||
aeat_mod303_2024_10_map_line_126,126,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,Operaciones no sujetas por reglas de localización acogidas a la OSS,both,, | ||
aeat_mod303_2024_10_map_line_127,127,base,,l10n_es_aeat_mod303.aeat_mod303_2024_10_map,all,OSS. Operaciones sujetas y acogidas a la OSS,both,, |
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 +1,2 @@ | ||
from . import l10n_es_aeat_map_tax_line | ||
from . import mod303 |
27 changes: 27 additions & 0 deletions
27
l10n_es_aeat_mod303_oss/models/l10n_es_aeat_map_tax_line.py
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2021 PESOL - Angel Moya | ||
# Copyright 2021 FactorLibre - Rodrigo Bonilla <[email protected]> | ||
# Copyright 2021 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0 | ||
|
||
from odoo import models | ||
|
||
|
||
class L10nEsAeatMapTaxLine(models.Model): | ||
_inherit = "l10n.es.aeat.map.tax.line" | ||
|
||
def get_taxes_for_company(self, company): | ||
self.ensure_one() | ||
oss_map_lines = [ | ||
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2023_map_line_123"), | ||
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2023_map_line_126"), | ||
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2024_10_map_line_123"), | ||
self.env.ref("l10n_es_aeat_mod303_oss.aeat_mod303_2024_10_map_line_126"), | ||
] | ||
if self in oss_map_lines: | ||
return self.env["account.tax"].search( | ||
[ | ||
("oss_country_id", "!=", False), | ||
("company_id", "=", company.id), | ||
] | ||
) | ||
return super().get_taxes_for_company(company) |
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
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
- Pedro M. Baeza | ||
- [Sygel](https://www.sygel.es): | ||
- Manuel Regidor | ||
- Alberto Martínez |
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
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