Skip to content

Commit

Permalink
[IMP] l10n_ar_account_tax_settlement: agregar código de impuesto al i…
Browse files Browse the repository at this point in the history
…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
pablohmontenegro committed Apr 9, 2024
1 parent 8b0d916 commit 57e4feb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions l10n_ar_account_tax_settlement/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
##############################################################################
from . import models
from . import wizards
from .hooks import post_init_hook
1 change: 1 addition & 0 deletions l10n_ar_account_tax_settlement/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@
'installable': True,
'auto_install': True,
'application': False,
'post_init_hook': 'post_init_hook',
}
13 changes: 13 additions & 0 deletions l10n_ar_account_tax_settlement/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import api, SUPERUSER_ID
import logging
_logger = logging.getLogger(__name__)


def post_init_hook(env):
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.")

0 comments on commit 57e4feb

Please sign in to comment.