forked from OCA/l10n-spain
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REF] ticketbai: update and fix fundamental functionality
This consolidates the following PRs: - OCA#1761 - OCA#1790 - OCA#1794 - OCA#1796 - OCA#1811 - OCA#1823 - OCA#1826 - OCA#1828 - OCA#1850 [IMP] Allow credit notes for invoices created before deploying ticketbai [IMP] Allow the user to specify that the line detail is confidential Gipuzkoa requires that invoices include line details but at the same time requires that this details should be obfuscated in case the are to be considered confidential for any reason (medical data for example). [FIX] Update URLs for Gipuzkoa [FIX] Require country to be set for partners, don't default on "Spanish" [REF] Ensure that no messages are sent to IRS from cloned databases [UPD] Update Gipuzkoa Tax Agency Rest Api response codes Update to the latest official documentation: https://www.gipuzkoa.eus/documents/2456431/13761128/Anexo+IV.pdf/79d4cafc-eeaf-0b73-d4a9-3eb70c68034a [UPD] Save warning messages from IRS also when invoices get accepted [FIX] Update signature policy so that also Bizkaia accepts it. [IMP] Use custom signature policy for each tax agency. [FIX] Add support for "IVA Exento Repercutido Sujeto" [IMP] Add Batuz support.
- Loading branch information
1 parent
97d78ce
commit 5ed46a1
Showing
124 changed files
with
10,959 additions
and
107 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
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
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,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2021 Binovo IT Human Project SL | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
import odoo | ||
|
||
|
||
def migrate(cr, version): | ||
if not version: | ||
return | ||
env = odoo.api.Environment(cr, odoo.SUPERUSER_ID, {}) | ||
fp_nacional = env.ref('l10n_es.1_fp_nacional') | ||
fp_nacional_tmpl = env.ref('l10n_es.fp_nacional') | ||
if fp_nacional_tmpl.tbai_vat_exemption_ids: | ||
vals = {} | ||
tbai_vat_exemptions = [] | ||
for fp_tmpl_exemption in fp_nacional_tmpl.tbai_vat_exemption_ids: | ||
fp_tmpl_tax = env['l10n.es.aeat.report']\ | ||
.get_taxes_from_templates(fp_tmpl_exemption.tax_id) | ||
if 1 == len(fp_tmpl_tax): | ||
exemption_found = fp_nacional\ | ||
.tbai_vat_exemption_ids\ | ||
.filtered(lambda ex: ex.tax_id.id == fp_tmpl_tax.id) | ||
if not exemption_found: | ||
tbai_vat_exemptions.append((0, 0, { | ||
'tax_id': fp_tmpl_tax.id, | ||
'tbai_vat_exemption_key': | ||
fp_tmpl_exemption.tbai_vat_exemption_key.id}) | ||
) | ||
if tbai_vat_exemptions: | ||
vals['tbai_vat_exemption_ids'] = tbai_vat_exemptions | ||
fp_nacional.write(vals) |
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
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
Oops, something went wrong.