Skip to content

Commit

Permalink
[FIX] account_ux: error al hacer un cobro con third party check
Browse files Browse the repository at this point in the history
Task: 35205
Al hacer un cobro de una factura de cliente desde el botón para cobrar "Register payment" desde la vista formulario de la factura, si se elige diario "Third party checks" para hacer el cobro entonces surge un error:

Video replicando el error en runbot adhoc de versión 17 (29/11/2023):
https://drive.google.com/file/d/15BJmMRyvsrrMvSG8CKJ-x74h0BB3qW-6/view
  • Loading branch information
pablohmontenegro committed Dec 1, 2023
1 parent 9681a92 commit c91ff40
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions account_ux/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ def get_accounting_rate(vals):
return 0.0
else:
return abs(vals['amount_currency']) / abs(vals['balance'])

company_currency = debit_values['company'].currency_id
reconcile_on_company_currency = debit_values['company'].reconcile_on_company_currency and \
company_currency = debit_values['aml'].company_currency_id
reconcile_on_company_currency = debit_values['aml'].company_id.reconcile_on_company_currency and \
(debit_values['currency'] != company_currency or credit_values['currency'] != company_currency) and \
not debit_values['record'].account_id.currency_id
if reconcile_on_company_currency:
if debit_values['currency'] != debit_values['company'].currency_id:
if debit_values['currency'] != company_currency:
debit_values['original_currency'] = debit_values['currency']
debit_values['original_amount_residual_currency'] = debit_values['amount_residual_currency']
debit_values['currency'] = debit_values['company'].currency_id
debit_values['currency'] = company_currency
debit_values['amount_residual_currency'] = debit_values['amount_residual']
if credit_values['currency'] != credit_values['company'].currency_id:
credit_values['original_currency'] = credit_values['currency']
Expand Down

0 comments on commit c91ff40

Please sign in to comment.