Skip to content
Snippets Groups Projects
Commit d0109dc5 authored by Yolann Sabaux's avatar Yolann Sabaux
Browse files

[FIX] purchase: prevent traceback onchange partner

Steps to reproduce:
In an account move, if the partner_id is changed to one that does not have a value assigned in the property_purchase_currency_id field and with a value in the context for default_currency_id,
when passing through the _onchange_partner_id function of the purchase module,

Cause:
the variable currency_id will take the value in the context as second option causing an error when trying to get the value in currency_id.id because currency_id will be an integer and not a record.

issue-121232

note fw 16:
The record must be saved in order to trigger the compute in
https://github.com/odoo/odoo/blob/5a256af35e5d612efed9ed8af1cf23fd62bd83f4/addons/account/models/account_move_line.py#L449-L457


in order to recompute the currency of the lines

closes odoo/odoo#121957

X-original-commit: e04d4a0b
Signed-off-by: default avatarYolann Sabaux (yosa) <yosa@odoo.com>
parent e542c4a0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment