Daily updates from Odoo
Tuesday, December 31, 2024
15 changes · 18.0
Resolved issues and error corrections
This fix prevents an error when creating a manufacturing order component if the unit of measure is removed and the quantity is changed. Users can now adjust the quantity without the screen crashing, improving reliability during manufacturing order entry.
Original PR description
Currently, a traceback is occurring when the user removes the `uom` and tries to change the `product_uom_qty` in the stock move. While creating the Manufacturing Order. To reproduce this issue: 1) Install MRP and enable UOM from the configuration 2) Create a new mrp order and add a product in components 3) Remove the UOM and change the `To Consume` value Error:- ``` AssertionError: precision_rounding must be positive, got 0.0 ``` This traceback occurs because when the user changes the `product_uom_qty`, an onchange method `_onchange_product_uom_qty` will triggered. In that method, `float_round` is used with precision_rounding getting from `product_uom.rounding`. It leads to the above traceback as `product_uom` has an empty recordset. sentry-6170644216
When creating a recruitment application, key contact fields such as email, phone number, and LinkedIn profile now appear immediately. This makes it easier for recruiters to enter applicant details without first assigning a candidate.
Original PR description
Steps to Reproduce: • Install the Recruitment app. • Open any Job Position. • Click New to create a new application, The Email, Phone Number, and LinkedIn Profile fields are not visible until a candidate is assigned. Cause: The fields were set to be conditionally invisible based on candidate assignment. Fix: Removed the visibility conditions to ensure these fields are always visible. task-4385022 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
POS receipts for GCC countries now show the cashier name only once instead of repeating the "Served by" text. This improves receipt clarity for customers and staff while leaving receipts in other countries unchanged.
Original PR description
Description of the issue/feature this PR addresses: In GCC countries, the POS receipt displays duplicate "Served by" text due to inconsistent handling of the cashier field in the getReceiptHeaderData method. Current behavior before PR: 1. The "Served by" text is duplicated on POS receipts for GCC countries. 2. The issue arises from both the base implementation and the l10n_gcc_pos module adding the "Served by" prefix. Desired behavior after PR is merged: 1. The POS receipt correctly displays the cashier's name without duplication. 2. For GCC countries, the "Served by" prefix is removed, and only the cashier's name is displayed. 3. Non-GCC countries remain unaffected. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where the live chat bot could fail to restart on embedded external websites after a visitor was redirected. The bot now starts as soon as the active live chat conversation is available, improving continuity for visitors and support teams.
Original PR description
Previously, the chat bot would fail to restart on external websites after a redirection. The issue occurs because the chat bot service waits for the mail store to be ready before verifying if the current live chat thread is linked to a chat bot. However, since [1], the thread is only assigned after the ready event. While the website app assigns the visitor thread earlier, embedded websites do not, causing the chat bot service to incorrectly assume that no bot is linked to the live chat thread and fail to start. This PR resolves the issue by leveraging modelization. The chat bot now starts when the current live chat thread is inserted. [1]: https://github.com/odoo/odoo/pull/173197 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-pr
Imported websites can once again accept new content blocks through drag and drop. This restores expected editing behavior, so users can continue building pages after an import without workarounds.
Original PR description
After importing a website, it was not possible to drag and drop new blocks. You could still edit them but not add new ones. Fixed it by changing the way the snippets are added into the view.
Several automated walkthroughs were made more precise and reliable across sales, e-signature, helpdesk forum, and subscription flows. This helps reduce false test failures and supports smoother validation of important customer-facing processes.
Original PR description
In this commit, we fix 4 tours by being more precise on the triggers and/or adding intermediate steps to ensure the proper conduct of the tour. We take advantage of this commit to linter the tour files.
Code cleanup and technical improvements
Automated website tours now wait a shorter time before checking whether a page element is ready. This should make related automated checks run a bit faster without changing customer-facing features.
Original PR description
In macro.js, we check at each mutation of the DOM if the trigger is
present as soon as there has been no more mutation in the {checkDelay}
milliseconds. By default, this {checkDelay} is at 300ms in the
tourAutomatic class. In this commit, this default value is descreased
to 200ms for performance reasons.Miscellaneous changes
Issue: ====== We can't insert a link with `/url` in mass mailing Steps to reproduce the issue: ============================= - Install website and email marketing - Create a new mass mailing - Add a button using `/button` - Add a label - Write `/` in url and choose any option make sure to click on it using the mouse - Save - The link isn't inserted Origin of the issue: ==================== When we click to select an item, the event `mousedown` is triggered on the document which
Original PR description
Issue: ====== We can't insert a link with `/url` in mass mailing Steps to reproduce the issue: ============================= - Install website and email marketing - Create a new mass mailing - Add a button using `/button` - Add a label - Write `/` in url and choose any option make sure to click on it using the mouse - Save - The link isn't inserted Origin of the issue: ==================== When we click to select an item, the event `mousedown` is triggered on the document which will force a wysiwyg blur. So the selection is no more in the editable and we can't insert the link. Solution: ========= To avoid the blur, we add the selector of the autocomplete to the selectors that delay the blur. opw-4283325 Forward-Port-Of: odoo/odoo#192041 Forward-Port-Of: odoo/odoo#186638
The context variable is missing in current thread when using the shell command. see d19478eb03d2 Description of the issue this PR addresses: Use the `odoo shell -d dbname` command ``` Current behavior before PR: Traceback (most recent call last): File "/home/bfontaine/Bureau/odoo/17.0/odoo/modules/registry.py", line 87, in __new__ return cls.registries[db_name] ~~~~~~~~~~~~~~^^^^^^^^^ File "/home/bfontaine/Bureau/local/venv17/lib/python3.11/site-packages/decor
Original PR description
The context variable is missing in current thread when using the shell command. see d19478eb03d2 Description of the issue this PR addresses: Use the `odoo shell -d dbname` command ``` Current…
The context variable is missing in current thread when using the shell command.
see d19478eb03d2
Description of the issue this PR addresses:
Use the `odoo shell -d dbname` command
```
Current behavior before PR:
Traceback (most recent call last):
File "/home/bfontaine/Bureau/odoo/17.0/odoo/modules/registry.py", line 87, in __new__
return cls.registries[db_name]
~~~~~~~~~~~~~~^^^^^^^^^
File "/home/bfontaine/Bureau/local/venv17/lib/python3.11/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
~~~~~~^^^^^
KeyError: 'db_test'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bfontaine/Bureau/odoo/17.0/odoo/modules/registry.py", line 110, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/bfontaine/Bureau/odoo17/addons/phyto_base/loader.py", line 13, in load_modules
report = odoo.registry()._assertion_report
^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/__init__.py", line 105, in registry
database_name = threading.current_thread().dbname
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_MainThread' object has no attribute 'dbname'
Traceback (most recent call last):
File "/home/bfontaine/Bureau/odoo/17.0/odoo/modules/registry.py", line 87, in __new__
return cls.registries[db_name]
~~~~~~~~~~~~~~^^^^^^^^^
File "/home/bfontaine/Bureau/local/venv17/lib/python3.11/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
~~~~~~^^^^^
KeyError: 'db_test'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bfontaine/.local/bin/odoo17", line 246, in <module>
main()
File "/home/bfontaine/.local/bin/odoo17", line 242, in main
run()
File "/home/bfontaine/.local/bin/odoo17", line 233, in run
odoo.cli.main()
File "/home/bfontaine/Bureau/odoo/17.0/odoo/cli/command.py", line 66, in main
o.run(args)
File "/home/bfontaine/Bureau/odoo/17.0/odoo/cli/shell.py", line 123, in run
self.shell(config['db_name'])
File "/home/bfontaine/Bureau/odoo/17.0/odoo/cli/shell.py", line 109, in shell
registry = odoo.registry(dbname)
^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/__init__.py", line 106, in registry
return modules.registry.Registry(database_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/modules/registry.py", line 89, in __new__
return cls.new(db_name)
^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/local/venv17/lib/python3.11/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/modules/registry.py", line 110, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/bfontaine/Bureau/odoo17/addons/phyto_base/loader.py", line 13, in load_modules
report = odoo.registry()._assertion_report
^^^^^^^^^^^^^^^
File "/home/bfontaine/Bureau/odoo/17.0/odoo/__init__.py", line 105, in registry
database_name = threading.current_thread().dbname
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_MainThread' object has no attribute 'dbname'. Did you mean: '_name'?
```
Desired behavior after PR is merged:
shell command works
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#192038**Behavior before PR:** In web_studio video command is not allowed in report. However, user can still upload video from media dialog using video tab. **Behavior after PR is merged:** This commit aims to remove videos tab from media dialog if video command is disabled. task-4285231 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187251
Original PR description
**Behavior before PR:** In web_studio video command is not allowed in report. However, user can still upload video from media dialog using video tab. **Behavior after PR is merged:** This commit aims to remove videos tab from media dialog if video command is disabled. task-4285231 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187251
Issue: In the task action view of the sale order, the task ID is passed in the action domain, which results in showing only old tasks. Newly created tasks are not visible because their IDs are not included in the domain. Solution: Instead of passing task ids, we now check for project_id, sale_order_id, or sale_line_id to ensure the new tasks are properly displayed. Steps to Reproduce: - Install the sale_project module. - Create a Sale Order (SO). - Add a product con
Original PR description
Issue: In the task action view of the sale order, the task ID is passed in the action domain, which results in showing only old tasks. Newly created tasks are not visible because their IDs are not included in the domain. Solution: Instead of passing task ids, we now check for project_id, sale_order_id, or sale_line_id to ensure the new tasks are properly displayed. Steps to Reproduce: - Install the sale_project module. - Create a Sale Order (SO). - Add a product configured to create a project with tasks. - Click on the "Tasks" smart button from the SO. - Go to the Kanban view. - Create a new task and give a name. - Reload the page. - Check if the task is visible (the issue was that new tasks were not visible). Affected PR: https://github.com/odoo/odoo/pull/135771/files task-4224564 Forward-Port-Of: odoo/odoo#191695 Forward-Port-Of: odoo/odoo#184879
**Problem**: In saas-17.2, the new URL structure no longer includes `menu_id`, which was previously used to set the current menu upon page refresh: https://github.com/odoo/odoo/blob/1443e5503c7396512a078f9f52fd4cb31b62e202/addons/web/static/src/webclient/webclient.js#L76 This change causes issues for actions like `action_orderpoint_replenish`, which are not directly tied to any `ir.ui.menu` and lack a `menu_id` in the URL: https://github.com/odoo/odoo/blob/535a02565f9e9142f0ef1fe9f44d1935f
Original PR description
**Problem**: In saas-17.2, the new URL structure no longer includes `menu_id`, which was previously used to set the current menu upon page refresh: https://github.com/odoo/odoo/blob/1443e5503c7396512a078f9f52fd4cb31b62e202/addons/web/static/src/webclient/webclient.js#L76 This change causes issues for actions like `action_orderpoint_replenish`, which are not directly tied to any `ir.ui.menu` and lack a `menu_id` in the URL: https://github.com/odoo/odoo/blob/535a02565f9e9142f0ef1fe9f44d1935f7b42075/addons/web/static/src/webclient/webclient.js#L59-L65 As a result, the menuId becomes `undefined`, leading to the top menu not being loaded properly. **Solution**: Add a path to action to ensure that it is properly reloaded. **Steps to reproduce**: 1. Navigate to *Inventory > Replenishment*. 2. Refresh the page. 3. Observe that the top menu disappears. opw-4350871 Forward-Port-Of: odoo/odoo#189402
### Issue: Certain carrier's API processes validity checks and parcels generation one picking at a time so that on our end we are forced to send requests one at a time at the end of the the `_action_done`: https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/stock/models/stock_picking.py#L918 https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/delivery/models/stock_picking.py#L192-L196 However, since a UserError of any of the picking
Original PR description
### Issue: Certain carrier's API processes validity checks and parcels generation one picking at a time so that on our end we are forced to send requests one at a time at the end of the the…
### Issue: Certain carrier's API processes validity checks and parcels generation one picking at a time so that on our end we are forced to send requests one at a time at the end of the the `_action_done`: https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/stock/models/stock_picking.py#L918 https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/delivery/models/stock_picking.py#L192-L196 However, since a UserError of any of the picking will cause a rollback of the entire batch on Odoo's side, pikcings might end up being processed on the carrier side but non validated on Odoo's side during batch validation. ### Steps to reproduce: - Configure sendcloud shipping method + website + payment providers - In your sendcloud configuration select sendcloud shipping product to not be able to handle products with a weight exceeding 10 kg e.g; bpost @home (0-10kg). - Create 2 storable products with respective weigth 1 and 100 kg. - Publish them on the website for sale. - Open a private window, make an order via the website for the 1kg product by filling your cart and use sendcloud as carrier. - Repeat the operation with the other product to generate a seconde SO. - Back to your main window > Inventory Overview > Delivery Orders - Select both deliveries > Action > Validate (in batch) #### > While the first delivery order was processed on carrier side (can be checked on sendcloud's website) #### > the UserError of the second DO rollbacked its validation in Odoo. ### Fix: As such, and since the carrier requests needs to happen after we have validated the pickings in Odoo, we should avoid any rollback of the transaction once any requests has already been successfully treated on the carrier side. ### Note: It is not possible restructure the code to use `senf.env.cr.savepoint` in a loop in order to reset the validation of pickings that are not valid on the carrier side because savepoints can't be used more than 64 times before the server crashes and hence can't be used in record loops. enterprise: https://github.com/odoo/enterprise/pull/75502 opw-4357325 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191882 Forward-Port-Of: odoo/odoo#190320
### Issue: Certain carrier's API processes validity checks and parcels generation one picking at a time so that on our end we are forced to send requests one at a time at the end of the the `_action_done`: https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/stock/models/stock_picking.py#L918 https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/delivery/models/stock_picking.py#L192-L196 However, since a UserError of any of the picking
Original PR description
### Issue: Certain carrier's API processes validity checks and parcels generation one picking at a time so that on our end we are forced to send requests one at a time at the end of the the…
### Issue: Certain carrier's API processes validity checks and parcels generation one picking at a time so that on our end we are forced to send requests one at a time at the end of the the `_action_done`: https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/stock/models/stock_picking.py#L918 https://github.com/odoo/odoo/blob/e4f68fc6eb2a666a07b6627b9dc0ec575b79d1e3/addons/delivery/models/stock_picking.py#L192-L196 However, since a UserError of any of the picking will cause a rollback of the entire batch on Odoo's side, pikcings might end up being processed on the carrier side but non validated on Odoo's side during batch validation. ### Steps to reproduce: - Configure sendcloud shipping method + website + payment providers - In your sendcloud configuration select sendcloud shipping product to not be able to handle products with a weight exceeding 10 kg e.g; bpost @home (0-10kg). - Create 2 storable products with respective weigth 1 and 100 kg. - Publish them on the website for sale. - Open a private window, make an order via the website for the 1kg product by filling your cart and use sendcloud as carrier. - Repeat the operation with the other product to generate a seconde SO. - Back to your main window > Inventory Overview > Delivery Orders - Select both deliveries > Action > Validate (in batch) #### > While the first delivery order was processed on carrier side (can be checked on sendcloud's website) #### > the UserError of the second DO rollbacked its validation in Odoo. ### Fix: As such, and since the carrier requests needs to happen after we have validated the pickings in Odoo, we should avoid any rollback of the transaction once any requests has already been successfully treated on the carrier side. ### Note: It is not possible restructure the code to use `senf.env.cr.savepoint` in a loop in order to reset the validation of pickings that are not valid on the carrier side because savepoints can't be used more than 64 times before the server crashes and hence can't be used in record loops. community: https://github.com/odoo/odoo/pull/190320 opw-4357325 Forward-Port-Of: odoo/enterprise#76244 Forward-Port-Of: odoo/enterprise#75502
Issue: After posting content through Social Marketing on Instagram, the generated link redirects to a non-existent post or page. Steps to Reproduce: 1. Install the Social Marketing tool. 3. Set up an Instagram account connection. 3. Create a post and attempt to click on the generated link for redirection to the post on Instagram. Solution: The issue stems from using Instagram's internal post_id, which does not work for direct URL access to the post. To resolve this, we need to requ
Original PR description
Issue: After posting content through Social Marketing on Instagram, the generated link redirects to a non-existent post or page. Steps to Reproduce: 1. Install the Social Marketing tool. 3. Set up an Instagram account connection. 3. Create a post and attempt to click on the generated link for redirection to the post on Instagram. Solution: The issue stems from using Instagram's internal post_id, which does not work for direct URL access to the post. To resolve this, we need to request the permalink associated with the post rather than relying on the internal link. This will ensure accurate redirection. While using the shortcode is an alternative, requesting the permalink directly is a more reliable approach. opw-4243329 Forward-Port-Of: odoo/enterprise#72725