Friday, August 30, 2024
1 change · master
Code cleanup and technical improvements
Intrastat reports now use a more efficient reporting engine, making report generation more consistent and easier to maintain. Users will also see cleaner line descriptions and clearer supplementary unit labels, while exports handle comparison data more appropriately.
Original PR description
Before this commit, we used the dynamic_line_generator to generate the lines. It works well but it's quite less efficient than the custom report engine, that we will use now after this commit. But…
Before this commit, we used the dynamic_line_generator to generate the lines. It works well but it's quite less efficient than the custom report engine, that we will use now after this commit. But with the complexity of grouping line in intrastat, we made some changes in the code base of the account_report engine :
• For the custom groupby : https://github.com/odoo/enterprise/pull/60565
• For the warnings : https://github.com/odoo/enterprise/pull/60929
Also include some UI changes for the lines data, mainly for the name of each line where there were too much information, and it was hard to read. Also for the supplementary units, it now shows the unit code (l, p/st, ...)
For the SQL, before this commit, the report used 2 different query for parents and sublines, with different information returns for each query, after this commit we will use only one query with always the same data structure.
And then, add a little computed field in the account_move model for intrastat with the intrastat_system as a string ('Arrival' or 'Dispatch')
task-3747192