Daily updates from Odoo
Tuesday, March 26, 2024
2 changes
Resolved issues and error corrections
Chilean customers using the ecommerce checkout were unable to complete purchases when selecting the 'Ticket' payment option with automatic invoicing enabled. The system was incorrectly requiring them to complete an incomplete anonymous billing address they didn't have permission to edit. This fix ensures the anonymous address is treated as complete, allowing the checkout flow to proceed smoothly.
Original PR description
Chilean ecommerce checkout flow was consistently breaking when automatic invoice was enabled (Sale settings), for customers choosing the 'Ticket' option (not the 'Invoice' one). Indeed, choosing the 'Ticket' options sets a generic 'Anonymous' customer as billing address, but since this address is incomplete, the customer is redirected to the page to complete it, even though they don't have the rights to update that address since it's not theirs. This commit makes sure to consider this 'anonymous' billing address as being always complete, even if some fields are empty. opw-3792844
This fix removes an unnecessary filter that was significantly slowing down the task view in sales projects. The filter was redundant and caused the system to perform unnecessary searches, resulting in a 400x performance improvement (from 15 seconds down to 39 milliseconds). Users will now see task lists load much faster when viewing tasks associated with sales orders.
Original PR description
Since revision 81b5ef93a773b94a4e3770632469c692b0ff57fa, adding by default the filter `sale_order_id` which does: ```xml <field name="sale_order_id" string="Sale Order" filter_domain="['|',…
Since revision 81b5ef93a773b94a4e3770632469c692b0ff57fa, adding by default the filter `sale_order_id`
which does:
```xml
<field name="sale_order_id" string="Sale Order"
filter_domain="['|', ('sale_order_id', 'ilike', self), ('sale_line_id', 'ilike', self)]"
/>
```
becomes useless, because the final domain, with that `[('id', 'in', self.tasks_ids.ids)]` becomes:
```py
[
"&",
"&",
"&",
[
"project_id",
"!=",
false
],
[
"display_in_project",
"=",
true
],
[
"id",
"in",
[
3341211,
3526685,
3692221
]
],
"|",
[
"sale_order_id",
"ilike",
"SO2023/123456"
],
[
"sale_line_id",
"ilike",
"SO2023/123456"
]
]
```
which makes an "AND" connection between the task ids domain leaf and the sale order name ilike leaves, and all these task ids will come from these SO names, making the AND useless.
In addition to be useless, it downgrades the performance. On Odoo.com,
- with the filter `sale_order_id`: 15473 ms
- without the filter `sale_order_id`: 39ms
On the below screenshot:

The first request is with the filter `sale_order_id`
The second request is without the filter `sale_order_id`
opw-3752003
Forward-Port-Of: odoo/odoo#159115
Forward-Port-Of: odoo/odoo#158898