Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] stock_account: retain assigned automated accounts
Steps to reproduce: 1- install stock_account and account_accountant 2- activate in Settings > Accounting > Automatic Accounting 3- open a Product Category > set Inventory Valuation = Automated [`real_time`] (optional step: can change the account stock properties values, but doesn't matter) 4- install mrp_account Expected result: - Accounts already set under the Account Stock Properties (i.e.: property_stock_valuation_account_id, property_stock_account_input_categ_id, etc) remain unchanged. Actual result: - Account stock properties for any Product Categories already set to Automated before installing mrp_account are wiped to nothing Issue: `_post_load_data` was resetting all property values (i.e. the accounts) to False since PR odoo#119564 to ensure correct accounts were used for `manual_periodic` valuation when stock_account and mrp_account are first installed. This was previously not an issue because no valuations could be set to `real_time` before stock_account was installed and mrp_account did not run `post_load_data` (i.e. an mrp account was added) until saas-16.3. So now we avoid wiping existing assigned accounts when mrp_account calls `_post_load_data` at its install time closes odoo#147958 Task: 3471065 X-original-commit: cc74152 Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
- Loading branch information