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: sicore aplicado iva percepciones
Generates the txt file for sicore IVA applied insights
- Loading branch information
1 parent
b172a55
commit e900a8e
Showing
5 changed files
with
74 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from odoo import api, models, fields, _ | ||
from odoo.exceptions import ValidationError | ||
|
||
class AccountTax(models.Model): | ||
_inherit = 'account.tax' | ||
|
||
codigo_regimen = fields.Char(string='Codigo de regimen IVA', size=3) | ||
porcentaje_exclusion = fields.Float(string='Porcentaje de exclusión') | ||
|
||
@api.constrains('codigo_regimen', 'tax_group_id') | ||
def _check_codigo_regimen(self): | ||
if self.filtered(lambda x: x.codigo_regimen and x.tax_group_id.l10n_ar_tribute_afip_code != '06'): | ||
raise ValidationError(_('El código de régimen de iva es solo utilizado para percepciones de iva')) |
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="view_tax_form_inherited" model="ir.ui.view"> | ||
<field name="name">account.tax.form.inherited</field> | ||
<field name="model">account.tax</field> | ||
<field name="inherit_id" ref="account.view_tax_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='tax_group_id']" position="after"> | ||
<field name="codigo_regimen"/> | ||
<field name="porcentaje_exclusion"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |