Friday, August 23, 2024
2 changes · 17.0
Resolved issues and error corrections
This fix resolves a test failure in the partner commission module where salespeople lacked the necessary permissions to view sale order templates. The change ensures that the sale order template field is properly visible during testing, allowing the commission plan rules test to run successfully without demo data.
Original PR description
Before this commit, the salesmen did not had the right group and the test crashed with the following error when the test was run without demo data:
```
FAIL: TestCommissions.test_commission_plan_rules_with_template
Traceback (most recent call last):
File "/data/build/enterprise/partner_commission/tests/test_commissions.py", line 221, in test_commission_plan_rules_with_template
form.sale_order_template_id = so_template
File "/data/build/odoo/odoo/tests/form.py", line 326, in __setattr__
self[field_name] = value
File "/data/build/odoo/odoo/tests/form.py", line 331, in __setitem__
assert field_info is not None, f"{field_name!r} was not found in the view"
AssertionError: 'sale_order_template_id' was not found in the view
```
runbot task: 70916 and 73195
https://runbot.odoo.com/web/#id=70916&view_type=form&model=runbot.build.error&menu_id=405&cids=1 https://runbot.odoo.com/web/#id=73195&view_type=form&model=runbot.build.error&menu_id=405&cids=1Code cleanup and technical improvements
The budget calculation system has been reorganized to make it easier for developers to customize and extend. Specific calculation methods were separated out from the main computation process and given clearer names, improving the overall code structure without changing how the system works for end users.
Original PR description
The methods 'get_accounts' and 'get_query' were extracted from the _compute_practical_amount method for inheritance purposes. Consequently, their names were changed to more descriptive ones.