Skip to content
Snippets Groups Projects
user avatar
Yolann Sabaux authored
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>
d0109dc5
History
Name Last commit Last update
..
account
account_check_printing
account_debit_note
account_edi
account_edi_proxy_client
account_edi_ubl_cii
account_fleet
account_lock
account_payment
account_payment_invoice_online_payment_patch
account_qr_code_sepa
account_sequence
account_tax_python
account_test
analytic
association
attachment_indexation
auth_ldap
auth_oauth
auth_password_policy
auth_password_policy_portal
auth_password_policy_signup
auth_signup
auth_totp
auth_totp_mail
auth_totp_mail_enforce
auth_totp_portal
barcodes
barcodes_gs1_nomenclature
base_address_extended
base_automation
base_geolocalize
base_iban
base_import
base_import_module
base_install_request
base_setup
base_sparse_field
base_vat
board
bus
calendar
calendar_sms
contacts
crm
crm_iap_enrich
crm_iap_mine
crm_livechat
crm_mail_plugin
crm_sms
data_recycle
delivery
delivery_mondialrelay
delivery_stock_picking_batch
digest
event
event_booth
event_booth_sale
event_crm
event_crm_sale
event_sale
event_sms
fleet
gamification
gamification_sale_crm
google_account
google_calendar
google_gmail
google_recaptcha
hr
hr_attendance
hr_contract
hr_expense
hr_fleet
hr_gamification
hr_holidays
hr_holidays_attendance
hr_hourly_cost
hr_maintenance
hr_org_chart
hr_presence
hr_recruitment
hr_recruitment_skills
hr_recruitment_survey
hr_skills
hr_skills_slides
hr_skills_survey
hr_timesheet
hr_timesheet_attendance
hr_work_entry
hr_work_entry_contract
hr_work_entry_holidays
http_routing
hw_drivers
hw_escpos
hw_posbox_homepage
iap
iap_crm
iap_mail
im_livechat