Monday, May 15, 2023
4 changes
Resolved issues and error corrections
This change fixes an unreliable automated test in the subscription renewal area that could fail unpredictably. It helps keep the development and release process smoother by reducing false test failures unrelated to customer-facing behavior.
Original PR description
Before this commit, the following error could happen: ``` FAIL: TestSubscription.test_renew_different_currency Traceback (most recent call last): File…
Before this commit, the following error could happen:
```
FAIL: TestSubscription.test_renew_different_currency
Traceback (most recent call last):
File "/data/build/enterprise/sale_subscription/tests/test_sale_subscription.py", line 2555, in test_renew_different_currency
self.assertEqual(renew_data,
AssertionError: Lists differ: [('1_expansion', datetime.date(2023, 4, 29),[108 chars]4,))] != [('3_transfer', FakeDate(2023, 4, 29), 200, [90 chars]4,))]
First differing element 0:
('1_expansion', datetime.date(2023, 4, 29), 400.0, 600.0, res.currency(124,))
('3_transfer', FakeDate(2023, 4, 29), 200, 200, res.currency(124,))
+ [('3_transfer', FakeDate(2023, 4, 29), 200, 200, res.currency(124,)),
- [('1_expansion', datetime.date(2023, 4, 29), 400.0, 600.0, res.currency(124,)),
? ^ ^ ^ ^^^^^^ -- -- ^
+ ('1_expansion', FakeDate(2023, 4, 29), 400, 600, res.currency(124,))]
? ^ ^ ^ ^ ^
- ('3_transfer', datetime.date(2023, 4, 29), 200.0, 200.0, res.currency(124,))]
```This fixes an intermittent automated test issue in Odoo Studio by ensuring the test selects the intended activity field option. The change helps reduce false test failures and improves confidence in future Studio updates without changing user-facing behavior.
Original PR description
Before this commit, sometimes but rarely, the test_rename tour selected account.account to make a many2many relation and enabled "color" on that field. That color field (or rather, label) conflicted with consolidation_color. Without being able to reproduce, I have a possible explanation. In tours, the "text" command first does a click on the target element, then writes text and then fires input and change events. In the many2one field widget, the first click triggers a first name_search that, if it returns in time, may bypass the input and trigger the next step of the tour intempestively. If the next step doesn't test for the values available in the many2one's dropdown, it way then succeed without having selected the value we wanted. Hence this commit, makes the tour wait for a precise name_search value, then clicks on the one we want. We hope that the undeterministic issue is gone after that.
Point of Sale test scenarios now run with dedicated standard and administrator demo users instead of a generic accounting user. This makes it clearer which permissions each Point of Sale workflow actually needs, reducing the risk of permission issues being missed during testing.
Original PR description
Before the PoS tours were mainly run with the `accountman` user, which did not allow us to have a clear view of the permissions required for each function of the Point of Sale. Now, two users have been created for the PoS: - `pos_user` - `pos_admin` The first one has no particular permission, he is a normal user of the Point of Sale and Odoo, the second one is an administrator of the Odoo application. If the user `pos_user` is used and some permissions are missing in a tour, these are added to the user with starting the test.
Users generating coupons or gift cards from helpdesk sales now receive a confirmation when they enter a validity or expiration date in the past. This helps prevent accidental creation of already-expired discounts, coupons, or gift cards while still allowing intentional exceptions.
Original PR description
Before commit : ---------------------------------------------------- In helpdesk sale loyalty Discount & Loyalty we allow to set previous Validity and the same with generate coupons Valid Until and gift card Expiration date. After commit : ----------------------------------------------- If the user sets the previous validity, Valid Until and expiration date then takes a confirmation. task-2975858