-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] l10n_ar_account_tax_settlement: agregar código de impuesto al i…
…nstalar el módulo. Tarea: 34379 Se agregaron los códigos de impuestos correspondientes para retenciones de ganancias aplicadas y retenciones de iva aplicadas.
- Loading branch information
1 parent
8b0d916
commit bc62bc9
Showing
3 changed files
with
16 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,5 @@ | |
'installable': True, | ||
'auto_install': True, | ||
'application': False, | ||
'post_init_hook': 'post_init_hook', | ||
} |
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,14 @@ | ||
from odoo import api, SUPERUSER_ID | ||
import logging | ||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
def post_init_hook(env): | ||
env['res.company'].search([('country_code', '=', 'AR'), ('l10n_ar_afip_responsibility_type_id.code', '=', 1)]) | ||
for company in env['res.company'].search([('l10n_ar_afip_responsibility_type_id.code', '=', 1)]).filtered(lambda x: x.country_code == 'AR'): | ||
xml_id_ret_gcias_aplic = "account.%s_%s" % (company.id, 'ri_tax_withholding_ganancias_applied') | ||
env.ref(xml_id_ret_gcias_aplic).codigo_impuesto = '01' | ||
xml_id_ret_iva_aplic = "account.%s_%s" % (company.id, 'ri_tax_withholding_vat_applied') | ||
env.ref(xml_id_ret_iva_aplic).codigo_impuesto = '02' | ||
_logger.info("Se agregaron los códigos de impuestos correspondientes para retenciones de ganancias aplicadas y retenciones de iva aplicadas.") | ||
|