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
444d8e0
commit 7557eee
Showing
4 changed files
with
121 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
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 models | ||
from odoo.exceptions import ValidationError | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = 'account.move' | ||
|
||
def action_post(self): | ||
""" Si la factura es rectificativa y tiene percepciones de misiones la misma tiene que tener el mismo importe que la factura original y fecha igual o posterior a la de la factura original """ | ||
for amount in self.amount_by_group: | ||
if amount[0] == 'Percepción IIBB Misiones' and self.reversed_entry_id and self.amount_total != self.reversed_entry_id.amount_total: | ||
raise ValidationError("Si está haciendo una factura rectificativa con percepciones de misiones, la misma debe hacerse sobre el importe total de la factura original") | ||
super().action_post() |
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.depends('withholding_advances') | ||
def withholding_advances_misiones(self): | ||
""" Los impuestos de retención de Misiones no deben tener en cuenta para su cálculo otras retenciones que se hicieron en el período """ | ||
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 su cálculo no debe tener en cuenta otras retenciones realizadas en el período.") |