Thursday, July 13, 2023
6 changes · master
Enhancements to existing features
Accounting reports can now be organized into separate sections, making large or legally bundled reports easier to navigate and export. Optional appendices can stay hidden until needed, reducing clutter while still allowing businesses to include required documents when relevant.
Original PR description
** Terminology ** A section is a 'page' of a report. Typically, when opening a report with multiple sections, we display the lines of only one section at a time, and a page switcher appears on top of…
** Terminology **
A section is a 'page' of a report. Typically, when opening a report with multiple sections, we display the lines of only one section at a time, and a page switcher appears on top of the report.
For clarity, we here refer to reports made of sections as 'composite reports'.
** Implementation notes **
Sections are modelled in the same way as group of taxes, by using composite objects. This commit hence introduces a m2m relationship from account.report to account.report. It is therefore possible for a report to be a section of multiple composite reports. Note however that it is not allowed to use composite reports as sections, for the sake of simplicity and comfort of use.
A report cannot both define lines (nor static, not dynamic) and have sections; it wouldn't make sense (which page should these lines be displayed on, then ?).
** Functional use **
This feature allows supporting two new use cases:
1) Report appendices
Some reports (especially tax reports) define additional parts that can or must be provided with them depending on business conditions. We don't want to always display those in Odoo, as most people will not need then, or only one of them. The solution for that is achieved by the use of sections : each of these documents is a section of its own, and we make use of a new 'active' field on account.report to hide the optional sections by default. When opening a composite report with inactive sections, a '+' button is shown in the section switcher to allow displaying and enabling them. This way, users can easily configure what they want without being invaded by tons of unneeded options.
2) Grouping existing reports
It is sometimes useful to group multiple standard reports into a single document. It is sometimes even legally required to submit them together (like the 'liasse fiscale' in France, grouping BS and P&L). This can now easily be done by defining a new composite report using each of those reports as a section. Any non-composite report can be a section of any number of composite reports, allowing full flexibility on that side.
** Filters and export buttons management **
When displaying a composite report:
- the filters displayed correspond to the one of the active section
- the export buttons displayed are the ones from the composite report
- the fields defining option filters on the composite report are never used (and not displayed in its form view)
** Preloading and Caching **
This commit comes with big changes on the Javascript side and the way it calls the server. When opening a composite report, the sections are loaded asynchronously one after the other, without blocking the user interface. A cache is maintained with all the loaded data from the sections and previoulsy opened variants. When the user changes a filter, the cache is invalidated accordingly for all reports supporting it. This allows a way more seemless navigation, thanks to the reduction of the perceived loading time.
** Default file export behavior for composite reports **
- pdf: Each section one after the other ; starting on a new page.
- xlsx: Each section is a distinct sheet within the resulting file.
** New warning API **
The preloading & caching mechanism requires the get_options() and get_report_informations() functions to be decoupled and called separately from js. Because of that, it is not possible anymore to modify the options dictionary while generating the content of the report to add new warning keys to be used in custom templates to display some kind of banner on the report, like we did in several places. To solve that, we introduce a new way to define warnings, not requiring any custom template to be used on the report (instead, the warning template is directly called from the standard code). This is essentially achieved by adding a parameter to _get_lines and the engine functions, in the form of a dictionary that can be modified during the report's computation to enable warnings dynamically. This parameter is optional, allowing to skip warning generation in case we don't want it.
Task 3098971The website sale UPS demo data now keeps the cash on delivery payment option disabled by default. This helps demo environments better reflect the intended checkout setup and avoids showing an unsuitable payment option during demonstrations or testing.
Original PR description
task-3235154 See also: - https://github.com/odoo/odoo/pull/121138
Inter-company invoice synchronization now attaches the customer invoice PDF from one company as the main attachment on the matching vendor bill in the counterpart company. This makes related documents easier to find and helps finance teams keep both sides of the transaction aligned.
Original PR description
When activating the synchronization of the invoices/bills, the customer invoice from company A should be added to the vendor bill of the company B as the main attachment. This commit improves the inter-company transactions synchronization by adding a copy of the customer invoice to the main attachment of the corresponding vendor bill of the counterpart company. task-3240203
The view editor setup now includes a required naming service so related view features can work correctly after recent platform changes. This helps keep Studio editing tools compatible and reliable without changing the user workflow.
Project-related settings now use the available screen width more effectively, making labels, descriptions, and dropdowns easier to read and interact with. This improves clarity when configuring project, field service, helpdesk, and document settings without changing business workflows.
Original PR description
In this PR - By this space is fixed between the project label and the field. - Fix the content does not appear in full row due to bootstrap classes written in the setting component. so now with this commit the column size will be increases task-3183771
Users can now link imported bank transactions directly to a vehicle when entering manual bank reconciliation operations. This improves tracking of vehicle-related expenses and enforces vehicle selection when required for disallowed car expense accounts.
Original PR description
Users might import bank transactions related to vehicles, and would like to manually reconcile these transactions directly to a vehicle expense account. Currently, it is not possible to associate this entry with a vehicle. After this PR, users are able to specify the vehicle in the Manual Operations Tab of the bank reconciliation. Task-3142842