Daily updates from Odoo
Thursday, January 2, 2025
11 changes · saas-17.4
Miscellaneous changes
Some accounts got the wrong code, while the id rightly changed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191844 Forward-Port-Of: odoo/odoo#191826
Original PR description
Some accounts got the wrong code, while the id rightly changed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191844 Forward-Port-Of: odoo/odoo#191826
Description of the issue/feature this PR addresses: This commit introduces system parameter to skip the creation of bank account in the reconciliation of bank statements. The issue it can solve happens when 2 different commercial entities use the same paying partner (ie a partner that is not a subcontact) to pay their invoices. When an invoice is paid by the paying partner, Odoo will store the account number that was used for the transfer on account.bank.statement.line. When this statem
Original PR description
Description of the issue/feature this PR addresses: This commit introduces system parameter to skip the creation of bank account in the reconciliation of bank statements. The issue it can solve…
Description of the issue/feature this PR addresses: This commit introduces system parameter to skip the creation of bank account in the reconciliation of bank statements. The issue it can solve happens when 2 different commercial entities use the same paying partner (ie a partner that is not a subcontact) to pay their invoices. When an invoice is paid by the paying partner, Odoo will store the account number that was used for the transfer on account.bank.statement.line. When this statement line is reconciled with an invoice, if the bank account was not stored on the partner previously, a res.partner.bank will be created automatically. When another payment is coming from the same bank account, Odoo will then select the partner linked to the bank account that it did store previously, even if the payment was for an invoice linked to another partner, and it will not propose the proper invoice in the reconciliation widget, even if it uses an exact match on the payment reference number. Having a parameter allowing to skip creation of the bank account in Odoo will allow the reconciliation to be based striclty on the reference number. Current behavior before PR: Bank account is stored and wrong invoices are proposed by the reconciliation widget Desired behavior after PR is merged: Allow to avoid storing bank account and having wrong invoices are proposed by the reconciliation widget --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173351 Forward-Port-Of: odoo/odoo#168029
Before this commit, when the user sets a project as a default value for his tasks, that default value will also be applied inside To-Do app because a to-do is in fact a private task (that is, a task without any project set). This commit adds a default value inside the context of the main action used in To-Do to make sure the default value for `project_id` field in To-Do is false and nothing else. Steps to reproduce ================== 1. Install Project app 2. Go to Project app 3. Sel
Original PR description
Before this commit, when the user sets a project as a default value for his tasks, that default value will also be applied inside To-Do app because a to-do is in fact a private task (that is, a task…
Before this commit, when the user sets a project as a default value for his tasks, that default value will also be applied inside To-Do app because a to-do is in fact a private task (that is, a task without any project set). This commit adds a default value inside the context of the main action used in To-Do to make sure the default value for `project_id` field in To-Do is false and nothing else. Steps to reproduce ================== 1. Install Project app 2. Go to Project app 3. Select/create a project 4. Select/create and edit a task inside 5. Enable the debug mode 6. Click on debug menu and select `Set Default Values` 7. Apply `project = <your project selected/created>` and save 8. Go to To-Do app 9. Create a to-do Expected Behavior ----------------- A to-do should be created without any issue in the kanban view. Current Behavior ---------------- A form view will be displayed inside a modal to create the to-do but the form view is in fact the one used in Project app and the project set is the one set as default value instead of having no project since the user is creating a to-do and not a task inside that project. Forward-Port-Of: odoo/odoo#191583
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#192038Before this commit, when a time off request based on extra hours was set to draft, a new overtime record with negative duration was created. This commit makes sure that the record is only created when the time off request is in the state confirm or validate. task-4096548 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189711 Forward-Port-Of: odoo/odoo#185962
Original PR description
Before this commit, when a time off request based on extra hours was set to draft, a new overtime record with negative duration was created. This commit makes sure that the record is only created when the time off request is in the state confirm or validate. task-4096548 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189711 Forward-Port-Of: odoo/odoo#185962
In case an extra dependency is added to the api.depends decorator of account.move._compute_journal_id, account.payment.partner_bank_id is going to be recomputed, potentially overwriting existing value. Steps to reproduce: 1. Install a module adding a dependency to account.move._compute_journal_id 2. Create a vendor bill with a partner having more than one bank account 3. Register payment using another bank account than the first one The created payment would then have its bank account r
Original PR description
In case an extra dependency is added to the api.depends decorator of account.move._compute_journal_id, account.payment.partner_bank_id is going to be recomputed, potentially overwriting existing value. Steps to reproduce: 1. Install a module adding a dependency to account.move._compute_journal_id 2. Create a vendor bill with a partner having more than one bank account 3. Register payment using another bank account than the first one The created payment would then have its bank account recomputed. By testing for an existing value in the compute function before assigning the first bank account of the partner, we ensure any manually defined value will not be overwritten through unwanted recomputation. For context: https://github.com/OCA/sale-workflow/pull/3321 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181278
Three commits are included in this PR. - One adds a base module for all Nilvera modules - One adds a module to handle sending and receiving E-Invoices and E-Archives to and from Nilvera. - One adds general improvements to UBL. task-3952234 Forward-Port-Of: odoo/odoo#180283
Original PR description
Three commits are included in this PR. - One adds a base module for all Nilvera modules - One adds a module to handle sending and receiving E-Invoices and E-Archives to and from Nilvera. - One adds general improvements to UBL. task-3952234 Forward-Port-Of: odoo/odoo#180283
When field widgets were ported to OWL in 48ef812a, a few ARIA attributes were not adapted correctly. For instance, in the statusbar widget, the title was ported as an `aria-label` attribute ("Current state" and "Not active state"), which overrides the actual status name. This commit fixes the above issue by removing the incorrect `aria-label` attributes and fixing logic for other ones like `aria-checked`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/s
Original PR description
When field widgets were ported to OWL in 48ef812a, a few ARIA attributes
were not adapted correctly. For instance, in the statusbar widget, the
title was ported as an `aria-label` attribute ("Current state" and "Not
active state"), which overrides the actual status name.
This commit fixes the above issue by removing the incorrect `aria-label`
attributes and fixing logic for other ones like `aria-checked`.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#191431
Forward-Port-Of: odoo/odoo#183447**Issue:** in the Saudi Arabia localization, the delivery address is not displayed on invoices even if `Customer Addresses` is enabled. **Steps to reproduce:** 1. Go to settings and enable `Customer Addresses`. 2. Install the Saudi Arabia localization. 3. create an invoice with a delivery address other than the customer's. 4. Print the invoice. 5. notice that the delivery address is not displayed on the invoice. **Solution:** - Added the delivery address to the invoice report next t
Original PR description
**Issue:** in the Saudi Arabia localization, the delivery address is not displayed on invoices even if `Customer Addresses` is enabled. **Steps to reproduce:** 1. Go to settings and enable `Customer Addresses`. 2. Install the Saudi Arabia localization. 3. create an invoice with a delivery address other than the customer's. 4. Print the invoice. 5. notice that the delivery address is not displayed on the invoice. **Solution:** - Added the delivery address to the invoice report next to the QR code. opw-4337379 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190976
Authentication data was accidentally logged when sending requests to the Authorize API. This change stops logging such data to avoid security breaches. opw-4311870 Forward-Port-Of: odoo/odoo#191219
Original PR description
Authentication data was accidentally logged when sending requests to the Authorize API. This change stops logging such data to avoid security breaches. opw-4311870 Forward-Port-Of: odoo/odoo#191219
**Problem**: When destroying a snippet, listeners are not cleared. As a result, when focusing on a new instance of `ReplaceMedia`, the previous listeners remain active with stale context (old `$target`), which no longer has a parent since it was removed during the `img` change. **Solution**: Clear listeners during the `destroy` process. **Steps to reproduce**: 1. Open the website. 2. Add items. 3. Change an image. 4. Unlink that image. 5. Observe a traceback. opw-4412300 ---
Original PR description
**Problem**: When destroying a snippet, listeners are not cleared. As a result, when focusing on a new instance of `ReplaceMedia`, the previous listeners remain active with stale context (old `$target`), which no longer has a parent since it was removed during the `img` change. **Solution**: Clear listeners during the `destroy` process. **Steps to reproduce**: 1. Open the website. 2. Add items. 3. Change an image. 4. Unlink that image. 5. Observe a traceback. opw-4412300 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191142