Skip to content

Commit

Permalink
[FIX] _witholding: restore date for partner aliquot
Browse files Browse the repository at this point in the history
revertimos esto 5fb0ba2
para tener de nuevo esto que es necesario para que la factura calcule bien bc5eba3

closes #848

Signed-off-by: mem-adhoc <mem@adhoc.com.ar>
  • Loading branch information
jjscarafia committed May 8, 2024
1 parent 60efb2d commit dff9a16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions l10n_ar_account_withholding/models/account_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ 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 dff9a16

Please sign in to comment.