Skip to content

Commit

Permalink
[FIX] _withholding: compute partner aliquot tax without date
Browse files Browse the repository at this point in the history
If date is False the aliquot is not computed. if date is False use today
  • Loading branch information
jjscarafia committed Jan 28, 2023
1 parent e5fd9c6 commit 7ac1ecc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions l10n_ar_account_withholding/models/account_tax.py
Expand Up @@ -256,6 +256,8 @@ def _compute_amount(
self, base_amount, price_unit, quantity=1.0, product=None, partner=None, fixed_multiplicator=1):
if self.amount_type == 'partner_tax':
date = self._context.get('invoice_date', fields.Date.context_today(self))
if not date:
date = fields.Date.context_today(self)
partner = partner and partner.sudo()
return base_amount * self.sudo().get_partner_alicuota_percepcion(partner, date)
else:
Expand Down

0 comments on commit 7ac1ecc

Please sign in to comment.