Daily updates from Odoo
Thursday, August 1, 2024
23 changes · master
Enhancements to existing features
Gantt popover footers now handle replacement customizations consistently with form dialog behavior. This makes it easier for businesses using tailored Gantt views, such as time off planning, to get predictable footer layouts and actions.
Original PR description
This commit adapts the code which allows to use the replace attribute in gantt popover footer custom archs to align with the behavior of the same functionality made in the form view dialog through https://github.com/odoo/odoo/pull/171537 task-4010906
Customers viewing shared project or field service tasks now see address information in a way that matches the internal view. Closed tasks also show the deadline, making shared task details more consistent and easier to understand.
Original PR description
This commit improve project sharing project task form view. - Show customer address in project sharing task from like it displayed in backend. - Display deadline field for close task in project sharing to be consistant. task-3764775
The Knowledge app search controls now look more like clear, tappable buttons on smaller screens. This improves readability and makes mobile use easier for users working with Knowledge articles.
Original PR description
This commit adapts the ControlPanel buttons' styling (Knowledge search) to look like actual buttons and improves their readability for smaller screens. task-3336242
The manufacturing shop floor test flow was improved to make sure a wizard closes properly during automated checks. This helps reduce false test failures and keeps quality checks more dependable without changing day-to-day user behavior.
Original PR description
In this commit: ===================== - Improve test tour by ensuring that wizard is closed. task-3815521
Resolved issues and error corrections
This fixes the layout of call-to-action sections on Helpdesk website pages when more than one button is shown. The buttons now align properly, avoiding a broken or awkward appearance for visitors and helping keep support pages polished.
Original PR description
| Master | This PR | |--------|--------| | <img alt="image" src="https://github.com/user-attachments/assets/8f19044a-0c85-4973-938b-c7bdacfddf4c"> | <img alt="image" src="https://github.com/user-attachments/assets/90bceac9-428d-4f1f-81b1-252e86fd1524"> | | <img alt="image" src="https://github.com/user-attachments/assets/d86944db-03a8-4caa-b198-d21bebccba55"> | <img alt="image" src="https://github.com/user-attachments/assets/fc238783-d22c-44d0-adb4-36800001384d"> | Commit[1], which is part of the Odoo 18 snippets redesign aimed to align all the occurrences of the `s_call_to_action` snippet across the front-end. It appears that this commit did not take into account the fact that a second button can be xpath next to the first one. To ensure this scenario does not cause any issue, we restore the flex layout already existing before. Commit[1]: 53c0592f367572db5ceff49db2f4363b7306a102 task-4086686
This fix makes more labels, prompts, and messages across several Odoo apps available for translation. It improves usability for businesses operating in multiple languages by ensuring interface text can be localized consistently.
Original PR description
Community: https://github.com/odoo/odoo/pull/174914
The payroll test for Australian employee termination payments now uses a fixed date so the employee's age stays consistent. This prevents test results from changing over time due to age-based withholding rules, improving reliability without affecting business operations.
Original PR description
Termination test failed because the employee's age was over 60 now, which gets a lower withholding rate. This commit sets a freezetime so a fixed age is used.
The WhatsApp module now correctly includes a missing dependency needed for its routing-related functionality. This helps prevent installation or runtime issues caused by unavailable supporting functions.
Original PR description
The `http_routing` module is missing from whatsapp dependency, therefore it doesn't import the function `_slugify`
Code cleanup and technical improvements
The Knowledge app now uses the updated Unsplash connection introduced by a related platform refactor. This keeps cover image selection aligned with the latest editor support while preserving existing user behavior.
Original PR description
The PR odoo/odoo#172938 refactor the web_unsplash module to support both `web_editor` and `html_editor`. This commit changes the import accordingly.
Miscellaneous changes
By default, we send date_order to Avatax when asking to calculate taxes. Avatax calculates the right taxes for that point in time. For non-recurring orders this is ok, but subscriptions are paid multiple times and date_order will remain the confirmation date of the subscription. This leads to confusion as taxes change over time (e.g. tax laws change or an exemption certificate is added with an effective date after date_order). Because customers are charged based on invoices we always charge t
Original PR description
By default, we send date_order to Avatax when asking to calculate taxes. Avatax calculates the right taxes for that point in time. For non-recurring orders this is ok, but subscriptions are paid multiple times and date_order will remain the confirmation date of the subscription. This leads to confusion as taxes change over time (e.g. tax laws change or an exemption certificate is added with an effective date after date_order). Because customers are charged based on invoices we always charge them correctly, but the subscription total may not match what they're being charged. To solve this, always send the current date for subscriptions. This way customers can accurately see what they'll be charged in the portal. task-4078473 Forward-Port-Of: odoo/enterprise#67743
This commit implements the functionality to support exporting libros XLSX with some line using a tax of type Prorrata. Prorrata is a fiscal system here in Spain, in which companies who have activities where they can deduct IVA, and activities where they don´t have that right, the fiscal Agency gives you a formula you can use to simplify the process, and deduct the percentage you get from that formula from the IVA amount of an invoice. For example, on an invoice with tax 21% IVA, from that amo
Original PR description
This commit implements the functionality to support exporting libros XLSX with some line using a tax of type Prorrata. Prorrata is a fiscal system here in Spain, in which companies who have…
This commit implements the functionality to support exporting libros XLSX with some line using a tax of type Prorrata. Prorrata is a fiscal system here in Spain, in which companies who have activities where they can deduct IVA, and activities where they don´t have that right, the fiscal Agency gives you a formula you can use to simplify the process, and deduct the percentage you get from that formula from the IVA amount of an invoice. For example, on an invoice with tax 21% IVA, from that amount we can apply the prorrata percentage, and get a deductable and non deductable amount. The deductable amount should go to the normal IVA account, and the non deductable should go to the same account as the tax base. To simulate Prorrata tax in Odoo, we can create a new tax with only partial of the tax percentage is applied an account, tax grid, and checked in 'use in tax closing'. When we create invoice/bill with this tax, only those partial amount should be included in the tax_deductible field of the libros XLSX. Before this commit: tax_deductible amount include the full tax amount. After this commit: tax_deductible amount only include the tax amount if the line have a tax grid. task-id: 3955233 Forward-Port-Of: odoo/enterprise#67193
This commit fixes an issue with the garbage collecting of knowledge articles. Old articles weren't being unlinked after they due date was passed. This is caused by a missing context key `active_test` which enables us to search articles that could be archived. Since `to_delete` articles are considered as archived, the original search never found any article to remove. Now, the context is added enabling the autovacuum to do its job and remove old useless articles. task-4047720 Forward-P
Original PR description
This commit fixes an issue with the garbage collecting of knowledge articles. Old articles weren't being unlinked after they due date was passed. This is caused by a missing context key `active_test` which enables us to search articles that could be archived. Since `to_delete` articles are considered as archived, the original search never found any article to remove. Now, the context is added enabling the autovacuum to do its job and remove old useless articles. task-4047720 Forward-Port-Of: odoo/enterprise#67739 Forward-Port-Of: odoo/enterprise#66586
Termination test failed because the employee's age was over 60 now, which gets a lower withholding rate. This commit sets a freezetime so a fixed age is used. Forward-Port-Of: odoo/enterprise#67766
Original PR description
Termination test failed because the employee's age was over 60 now, which gets a lower withholding rate. This commit sets a freezetime so a fixed age is used. Forward-Port-Of: odoo/enterprise#67766
task-4045835 Forward-Port-Of: odoo/enterprise#66822
Original PR description
task-4045835 Forward-Port-Of: odoo/enterprise#66822
Steps to reproduce ================== - Install account_accountant,web_studio - Go to Accounting > Configuration > Account Groups - Open studio - Switch to the form view - Show invisible elements - Add a new field before the invisible Company field => Error: Xpath resolved to nothing or multiple nodes Cause of the issue ================== The xpath props of the StudioHook is the string "null" The fields of this view are defined inside an InnerGroup but there is no OuterGrou
Original PR description
Steps to reproduce ================== - Install account_accountant,web_studio - Go to Accounting > Configuration > Account Groups - Open studio - Switch to the form view - Show invisible elements -…
Steps to reproduce
==================
- Install account_accountant,web_studio
- Go to Accounting > Configuration > Account Groups
- Open studio
- Switch to the form view
- Show invisible elements
- Add a new field before the invisible Company field
=> Error: Xpath resolved to nothing or multiple nodes
Cause of the issue
==================
The xpath props of the StudioHook is the string "null"
The fields of this view are defined inside an InnerGroup but there is no OuterGroup.
```xml
<form><sheet>
<group>
<field .../>
...
</group>
</sheet></form>
```
In the form compiler, when a group does not contain another group, it is an InnerGroup
The form editor compiler uses some `interestingSelector` to compute xpaths.
It assumed that an InnerGroup was always inside an OuterGroup
Solution
========
Since the `:has` selector has not been widely supported for long enough,
we do the equivalent of `:not(field) group:not(:has(> group)) > *` in
javascript to match any group that has no direct group as a child.
opw-4046558
Forward-Port-Of: odoo/enterprise#67734
Forward-Port-Of: odoo/enterprise#67151## Issue: - For an inventory operation, if a product quantity is less than 1 (eg. 0.5), the "+" button in the Barcode app will display "+1" instead of "+ 0.5". ## Steps To Reproduce: - In Inventory, create a transfer (Receipts) with a product where the quantity is 0.5 and "Mark As Todo". - In the Barcode app, go to that operation and notice that the "Add Quantity" button shows "+1" instead of "+0.5". ## Solution: - I modified the `getIncrementQuantity` function to change the minimum qu
Original PR description
## Issue: - For an inventory operation, if a product quantity is less than 1 (eg. 0.5), the "+" button in the Barcode app will display "+1" instead of "+ 0.5". ## Steps To Reproduce: - In Inventory, create a transfer (Receipts) with a product where the quantity is 0.5 and "Mark As Todo". - In the Barcode app, go to that operation and notice that the "Add Quantity" button shows "+1" instead of "+0.5". ## Solution: - I modified the `getIncrementQuantity` function to change the minimum quantity from 1 to 0. This ensures that for product quantities less than 1, the "+" button in the Barcode app will display the correct increment. OPW-3880380 Forward-Port-Of: odoo/enterprise#65081 Forward-Port-Of: odoo/enterprise#62770
When a customer adds an empty internal note and tries to order the product, a traceback will appear. Steps to reproduce the error: - Open PoS restaurant session - Add any product > Order - Add same product again > Add an empty internal note - Order Traceback: ``` KeyError: (3, 'pou', '[]') File "odoo/http.py", line 2248, in __call__ response = request._serve_db() File "odoo/http.py", line 1823, in _serve_db return self._transactioning(_serve_ir_http, readonly=ro)
Original PR description
When a customer adds an empty internal note and tries to order the product, a traceback will appear. Steps to reproduce the error: - Open PoS restaurant session - Add any product > Order - Add same…
When a customer adds an empty internal note and tries to order the product,
a traceback will appear.
Steps to reproduce the error:
- Open PoS restaurant session
- Add any product > Order
- Add same product again > Add an empty internal note
- Order
Traceback:
```
KeyError: (3, 'pou', '[]')
File "odoo/http.py", line 2248, in __call__
response = request._serve_db()
File "odoo/http.py", line 1823, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1843, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1821, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1828, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2053, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.2/pos_restaurant_preparation_display/models/preparation_display_order.py", line 33, in process_order
res = super().process_order(order_id, cancelled, note_history)
File "home/odoo/src/enterprise/saas-17.2/pos_preparation_display/models/preparation_display_order.py", line 28, in process_order
data = order._process_preparation_changes(cancelled, note_history)
File "home/odoo/src/enterprise/saas-17.2/pos_preparation_display/models/pos_order.py", line 95, in _process_preparation_changes
quantity_data[key_new]["display"] += old_quantity["display"]
```
https://github.com/odoo/enterprise/blob/4077a5e39fba7197d32d5db05171ad9c8f98c392/pos_preparation_display/models/pos_order.py#L95
Here when customer adds an empty internal note, ```quantity_data``` will become empty,
So, it will lead to the above traceback.
sentry-5494183916
Forward-Port-Of: odoo/enterprise#67717
Forward-Port-Of: odoo/enterprise#66145We notice that get_today_call_activities is a very frequent call that spend a lot of time runing sql queries. during 1h30 it was called 20515 times for an average of 719ms of sql times on odoo.com database. It was cause by _format_call_activities which can be called with many hundreds of activities before this commit for each activity _mail_get_partners and mail_partner_format were called once per activity. It take 581s for all the internal user of odoo.com database after this comm
Original PR description
We notice that get_today_call_activities is a very frequent call that spend a lot of time runing sql queries. during 1h30 it was called 20515 times for an average of 719ms of sql times on odoo.com database. It was cause by _format_call_activities which can be called with many hundreds of activities before this commit for each activity _mail_get_partners and mail_partner_format were called once per activity. It take 581s for all the internal user of odoo.com database after this commit the method _mail_get_partners and mail_partner_format are called for an entire batch as it's intended. The same computation for internal user takes now 84s Forward-Port-Of: odoo/enterprise#67539 Forward-Port-Of: odoo/enterprise#67289
When a sales order has it's tax calculated externally (e.g avatax), but a preceding_subtotal is present on a selected product tax group (case of internal tax computation). The frontend will raise an error when trying to display the tax_totals. Steps to reproduce: 1. Go to general setting > enable avatax > save. 2. Go to accounting > configuration > tax groups > set preceding subtotal column (hidden) of a chosen tax groups. 3. Go to sales > New 4. In the quotation form > select a product a
Original PR description
When a sales order has it's tax calculated externally (e.g avatax), but a preceding_subtotal is present on a selected product tax group (case of internal tax computation). The frontend will raise an…
When a sales order has it's tax calculated externally (e.g avatax), but a preceding_subtotal is present on a selected product tax group (case of internal tax computation). The frontend will raise an error when trying to display the tax_totals.
Steps to reproduce:
1. Go to general setting > enable avatax > save.
2. Go to accounting > configuration > tax groups > set preceding subtotal column (hidden) of a chosen tax groups.
3. Go to sales > New
4. In the quotation form > select a product and set its tax to the previously chosen tax groups.
5. In the Other Info tab of the form > set fiscal position as avatax.
6. Finish the quotation creation > save.
7. You can open it in the order lines tab and see the error being raised.
cause:
As the taxes are calculated externally (i.e avatax). sale_external_tax module "will create a single tax group" (cf _compute_tax_totals doc). But the subtotals_order is not overwritten. In the fronted side, the TaxTotalsComponent will try to display each subtotal values, with preceding_subtotal label as keys stored in subtotals_order, but only one tax groups is present with a default subtotal label ('Untaxed Amount'). Resulting to reads in groups_by_subtotal dict with None result thus raising "Uncaught Promise > Invalid loop expression: "undefined" is not iterable".
solution:
Overwrite subtotals_order with a single default value 'Untaxed Amount'
opw-4009957
Forward-Port-Of: odoo/enterprise#66821## Issue Shop Floor can show performance issues even with the default limit of 40. This is mostly due to the `operation_note` fetched for the work orders. Moreover, as it's a HTML field, it has to be sanitized by the ORM - which is slow considering users tend to put base64 encoded images in it. ## Analysis It is not necessary to fetch the `operation_note` for all displayed work orders as it's only shown when an user will click on the *Worksheet* button or a *Quality Check* button. ## S
Original PR description
## Issue Shop Floor can show performance issues even with the default limit of 40. This is mostly due to the `operation_note` fetched for the work orders. Moreover, as it's a HTML field, it has to be…
## Issue Shop Floor can show performance issues even with the default limit of 40. This is mostly due to the `operation_note` fetched for the work orders. Moreover, as it's a HTML field, it has to be sanitized by the ORM - which is slow considering users tend to put base64 encoded images in it. ## Analysis It is not necessary to fetch the `operation_note` for all displayed work orders as it's only shown when an user will click on the *Worksheet* button or a *Quality Check* button. ## Solution In case there is no PDF or Slide, the *Worksheet* button is only displayed when there's an `operation_note`. Therefore, we introduce a `has_operation_note` field to keep that behavior (refer to the Community commit). When a user clicks on a *Worksheet*/*Quality Check* button, we fetch the `operation_note` from the backend and cache it so we don't need to send another request later on. ## Benchmarks Benchmarks are done calling `web_search_read` on a database containing base64 images. | Displayed MO | Before | After | Speed up | |-------------|---------|--------| --------| | 40 | 8.19 s | 400 ms | ~95% | 100 | 23.9 s / MemoryError | 900 ms | ~96% ## References opw-3983324 -- I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr) Forward-Port-Of: odoo/enterprise#67602 Forward-Port-Of: odoo/enterprise#66176
before commit: while going to edit the report(Shipping Labels and Shipping Documents) this traceback is raised.For preventing from the error adding in rename_black_list to prevent from editing and not showing in editor [these two reports ]( https://github.com/odoo/enterprise/blob/17.0/delivery_iot/report/delivery_carrier_reports.xml#L5-L6) ``` Traceback (most recent call last): File "/data/build/odoo/odoo/http.py", line 1770, in _serve_db return service_model.retrying(self._serve_ir
Original PR description
before commit: while going to edit the report(Shipping Labels and Shipping Documents) this traceback is raised.For preventing from the error adding in rename_black_list to prevent from editing and…
before commit:
while going to edit the report(Shipping Labels and Shipping Documents) this traceback is raised.For preventing from the error adding in rename_black_list to prevent from editing and not showing in editor [these two reports ]( https://github.com/odoo/enterprise/blob/17.0/delivery_iot/report/delivery_carrier_reports.xml#L5-L6)
```
Traceback (most recent call last):
File "/data/build/odoo/odoo/http.py", line 1770, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/data/build/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/data/build/odoo/odoo/http.py", line 1797, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/data/build/odoo/odoo/http.py", line 2001, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/data/build/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/data/build/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/data/build/odoo/odoo/http.py", line 725, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/data/build/enterprise/web_studio/controllers/report.py", line 474, in load_report_editor
report_qweb = self._get_report_qweb(report)
File "/data/build/enterprise/web_studio/controllers/report.py", line 612, in _get_report_qweb
main_qweb.xpath("//*[@id='wrapwrap']")[0]
IndexError: list index out of range
```
Forward-Port-Of: odoo/enterprise#62515Before the **PR**: Salvage value of asset was not being computed correctly. After the **PR**: Salvage value is now being computed correctly. **task**-4075459 Forward-Port-Of: odoo/enterprise#67524
Original PR description
Before the **PR**: Salvage value of asset was not being computed correctly. After the **PR**: Salvage value is now being computed correctly. **task**-4075459 Forward-Port-Of: odoo/enterprise#67524
This PR adds a wizard in the POS to select a `l10n_pe_edi_refund_reason` when refunding an invoice/boleta (e.g. "Anulación de la operación", "Anulación de la operación"...). NB: according to PO feedback, it is not possible to refund several invoices/boletas at once (but it is possible to refund one invoice/boleta with multiple credit notes). task-3801234 https://github.com/odoo/odoo/pull/169597 Forward-Port-Of: odoo/enterprise#67568 Forward-Port-Of: odoo/enterprise#64761
Original PR description
This PR adds a wizard in the POS to select a `l10n_pe_edi_refund_reason` when refunding an invoice/boleta (e.g. "Anulación de la operación", "Anulación de la operación"...). NB: according to PO feedback, it is not possible to refund several invoices/boletas at once (but it is possible to refund one invoice/boleta with multiple credit notes). task-3801234 https://github.com/odoo/odoo/pull/169597 Forward-Port-Of: odoo/enterprise#67568 Forward-Port-Of: odoo/enterprise#64761