Friday, December 22, 2023
9 changes · master
Enhancements to existing features
This update improves the speed and reliability of several behind-the-scenes Odoo operations, including country search and spreadsheet accounting calculations. It also streamlines internal core code and adds stronger developer typing, helping reduce future maintenance risk without changing day-to-day workflows.
Original PR description
### [IMP] base: avoid quadratic behavior in `res_country`.`_name_search` ### [FIX] spreadsheet_account: replace bad usage of `_search` In `spreadsheet_fetch_debit_credit`, instead of using `_search` and manitulate SQL, use `_read_group()`. ### [REF] core: move `get_unaccent_wrapper` directly on the registry The `get_unaccent_wrapper` has to get the registry from a cursor object. This seems quite expensive for no reason. Instead, put the wrapper method directly in the registry, which is easily accessible from records. ### [IMP] core: add useful typing in the ORM https://github.com/odoo/enterprise/pull/52424
This update prevents changes made in related record lists, such as toggling a checkbox, from being saved immediately. Users can review their changes and save the main record when ready, reducing crashes and avoiding unwanted record creation.
Original PR description
The purpose of this commit is to no longer save the record of an x2many when an autosave field is applied to an update. For example, when you place a toggle field boolean in the list view of an x2many, you don't want to save the x2many's record every time you toggle it.
The current behaviour can cause crashes or the creation of unwanted records.
Scenario:
- Go to a form view with an x2many in list mode that contains a boolean field with the 'toggle_boolean_field' widget.
- Click on the boolean field with 'toggle_boolean_field'
Before this commit:
The record in the x2many is saved
After this commit:
The change is just applied client-side. The save button must be clicked
to save the main record.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prPayment receipts can now show the appropriate title, such as "Remittance Advice" for supplier payments, in both Australia and New Zealand. This makes payment documents clearer for local business practices and easier to extend for country-specific needs.
Original PR description
In https://github.com/odoo/odoo/pull/139543 we implemented a small change that would allow users in AU to print a payment receipt with a title that was changed to "Remittance Advice" if they are sending it to a Supplier. This is also needed in NZ and the naive way it was done wouldn't work for multiple countries. Thus, we change the way this title is set by introducing a computed field that will allow to set that title based on conditions more freely. Task id 3637189 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update improves how Colombian electronic invoicing handles IBUA taxes for non-healthy products by adding a dedicated reference tax field instead of relying on the product volume field. It also corrects missing tax groups and makes tax setup data easier for business teams to review and maintain.
Original PR description
In Odoo 15 we introduced IBUA and ICUI taxes for non-healthy products. We used the Volume field (regardless of the UoM) because we had no choice, in stable we can't add fields. In master we're adding the l10n_co_edi_ref_nominal_tax field. Together with the fixed amount of the tax, we can use it to compute back the sugar rate of the product. It has also been added to the product view. Fixed the missing tax groups. The fix will be backported saas-16.4. Chart template did manually insert the groups, but it has to be done through CSV files that are easier to be updated and checked by non-technical people. Previous task: https://www.odoo.com/web#id=3569752&model=project.task$ Task link: https://www.odoo.com/web#id=3614333&&model=project.task task-3614333
Accounting report exports to Excel now size rows and columns based on their content, making them easier to read without manual adjustment. The export font also changes from Arial to Lato, using a bundled open-license font for consistent layout calculations.
Original PR description
Aims to give a better out-of-the-box layout for xlsx exports by computing the columns width and height based on the cell content. Also replace the default font set in this export by Lato instead of Arial. This way, we are using a font under the SIL Open Font License, which is also bundled in Odoo meaning that we can use the bundled ttf for our computation purposes. Task id #3580242
Planning from the Gantt view is now quicker when work is grouped by sales order line. Users can directly plan the relevant sales order line instead of sorting through a dialog with unrelated options.
Original PR description
[IMP] sale_planning: improve ux In this commit: when planning gantt view is grouped by SOL, plan the corresponding SOL directly instead of opening the wizard. task-3058467
Automatic transfers can now be archived when they should no longer be used, while preserving records tied to posted accounting entries. Users can also delete transfers more safely when only draft entries are involved, reducing errors and keeping accounting history intact.
Original PR description
Following PR https://github.com/odoo/enterprise/pull/52577, this commit adds the posibility to archive
automatic transfer which was not present so far.
Objective
---------
a) Allow transfers to be archived.
b) Update to optain the following behavior:
1. If the transfer is linked to some POSTED account moves
-> archive only
2. If the transfer is linked to some DRAFT account moves
-> archive OR
-> delete the DRAFT moves, then delete the transfer
3. Else, the delete and the archive actions should work right away.
Solution
---------
1. Add an active field to allow for the archiving of a transfer.
2. Add the search view to easily display the archived transfers and
update the form view to hide the buttons in archived transfers forms and
display the "Archived" ribbon when necessary.
3. Override the action_archive, so that archived transfers are
automatically disabled.
4. Addition of tests
task-3621529The shop floor display now separates the general view buttons from the workcenter selection buttons. This makes the interface easier to scan and helps operators choose the right workcenter more quickly.
Original PR description
Before this commit, all the workcenter buttons were grouped together at the top of the new shop floor display. This commit improves this by splitting this single panel into one at the top, for the "All" and "My" buttons, and a new panel below, for all the workcenter buttons. Task: 3432610
Users sharing a single document can now open a preview directly from the share portal. This makes it easier to confirm the shared file without downloading it or navigating elsewhere.
Original PR description
Purpose: - When we select a single document and share it, a preview button will be available to preview the document. Task-3370897