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: nueva especificación txt iibb M…
…isiones ret/perc Ticket: 60295
- Loading branch information
1 parent
5a52826
commit 765ac5a
Showing
2 changed files
with
109 additions
and
12 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 |
---|---|---|
@@ -1,8 +1,15 @@ | ||
from odoo import models, fields | ||
from odoo import models, fields, api | ||
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('withholding_advances') | ||
def withholding_advances_misiones(self): | ||
""" Los impuestos de reteción de Misiones deben ser aplicados a un único comprobante """ | ||
if self.withholding_advances and self.tax_group_id.name == 'Retención IIBB Misiones': | ||
raise ValidationError("Lo impuestos de retención de Misiones no pueden tener seleccionada la opción de Adelantos Sujetos a Retención ya que la retención debe hacerse a un único comprobante.") |