Daily updates from Odoo
Thursday, May 28, 2020
2 changes · master
Resolved issues and error corrections
The salary contract process no longer sends an unused token value to certain server routes. This reduces unnecessary network data and prevents repetitive log messages, making the system cleaner to operate without changing user behavior.
Original PR description
Since b2f9403 the param `token` is no longer necessary for some routes. We should avoid sending unnecessay things via the network. Moreover, it logs this everytime the route is called which brings noise to the logs. `INFO odoo-db odoo.http: <function odoo.addons.l10n_be_hr_contract_salary.controllers.main.onchange_advantage> called ignoring args <token>`
Salary contract simulations now handle internal saving steps with the right permissions, preventing test and workflow failures when employee data is not already cached. This makes the payroll salary package flow more reliable in limited module setups without changing user-facing features.
Original PR description
We flush the contract to avoid writing anything after the rollback (maybe everything should be flushed and not only the contract?). Flushing triggers fields recomputation which read and writes some records. However the user might not have the required access rights here. This leads to the following problem: Install `test_l10n_be_hr_payroll_account` only and run the module tests. => The tour fails, trying to read the employee without the required access rights. Note: the tour does not fail if all modules are installed; hence it does not fail when tests are run on Runbot. The reason is that the employee is already loaded (by some other module) in the cache with a sudo'ed environnement.