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.
[FIX/I18N] l10n_es_ticketbai: fix invoice with VAT not subject to.
- Loading branch information
1 parent
55f609d
commit 38c92e0
Showing
5 changed files
with
60 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2021 Binovo IT Human Project SL | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from odoo import api, SUPERUSER_ID | ||
|
||
|
||
def migrate(cr, version): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
companies = env['res.company'].search([]) | ||
fps = env['account.fiscal.position'] | ||
for company in companies: | ||
fps |= company.get_fps_from_templates(env.ref("l10n_es.fp_not_subject_tai")) | ||
fps.write({ | ||
'tbai_vat_regime_key': env.ref("l10n_es_ticketbai.tbai_vat_regime_08").id}) |
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