-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] l10n_ar_account_withholding: Migration to 16.0
closes #663 Related: ingadhoc/odoo-argentina-ee#169 Related: ingadhoc/account-payment#339 Related: ingadhoc/argentina-sale#116 Signed-off-by: Juan José Scarafía <jjs@adhoc.com.ar>
- Loading branch information
1 parent
b82b6ca
commit 37fef50
Showing
7 changed files
with
31 additions
and
77 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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
from odoo import models, fields | ||
from odoo import models | ||
|
||
|
||
class AccountMoveLine(models.Model): | ||
|
||
_inherit = 'account.move.line' | ||
|
||
def compute_l10n_latam_prices_and_taxes(self): | ||
""" When computing the prices and taxes compute we pass the invoice date | ||
in order to properly compute the perception/retention rates """ | ||
def _compute_all_tax(self): | ||
""" Mandamos en contexto el invoice_date para calculo de impuesto con partner aliquot""" | ||
for line in self: | ||
invoice_date = line.move_id.invoice_date or fields.Date.context_today(self) | ||
super(AccountMoveLine, line.with_context(invoice_date=invoice_date)).compute_l10n_latam_prices_and_taxes() | ||
line = line.with_context(invoice_date=line.move_id.invoice_date) | ||
super(AccountMoveLine, line)._compute_all_tax() |
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