Monday, October 21, 2024
18 changes · 17.0
Resolved issues and error corrections
This fixes an internal issue where attachment-related processing did not pass along all required details to the next step. It helps ensure features that depend on attachments, including accounting, discussions, and storage integrations, behave consistently.
Original PR description
Follow up of https://github.com/odoo/odoo/pull/171393 The method should forward all kwargs to the super call. Issue manifesting in particular in 18.0 when attempting to fix cloud storage at https://github.com/odoo/odoo/pull/184331
Mass mailing now creates outgoing emails in smaller groups, reducing the chance of slowdowns or resource spikes during scheduled campaigns. This aligns the mailing wizard with the intended batch size already used elsewhere, improving reliability without changing user workflows.
Original PR description
## Description Following cef5ae8a80988c4e0529c1770b1c1e573490f6e7, the default `batch_size` for generating the mails was changed from `500`->`50`. But one instance seems to have been missed, during the generation of mails in the wizard, which is used by the mass-mailing cron. To address this, we are just changing `self.batch_size` in the wizard from `500`->`50` (the variable may have been overridden in custom code, so we keep the static variable) Backport of ac51f29f91e34cf4794164658a8c27d8b7759230 ## Reference opw-4142511 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Point of Sale sessions no longer create an unused sequence each time they are opened. This keeps configuration data cleaner and avoids unnecessary clutter in sequence settings without changing daily PoS operations.
Original PR description
When starting a PoS session a useless sequence was created every time Steps to reproduce: ------------------- * Open a PoS session on different days > Observation: Go to the sequence list in the settings, there is one sequence for each days you opened a session Why the fix: ------------ The sequence was actually not used so we just remove it. opw-4166554 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The website editor now delays loading embedded video content in the snippet menu until a user starts dragging that snippet onto a page. This avoids unnecessary external YouTube requests during editing and helps keep automated testing stable after recent browser changes.
Original PR description
Steps to reproduce the issue: - In website edit mode. - Inspect the HTML code of the "Video" snippet in the snippet menu. - The YouTube iframe is loaded even though the "Video" snippet has not been dropped into the page. We need to fix this in stable because a recent update of Chrome [1] is now triggering an error during several tests in edit mode on runbot. This error is due to the fact that we are contacting the YouTube API during the tests, which cannot be done when a test is being executed on runbot. Note that this fix is no longer necessary starting from version saas-17.4 because, from this version, the HTML code of the snippets are no longer in the snippet menu. After this commit, snippets containing an iframe will have their iframe loaded only when the drag-and-drop starts. [1]: https://developer.chrome.com/release-notes/125#the_compute_pressure_api runbot-102187
Refreshing EU OSS tax mappings no longer crashes when more than one company is selected. This helps accounting teams manage multi-company tax settings without encountering an error screen.
Original PR description
When the user selects multiple companies and clicks on Refresh tax mapping, a traceback will appear. Steps to reproduce the error: - Install ``l10n_eu_oss`` module - Select multiple companies - Go to…
When the user selects multiple companies and clicks on Refresh tax mapping,
a traceback will appear.
Steps to reproduce the error:
- Install ``l10n_eu_oss`` module
- Select multiple companies
- Go to Invoicing > Configuration > Settings > Taxes >
EU Intra-community Distance Selling > Click on Refresh tax mapping
Traceback:
```
ValueError: Expected singleton: res.company(1, 2)
File "odoo/http.py", line 2364, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 330, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 728, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 40, in call_button
action = call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/l10n_eu_oss/models/res_config_settings.py", line 13, in refresh_eu_tax_mapping
self.env.companies._map_eu_taxes()
File "addons/l10n_eu_oss/models/res_company.py", line 34, in _map_eu_taxes
invoice_repartition_lines, refund_repartition_lines = company._get_repartition_lines_oss()
File "addons/l10n_eu_oss/models/res_company.py", line 105, in _get_repartition_lines_oss
self.ensure_one()
File "odoo/models.py", line 6213, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
https://github.com/odoo/odoo/blob/bbcef64e3296efa2b985e8d08dfe0573dc62dbb4/addons/l10n_eu_oss/models/res_company.py#L32
Here, ``self`` is used instead of ``company``, When self has multiple companies,
It will lead to the above traceback.
sentry-6002997139
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe IoT box image version has been updated from 24.08 to 24.10 to match its actual October release timing. This helps customers and support teams identify the correct software image version and avoids confusion from the earlier August-based label.
Original PR description
New image development was started in August but now being released in October, so bump version from 24.08 -> 24.10. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an editing issue where pressing delete before a protected content block could leave the block behind if there was whitespace in between. Users editing website or rich text content now get the expected cleanup behavior, reducing confusing leftovers in the editor.
Original PR description
**Current behavior before PR:** When an elements next sibling is a whitespace node, followed by a `contentEditable=false` element, performing the deleteforward action did not remove the `contentEditable=false` element. **Desired behavior after PR is merged:** When an elements next sibling is a whitespace node, followed by a `contentEditable=false` element, performing the deleteforward action will now remove both the whitespace and the entire `contentEditable=false` element. task:4058770
My Timesheets now uses the employee's contract work schedule first when calculating expected hours, matching the behavior seen by administrators. This removes inconsistent timesheet comparisons when an employee form and contract have different working hours.
Original PR description
Steps to reproduce: - Employees app > Marc Demo > Work information tab - Change Marc Demo's 'Working hours' to be different from his contract - As Admin > Timesheets app > All timesheets - Hours are compared to contract schedule - As Marc Demo > My Timesheets - Hours are compared to employee form schedule When the work schedule is ambiguous, the contract is supposed to precede the employee form in the computation of working hours. 'My Timesheets' does not respect this rule, creating an inconsistency. opw-4214221
A test in the Planning module was failing when run on weekends or non-working days. This fix ensures the test runs consistently by simulating a working day environment, improving the reliability of automated testing.
Original PR description
Recently, this commit is merged: https://github.com/odoo/enterprise/pull/63002/commits/32776c6eb7ce1dafca2f8f4d0f825c19da641b71 the test case is failing in the weekends or non-working days, so I have used freeze_time to run it as if it were a working day. Forward-Port-Of: odoo/enterprise#72343
Miscellaneous changes
Versions -------- - 16.0+ Steps ----- 1. Create a zero-priced product template; 2. add some attribute values; 3. configure price extras for the attributes; 4. configure eCommerce to prevent sale of zero-priced products; 5. go to eCommerce products page. Issue ----- Product is displayed as "Not Available For Sale," even though you can click on it, select a price-extra attribute, add it to cart, and purchase it. Cause ----- The template doesn't consider potential `price_extra`
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Create a zero-priced product template; 2. add some attribute values; 3. configure price extras for the attributes; 4. configure eCommerce to prevent sale of zero-priced products; 5. go to eCommerce products page. Issue ----- Product is displayed as "Not Available For Sale," even though you can click on it, select a price-extra attribute, add it to cart, and purchase it. Cause ----- The template doesn't consider potential `price_extra` attributes when displaying the not available message. Solution -------- Add a `t-elif` element to the template, checking if the product has any non-zero price-extra attribute values, if so, don't display the not available message, but also don't display the zero price. opw-4225183 Forward-Port-Of: odoo/odoo#184052
As the portal user, change your profile picture to a svg image, then show it via the normal /web/image URL. The downloaded picture lacks a valid content-type header. Related stored attachment fields were served via the method `Stream.from_binary_field` instead of `Stream.from_attachment`, only the latter is capable of copying the attachment mimetype on the stream. --- Also gave a shot at making the `odoo-bin --test-tags webserver:TestHttpStaticWebServer` test green again. Forward-Port-
Original PR description
As the portal user, change your profile picture to a svg image, then show it via the normal /web/image URL. The downloaded picture lacks a valid content-type header. Related stored attachment fields were served via the method `Stream.from_binary_field` instead of `Stream.from_attachment`, only the latter is capable of copying the attachment mimetype on the stream. --- Also gave a shot at making the `odoo-bin --test-tags webserver:TestHttpStaticWebServer` test green again. Forward-Port-Of: odoo/odoo#177105
Just add a missing space in the French translation. Forward-Port-Of: odoo/odoo#184041
Original PR description
Just add a missing space in the French translation. Forward-Port-Of: odoo/odoo#184041
Issue: ====== clipboard data has ufeff characters in it. Steps to reproduce the issue: ============================= - Create a new note/todo - Add a link - Copy it - Visualise the data copied - It contains ufeff characters of the link Solution: ========= We remove the characters fron the text and html we put in the clipboard data. opw-4029722 Forward-Port-Of: odoo/odoo#182596
Original PR description
Issue: ====== clipboard data has ufeff characters in it. Steps to reproduce the issue: ============================= - Create a new note/todo - Add a link - Copy it - Visualise the data copied - It contains ufeff characters of the link Solution: ========= We remove the characters fron the text and html we put in the clipboard data. opw-4029722 Forward-Port-Of: odoo/odoo#182596
With this commit, the tour test_01_ui is fixed for differents tests triggers: community version and no demo data. 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 Forward-Port-Of: odoo/odoo#183503
Original PR description
With this commit, the tour test_01_ui is fixed for differents tests triggers: community version and no demo data. 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 Forward-Port-Of: odoo/odoo#183503
**Steps to reproduce:** - Install Accounting and l10n_it_edi - Switch to an Italian company (e.g. IT Company) - Create an invoice: * Customer: [an Italian customer] * Product: [any] * Taxes: [a split payment tax] (e.g. 22% SP) - Confirm the invoice - Process to E-invoicing service - Check the XML of the electronic invoice => <ImportoTotaleDocumento> node is including the tax amount - Create a credit note (Full refund) - Confirm the credit note - Process to E-invoicing service
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_it_edi - Switch to an Italian company (e.g. IT Company) - Create an invoice: * Customer: [an Italian customer] * Product: [any] * Taxes: [a split payment tax] (e.g. 22% SP) - Confirm the invoice - Process to E-invoicing service - Check the XML of the electronic invoice => <ImportoTotaleDocumento> node is including the tax amount - Create a credit note (Full refund) - Confirm the credit note - Process to E-invoicing service - Check the XML of the credit note **Issue:** <ImportoTotaleDocumento> node is not including the tax amount. Task [link](https://www.odoo.com/odoo/project/967/tasks/4161435) opw-4161435 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183774
Problem: When a user is on a branch, they are unable to view the parent company's discounts and are unable to apply it to the sales orders. Purpose: The branch should have access to the discounts & loyalty programs from the parent company. Steps to Reproduce on Runbot: 1. Install sale_loyalty 2. Create a branch 3. On the branch company, observe that no discounts & loyalty programs from the parennt company are displayed 4. Attempt to apply a coupon code from a discount belonging to the
Original PR description
Problem: When a user is on a branch, they are unable to view the parent company's discounts and are unable to apply it to the sales orders. Purpose: The branch should have access to the discounts & loyalty programs from the parent company. Steps to Reproduce on Runbot: 1. Install sale_loyalty 2. Create a branch 3. On the branch company, observe that no discounts & loyalty programs from the parennt company are displayed 4. Attempt to apply a coupon code from a discount belonging to the parent company on a sales order and receive a ValidationError opw-4079487 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#178135
Issue: ====== Empty inline code block isn't working as expected and produces issues in the following flows: First Flow: - Create a note - Add ` 2 times - Delete forward 2 times - The button send message is modified!! Second Flow: - Log a note in the chatter of the note - Open composer - Add ` 2 times - Delete forwart 2 times - Traceback Origin of the issue: ===================== After adding the {backtick} 2 times, it will have the following html `<p>{backtick}[]<code cla
Original PR description
Issue: ====== Empty inline code block isn't working as expected and produces issues in the following flows: First Flow: - Create a note - Add ` 2 times - Delete forward 2 times - The button send…
Issue:
======
Empty inline code block isn't working as expected and produces issues in
the following flows:
First Flow:
- Create a note
- Add ` 2 times
- Delete forward 2 times
- The button send message is modified!!
Second Flow:
- Log a note in the chatter of the note
- Open composer
- Add ` 2 times
- Delete forwart 2 times
- Traceback
Origin of the issue:
=====================
After adding the {backtick} 2 times, it will have the following html
`<p>{backtick}[]<code class="o_inline_code">{backtick}</code></p>` which
is not the expected behavior. now after delete forward we will have the
following html
`<p>{backtick}[]<code class="o_inline_code" data-oe-zws-empty-inline></code></p>`
now we delete forward again it will delete the inline block which
validate the following condition [1] which forces a deleteForward in the
parent element at offset one which is basically here
`<p>{backtick}[]<p>` which now will reach this part of code [2] and the
`findNode` will return a node outside the editable because we didn't
specify the `root` element as a stopping condition.
Solution:
=========
- First we fix the spec of the inline code block which should do nothing
in case there is no content inside it.
- We add the root as stopping condition while generating the path.
[1]: https://github.com/odoo/odoo/blob/16.0/addons/web_editor/static/src/js/editor/odoo-editor/src/commands/deleteForward.js#L125-L143
[2]: https://github.com/odoo/odoo/blob/d0828eecf60f7c8622d6875b8651eb663bc7d695/addons/web_editor/static/src/js/editor/odoo-editor/src/commands/deleteForward.js#L214-L241
opw-4254182
Forward-Port-Of: odoo/odoo#183567Just a few improvements in the French translation of the FEC module.
Original PR description
Just a few improvements in the French translation of the FEC module.