Monday, October 21, 2024
20 changes · saas-17.2
Enhancements to existing features
The email-based two-factor authentication enforcement module is now installed automatically for this version. This prepares systems for stronger login protection, while the actual enforcement setting remains inactive for now.
Original PR description
The module is installed but the config parameter is not activated (yet) Master plan: - saas-17.2 : auth_totp_mail_enforced install by default (#169621) - master: auth_totp_mail_enforced merged into auth_totp_mail + activated by default for everybody (#169608)
Resolved issues and error corrections
This update fixes an error that could occur when opening an employee form view in the HR app. It restores reliable access to HR employee records after a recent change introduced the issue.
Original PR description
Fix an error introcuded by commit 2773ab7ff5855a8345eabaf52a3bb5f8b1b80235
Miscellaneous changes
## Steps to reproduce: 1. Create a quality control point for the operation type Manufacturing 2. Create a manufacturing order and plan it 3. Go to the Shop floor 4. Register the production & do the quality checks 5. The Quality Checks button is still there; clicking again displays a traceback because the quality checks are already done. ## Before this commit: Upon reloading the production, the new data is not propagated to `this.record`. ## After this commit: Change `this.record` wh
Original PR description
## Steps to reproduce: 1. Create a quality control point for the operation type Manufacturing 2. Create a manufacturing order and plan it 3. Go to the Shop floor 4. Register the production & do the quality checks 5. The Quality Checks button is still there; clicking again displays a traceback because the quality checks are already done. ## Before this commit: Upon reloading the production, the new data is not propagated to `this.record`. ## After this commit: Change `this.record` when props are updated so it always contains the correct reference to the record. opw-4176393 Forward-Port-Of: odoo/enterprise#70800
This fix corrects how the HR app checks a user's group permissions when opening employee forms. It helps ensure the right employee form view or action is shown based on user access rights, avoiding errors caused by checking permissions on the wrong record type.
Original PR description
With this commit; the function previously called user_has_group is replaced by the method has_group and need to be called with res.users model not hr.employee model. task-4262917 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
Currently we search for the 'us' chart template but we should search for the 'generic_coa' instead. This commit corrects it. task-None Forward-Port-Of: odoo/enterprise#71908
Original PR description
Currently we search for the 'us' chart template but we should search for the 'generic_coa' instead. This commit corrects it. task-None Forward-Port-Of: odoo/enterprise#71908
Spotted by runbot in master by the `self-in-iter` semgrep check. Forward-Port-Of: odoo/enterprise#72335
Original PR description
Spotted by runbot in master by the `self-in-iter` semgrep check. Forward-Port-Of: odoo/enterprise#72335
The model 349 wasn't working as expected, here are the points that have been changed: - Some keys were missing, in particular the keys R, D, and C. - Changed some wording of the report, such as replacing 'refunds' with 'rectifications'. - The biggest change was changing the way the lines are computed in the report. Before this commit, we used only the domain engine, but now we need to use a custom engine to handle the rectifications part. - Fixed some other bugs, like negative amount
Original PR description
The model 349 wasn't working as expected, here are the points that have been changed: - Some keys were missing, in particular the keys R, D, and C. - Changed some wording of the report, such as replacing 'refunds' with 'rectifications'. - The biggest change was changing the way the lines are computed in the report. Before this commit, we used only the domain engine, but now we need to use a custom engine to handle the rectifications part. - Fixed some other bugs, like negative amounts which are not supposed to appear as the report only deals with positive values, and also ensured the discounts on the move lines are computed correctly. task-3992046 Forward-Port-Of: odoo/enterprise#72271 Forward-Port-Of: odoo/enterprise#65074
…entries Steps to reproduce: - Create a belgian company - Create an analytic distibution model - Create an asset, set the expense account to the account defined in the analytic distribution model - Click on "Compute Depreciation" Observed behavior: The analytic ditribution is not applied to the depreciation entries. Desired behavior: The analytic distribution is applied correctly. task-4241362 Forward-Port-Of: odoo/enterprise#72220
Original PR description
…entries Steps to reproduce: - Create a belgian company - Create an analytic distibution model - Create an asset, set the expense account to the account defined in the analytic distribution model - Click on "Compute Depreciation" Observed behavior: The analytic ditribution is not applied to the depreciation entries. Desired behavior: The analytic distribution is applied correctly. task-4241362 Forward-Port-Of: odoo/enterprise#72220
To reproduce: ============= - log as admin and create a template on sign - give a user with **User : Own templates** authorization to the template - log as the user and try to use layout (from 3 dots in kanban view) -> access error Problem: ======== when duplicating the template we copy the original template, as the user does not have enough rights it leads to an access error Solution: ========= perform the copy as `sudo`, as the template won't be visible for the user if he is not
Original PR description
To reproduce: ============= - log as admin and create a template on sign - give a user with **User : Own templates** authorization to the template - log as the user and try to use layout (from 3 dots in kanban view) -> access error Problem: ======== when duplicating the template we copy the original template, as the user does not have enough rights it leads to an access error Solution: ========= perform the copy as `sudo`, as the template won't be visible for the user if he is not authorized to see it. opw-4166973 Forward-Port-Of: odoo/enterprise#70496
There is a bug with traceback while going to "Accounting / Configuration / Settings" with "Spanish (Latin America)" language selected on user config (install l10n_ar_edi module and take position on company "(AR) Responsable Inscripto"). This pr fixes it. The bug was introduced on this pr https://github.com/odoo/enterprise/pull/71027 . Bug with traceback: UncaughtPromiseError > OwlError Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property) OwlError: An
Original PR description
There is a bug with traceback while going to "Accounting / Configuration / Settings" with "Spanish (Latin America)" language selected on user config (install l10n_ar_edi module and take position on…
There is a bug with traceback while going to "Accounting / Configuration / Settings" with "Spanish (Latin America)" language selected on user config (install l10n_ar_edi module and take position on company "(AR) Responsable Inscripto"). This pr fixes it. The bug was introduced on this pr https://github.com/odoo/enterprise/pull/71027 .
Bug with traceback:
UncaughtPromiseError > OwlError
Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
Error: An error occured in the owl lifecycle (see this Error's "cause" property)
at handleError (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:916:101)
at App.handleError (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:1548:29)
at Fiber._render (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:941:19)
at Fiber.render (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:939:6)
at ComponentNode.initiateRender (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:1007:47)
Caused by: EvalError: Can not parse python expression: (bool(“l10n_ar_afip_ws_crt”))
Error: Invalid expression
EvalError: Can not parse python expression: (bool(“l10n_ar_afip_ws_crt”))
Error: Invalid expression
at evaluateExpr (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:3050:128)
at SettingsFormRenderer.evaluateBooleanExpr (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:3054:8)
at SettingsFormRenderer.slot533 (eval at compile (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:1502:374), <anonymous>:9209:26)
at callSlot (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:1108:25)
at SearchableSetting.template (eval at compile (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:1502:374), <anonymous>:56:13)
at Fiber._render (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:940:96)
at Fiber.render (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:939:6)
at ComponentNode.initiateRender (https://69506271-17-0-all.runbot176.odoo.com/web/assets/fc8bbf7/web.assets_web.min.js:1007:47)
Ticket Adhoc side: 81698
Task latam side: 1279
Forward-Port-Of: odoo/enterprise#72155… partners This enhancement introduces an XLSX export variant for the trial balance, specifically tailored for Colombian companies under the report name "BALANCE DE PRUEBA POR TERCERO." The requirement is to provide a detailed breakdown per partner for each account. The initial trial balance lines are primarily derived from the general ledger report, which originally focused on grouping by accounts. Inspired by the structure of the general ledger accounts, this implementation now extends t
Original PR description
… partners This enhancement introduces an XLSX export variant for the trial balance, specifically tailored for Colombian companies under the report name "BALANCE DE PRUEBA POR TERCERO." The requirement is to provide a detailed breakdown per partner for each account. The initial trial balance lines are primarily derived from the general ledger report, which originally focused on grouping by accounts. Inspired by the structure of the general ledger accounts, this implementation now extends the grouping to include both accounts and partners. While initially designed for the Colombian localization, the code is flexible and can be easily adapted for use in other localizations as needed. Co-authored-by: Brice Bartoletti <bib@odoo.com> task-3594546 Forward-Port-Of: odoo/enterprise#72235 Forward-Port-Of: odoo/enterprise#70110
…ifferent trees Add a field at the end of the "left" subgroup and remove the "right" subgroup. ```xml <form> <group> <group> <field name="display_name" /> [ADD A FIELD] </group> [ REMOVE THIS GROUP <group> </group> ] </group> </form> ``` Before this commit, when "normalizing" the xpaths, the add field operation was aggregated with the remove operation because no unchanged node was found in between. We were left with the inheriting vi
Original PR description
…ifferent trees
Add a field at the end of the "left" subgroup and remove the "right" subgroup.
```xml
<form>
<group>
<group>
<field name="display_name" />
[ADD A FIELD]
</group>
[ REMOVE THIS GROUP
<group>
</group>
]
</group>
</form>
```
Before this commit, when "normalizing" the xpaths, the add field operation was aggregated with the remove operation because no unchanged node was found in between.
We were left with the inheriting view:
```xml
<xpath expr="[..]/group[2]" position="replace">
<field name="added_field" />
</xpath>
```
After this commit, this flow works and the two operations are independent.
part of task-4207793
Forward-Port-Of: odoo/enterprise#71969
Forward-Port-Of: odoo/enterprise#71289For the longest time, the base `ModelConverter` (and `ModelsConverter`) have added a group around their regex. That was (apparently) never useful but Werkzeug didn't care. Except, it turns out, Werkzeug 2.2 specifically, which is the one we require for Python 3.11, because it's the one bundled in Debian Bookworm. In this version and this version only werkzeug gets tripped up by our extra group, and doubles up the parameters. This makes it very hard to see as: - we need a version which u
Original PR description
For the longest time, the base `ModelConverter` (and `ModelsConverter`) have added a group around their regex. That was (apparently) never useful but Werkzeug didn't care. Except, it turns out,…
For the longest time, the base `ModelConverter` (and `ModelsConverter`) have added a group around their regex. That was (apparently) never useful but Werkzeug didn't care.
Except, it turns out, Werkzeug 2.2 specifically, which is the one we require for Python 3.11, because it's the one bundled in Debian Bookworm.
In this version and this version only werkzeug gets tripped up by our extra group, and doubles up the parameters. This makes it very hard to see as:
- we need a version which uses at least two converters, at least one of which is `model` or `models` in non-last position
- we need to realise that the latter converter gets a copy of the former
The first one is relatively common (70 cases in community, of which 48 use multiple `model` or `models`), however the part where it has to be test and noticed is a lot less likely as we don't routinely test this configuration. Unless somebody happens to use 3.11 locally and follow the `requirements.txt` when installing odoo...
Fixes runbot error 73290
Repro case:
- install tox
- create a file `tox.ini` containing:
```ini
[tox]
requires = tox >= 4
env_list = werkzeug{016,10,21,22,23,3}
[testenv]
deps =
pytest
werkzeug016: werkzeug~=0.16.0
werkzeug10: werkzeug~=1.0.0
werkzeug21: werkzeug~=2.1.0
werkzeug22: werkzeug~=2.2.0
werkzeug23: werkzeug~=2.3.0
werkzeug3: werkzeug~=3.0
commands = pytest app.py
```
- create a file `app.py` containing:
```python
import json
import pytest
from werkzeug.wrappers import Response
from werkzeug.test import Client
from werkzeug.routing import Map, Rule, BaseConverter
class ModelConverter(BaseConverter):
regex = r'([0-9]+)'
def to_python(self, value: str) -> int:
return int(value)
class ModelsConverter(BaseConverter):
regex = r'([0-9,]+)'
def to_python(self, value: str) -> list[int]:
return [int(v) for v in value.split(',')]
url_map = Map(
[
Rule("/id/<id:a>"),
Rule("/id/<id:a>/<id:b>"),
Rule("/ids/<ids:as>"),
Rule("/ids/<ids:as>/<id:b>"),
],
strict_slashes=False,
converters={
'id': ModelConverter,
'ids': ModelsConverter,
}
)
def application(environ, start_response):
urls = url_map.bind_to_environ(environ)
endpoint, args = urls.match()
start_response('200 OK', [('Content-Type', 'text/plain')])
return [json.dumps(args)]
@pytest.mark.parametrize('url,res', [
("/id/1", {'a': 1}),
("/id/1/2", {'a': 1, 'b': 2}),
("/ids/1,2,3", {"as": [1, 2, 3]}),
("/ids/1,2,3/4", {"as": [1, 2, 3], "b": 4}),
])
def test_routing(url, res):
c = Client(application, Response)
r = c.get(url)
assert json.loads(r.get_data()) == res
```
- run `tox`
- observe that Werkzeug 2.2 and that version only blows up on cases 2 and 4
Removing the parenthesis inside the regexes fixes the issue.
Forward-Port-Of: odoo/odoo#184277Issue: ====== 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#183567Issue: ====== 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
Versions -------- - 17.0+ Steps ----- 1. Enter debug mode; 2. create an Automation Rule; 3. select Task as model; 4. set trigger to Stage is set to New; 5. set domain to a specific customer; 6. add send email as action; 7. create a task. Issue ----- Email is sent after task creation, regardless of the customer. Cause ----- The triggers added to 0a744accc2aa automatically compute the `filter_domain` value, and hide the field in view. With debug mode enabled, the `filter_pre
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Enter debug mode; 2. create an Automation Rule; 3. select Task as model; 4. set trigger to Stage is set to New; 5. set domain to a specific customer; 6. add…
Versions -------- - 17.0+ Steps ----- 1. Enter debug mode; 2. create an Automation Rule; 3. select Task as model; 4. set trigger to Stage is set to New; 5. set domain to a specific customer; 6. add send email as action; 7. create a task. Issue ----- Email is sent after task creation, regardless of the customer. Cause ----- The triggers added to 0a744accc2aa automatically compute the `filter_domain` value, and hide the field in view. With debug mode enabled, the `filter_pre_domain` field is still visible & editable. The newly added triggers are applied on both create & update, while `filter_pre_domain` is only applied on update. This leads to confusion when clients add a domain which appears to be ignored, as the selected trigger is immediately hit on creation. Solution -------- 1. Specify in the help string that `filter_pre_domain` is ignored on creation. 2. When entering debug mode, also show the `filter_domain` field, allowing users to further modify the domain computed by the selected trigger, and helping to distinguish itself from `filter_pre_domain`. opw-3928082 Forward-Port-Of: odoo/odoo#180209
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
Steps to reproduce the bug: - Create a storable product P1 with the following BoM: - Components: - Component 1 - Component 2 - Kit (which has its own BoM) - BoM of the kit: - Component 3 - Component 4 - Create a Mo for one unit of P1 - Confirm the MO - Update the BoM of P1: - Delete Component 2 - Go back to the MO - Refresh the page - Click "Update from BoM" Problem: Only the move for Component 1 is retained. The moves for Compon
Original PR description
Steps to reproduce the bug: - Create a storable product P1 with the following BoM: - Components: - Component 1 - Component 2 - Kit (which has its own BoM) - BoM of the kit: - Component 3 - Component…
Steps to reproduce the bug:
- Create a storable product P1 with the following BoM:
- Components:
- Component 1
- Component 2
- Kit (which has its own BoM)
- BoM of the kit:
- Component 3
- Component 4
- Create a Mo for one unit of P1
- Confirm the MO
- Update the BoM of P1:
- Delete Component 2
- Go back to the MO
- Refresh the page
- Click "Update from BoM"
Problem:
Only the move for Component 1 is retained. The moves for Components 2 (which were deleted) and for Components 3 and 4 (which belong to the kit) are removed, while the kit should be decomposed into its own components (3 and 4) and their moves retained.
The current logic did not handle kit products properly when updating the MO. It only compared the components at the top level of the BoM, ignoring the fact that kits contain their own components. As a result, the moves corresponding to the kit's components were not detected and were deleted when updating the MO.
opw-4247193
Forward-Port-Of: odoo/odoo#183638Issue: ====== Extra button in the sent email. Steps to reproduce the issue: ============================= - Create a new mailing - Start from scratch - Drop cover template - Add a link inside it - Test send the email - There is an extra link in the sent email. Origin of the issue: ==================== In the case when the button is inside the cover template we end up with something like this `<!--mso condition ab <!-- another condition cd endif--> ef endif-->` but in reality c
Original PR description
Issue: ====== Extra button in the sent email. Steps to reproduce the issue: ============================= - Create a new mailing - Start from scratch - Drop cover template - Add a link inside it - Test send the email - There is an extra link in the sent email. Origin of the issue: ==================== In the case when the button is inside the cover template we end up with something like this `<!--mso condition ab <!-- another condition cd endif--> ef endif-->` but in reality comments can't be nested so the first comment will close at the ending of the second comment so we will end up with the content `ef` being displayed. Solution: ========= Since the two conditions are opposites, we remove completely the content of the nested comment if it has oppisite condition otherwise we just remove the comment tags since they will be replaced with the upper comment opw-4149948 Forward-Port-Of: odoo/odoo#181504
**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#184334 Forward-Port-Of: odoo/odoo#183774