2be2f64aeb33e29821d53baa0b540dc9474b9cdd
If a test is failing with assertRecordValues, the comparison and the error
logging were not computed the same way.
The _compare_candidate was accessing the record via
record[field_name]
which uses the cache
While the _format_message was doing
records.read(...)
which queries directly the database.
If the test was failing (correctly) because of a wrong cache invalidation
(e.g. update the value directly in SQL without invalidating the cache),
the error message would look like:
AssertionError: Record doesn't match expected values at index 0.
Current values:
{'id': 42, 'name': 'Foo'}
Expected values:
{'name': 'Foo'}
closes odoo/odoo#34589
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%