Tuesday, October 13, 2020
1 change · master
Resolved issues and error corrections
This fix prevents expense analytic accounts and tags from being reset when a product is changed if the user has already selected values. It keeps existing expense details intact and resolves test failures when the analytic defaults feature is installed.
Original PR description
_onchange_product_id() used to always (re)set hr_expense analytic_account_id & analytic_tag_ids to default values. Or set those to false if no default values are found. Installing account_analytic_default_hr_expense made odoo/addons/hr_expense/tests/test_expenses.py tests fail - changed function name (no need to be a _onchange_product_id override) - removed super() & return - only set default value to var if var is False Task: 2205544