Daily updates from Odoo
Monday, July 8, 2024
2 changes
Code cleanup and technical improvements
Odoo removes an unused manual setup flow for XML validation files and moves validation into automated nightly tests. This reduces user-facing configuration while still checking that generated accounting, payroll, banking, and localization XML documents meet required external formats.
Original PR description
Problem --------- In times immemorial, XSD checks were added to Odoo, so that when we generate an XML file to be sent to a service, we validate it using the corresponding XSD before sending it. At…
Problem --------- In times immemorial, XSD checks were added to Odoo, so that when we generate an XML file to be sent to a service, we validate it using the corresponding XSD before sending it. At the request of the infra team, which was concerned that we were downloading XSDs again and again on new databases when people tried generating XMLs for the first time, this framework was refactored in 16.0 in the following task. This no longer made the download of XSDs automatic, but made it possible through a button in the settings in debug mode. Which means that 99% of users never use it. Objective --------- 1. Remove the whole 'XSD framework' 2. Instead, add nightly (l10n_external) tests that try to generate the XMLs, download the XSD and try to validate the XMLs using the XSDs. Solution --------- Remove all occurances of `action_download_xsd_files` et al. Instead, we now have a decorator `test_xsd`. 1. place the decorator on test functions 2. use either take a URL or path to an XSD file as argument 3. make sure the decorated method returns the XML to test for 4. make sure your test as the exernal tag if using a URL Upon running the test, the decorated method will run test the XML against the specified XSD. odoo/odoo/pull/171593 task-3619697
Message-related data is now sent in a flatter, simpler format, reducing repeated information when the same contact appears across multiple messages. This should lower data transfer and browser processing, helping messaging features in Knowledge, WhatsApp, and VoIP feel more efficient without changing user workflows.
Original PR description
This will reduce data transferred to the client and processed in JS when the same persona was appearing in multiple messages. This also makes more clear what is transferred by avoiding nested values. This is part 5, focusing on message and persona in message. Formatting code eventually becomes simpler too, by always adding data to the store rather than updating pre-existing dict manually. Part of task-3605717 https://github.com/odoo/odoo/pull/171585