Skip to content

Commit

Permalink
Merge commit 'refs/pull/134709/head' of https://github.com/odoo/odoo
Browse files Browse the repository at this point in the history
…into 16.0-3573
  • Loading branch information
docker-odoo committed Sep 7, 2023
2 parents 25bffe7 + 7f3c10c commit 56c323f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions addons/l10n_ar/models/account_move.py
Expand Up @@ -24,7 +24,7 @@ def _l10n_ar_get_document_number_parts(self, document_number, document_type_code
' identify the type of responsibilities that a person or a legal entity could have and that impacts in the'
' type of operations and requirements they need.')

l10n_ar_currency_rate = fields.Float(copy=False, digits=(16, 6), readonly=True, string="Currency Rate")
l10n_ar_currency_rate = fields.Float(copy=False, readonly=True, string="Currency Rate")

# Mostly used on reports
l10n_ar_afip_concept = fields.Selection(
Expand Down Expand Up @@ -144,8 +144,12 @@ def _set_afip_rate(self):
if rec.company_id.currency_id == rec.currency_id:
rec.l10n_ar_currency_rate = 1.0
elif not rec.l10n_ar_currency_rate:
rec.l10n_ar_currency_rate = rec.currency_id._convert(
1.0, rec.company_id.currency_id, rec.company_id, rec.date, round=False)
rec.l10n_ar_currency_rate = self.env['res.currency']._get_conversion_rate(
from_currency=rec.currency_id,
to_currency=rec.company_id.currency_id,
company=rec.company_id,
date=rec.invoice_date,
)

@api.onchange('partner_id')
def _onchange_afip_responsibility(self):
Expand Down

0 comments on commit 56c323f

Please sign in to comment.