Daily updates from Odoo
Friday, March 22, 2024
24 changes · master
Resolved issues and error corrections
This update rewrites complex reporting queries in a safer internal format so automated checks can handle them reliably. It helps reduce false alarms and maintenance risk in accounting and localization reports without changing day-to-day user workflows.
Original PR description
After some improvements the SQL checker now sees those queries, and can't cope with their complexity. Also deprecate `AccountReport._query_get`, literally all it does is unwrap `_get_table_expression` making things harder to check.
Users can now duplicate read-only Sign templates without encountering an error. This makes it easier to reuse existing templates and continue document workflows without interruption.
Original PR description
Before this commit, when duplicating a read-only template a traceback was being triggered since we were passing a single template to the copy method. After this commit, we call the copy function passing a batch of a single element, which will return a list of templates containing a single template. After that, we call the action to open this copied template. task-3790206
The Helpdesk team setup screen now displays the Team Members label correctly when automatic assignment is enabled. This small visual fix makes the configuration form look cleaner and easier to read for administrators.
Original PR description
Steps to reproduce: - install helpdesk - under configuration, click on helpdesk teams - In helpdesk teams form view enable automatic assignment Issue: - under automatic assignment, the 'team members' label is not centered Solution: - By giving d-flex to the div tag of label the issue will be solved. task-3683976
Code cleanup and technical improvements
This update simplifies internal grouping logic used across several Odoo apps, reducing duplicated code and making future maintenance easier. Users should see the same grouping behavior in views and reports, with lower risk of inconsistencies between modules.
Original PR description
### [REF] *: use the default group_expand of fields.Selection The selection field already has a method for `group_expand` (which expands each selection value) called `_default_group_expand`. Unfortunately, it is undocumented and unknown. Use it if possible and remove any clones of it. ### [REF] core, *: remove order parameter of group_expand methods The order sent to group_expand is either None (groups on non-relational fields) or equal to the comodel _order. The only exception is when the order is reversed. To simplify the API, remove this parameter and instead reverse the result if the order is reversed. https://github.com/odoo/odoo/pull/139294
Miscellaneous changes
Task: 36213 Forward-Port-Of: odoo/enterprise#58767 Forward-Port-Of: odoo/enterprise#55068
Original PR description
Task: 36213 Forward-Port-Of: odoo/enterprise#58767 Forward-Port-Of: odoo/enterprise#55068
Currently, posting a message to discuss channels is done in two steps: first writing the last_interest_dt to the channel, then creating the message, second triggering the notify_thread to send the message to the followers. In the first step, the last_interest_dt will be directly sent to the client if it differs from the old value. So there is no need to send the message to the client if the last_interest_dt has not changed in the second step. Also, this can lead to a racing condition in the t
Original PR description
Currently, posting a message to discuss channels is done in two steps: first writing the last_interest_dt to the channel, then creating the message, second triggering the notify_thread to send the message to the followers. In the first step, the last_interest_dt will be directly sent to the client if it differs from the old value. So there is no need to send the message to the client if the last_interest_dt has not changed in the second step. Also, this can lead to a racing condition in the testing files. This commit removes the notif in the second step. Also, adapting the mock_models to the new behavior as the follow-up of https://github.com/odoo/odoo/pull/155569 https://github.com/odoo/odoo/pull/158134 Forward-Port-Of: odoo/enterprise#59130
The clipboard handler of the comments did not account properly for the pasting from the OS clipboard. Task: 3813759 Forward-Port-Of: odoo/enterprise#58827
Original PR description
The clipboard handler of the comments did not account properly for the pasting from the OS clipboard. Task: 3813759 Forward-Port-Of: odoo/enterprise#58827
There were a few problems reported with the KMD INF and VD reports. 1. The namespace of the VD (EC Sales) XML export was incorrect, causing the file not to be accepted on the autorities platform. This was fixed. 2. In the VD XML export, the numbers were floats, while they had to be integers for the platform to accept the file. This was fixed. 3. Customer credit notes were not taken into account in the KMD INF report. This was a small issue in the SQL query, were we only considered lines wit
Original PR description
There were a few problems reported with the KMD INF and VD reports. 1. The namespace of the VD (EC Sales) XML export was incorrect, causing the file not to be accepted on the autorities platform. This was fixed. 2. In the VD XML export, the numbers were floats, while they had to be integers for the platform to accept the file. This was fixed. 3. Customer credit notes were not taken into account in the KMD INF report. This was a small issue in the SQL query, were we only considered lines with a tax balance > 0, where for credit notes it is < 0. opw-3758841 Forward-Port-Of: odoo/enterprise#58897
In Approvals, you can create Approval Request where you select Products (in demo data : Create RFQ). When you do that, on the request creation itself, you'll be able to pick products and add it in lines. There's a column description, but that column is not populated correctly, it's just a copy of the name. It should be the description from the product, purchase tab. TaskID: 3794627 Forward-Port-Of: odoo/enterprise#58909 Forward-Port-Of: odoo/enterprise#58492
Original PR description
In Approvals, you can create Approval Request where you select Products (in demo data : Create RFQ). When you do that, on the request creation itself, you'll be able to pick products and add it in lines. There's a column description, but that column is not populated correctly, it's just a copy of the name. It should be the description from the product, purchase tab. TaskID: 3794627 Forward-Port-Of: odoo/enterprise#58909 Forward-Port-Of: odoo/enterprise#58492
The values of blocks F and G have been changed on the sweedish tax report on the `l10n_se` module. This commit adapt the tests accordingly. Forward-Port-Of: odoo/enterprise#58870 Forward-Port-Of: odoo/enterprise#58508
Original PR description
The values of blocks F and G have been changed on the sweedish tax report on the `l10n_se` module. This commit adapt the tests accordingly. Forward-Port-Of: odoo/enterprise#58870 Forward-Port-Of: odoo/enterprise#58508
One of our future bank synchronization provider, bLink, is asking us to make sure that customers can only connect to their banks if they have a 2FA to login on their database. As we don't want to enforce this behavior for other providers, we decide to send the value when we open the bank selection view. If a customer tries to connect with a bLink institution, an error will be sent by Odoo Fin proxy telling that connection with bLink need a 2FA enabled. NB: This commit is only for sending th
Original PR description
One of our future bank synchronization provider, bLink, is asking us to make sure that customers can only connect to their banks if they have a 2FA to login on their database. As we don't want to enforce this behavior for other providers, we decide to send the value when we open the bank selection view. If a customer tries to connect with a bLink institution, an error will be sent by Odoo Fin proxy telling that connection with bLink need a 2FA enabled. NB: This commit is only for sending the info when opening the iframe, all the logic is handled by Odoo Fin. task-id: 3637581 Forward-Port-Of: odoo/enterprise#58941 Forward-Port-Of: odoo/enterprise#56582
When a user reads an article from the frontend view of Knowledge and clicks on the "Sign in" button to sign in: internal users will be redirected to the Odoo backend while portal users will be redirected to the `/my` page. The current redirection process is confusing because users may lose track of the article they were reading. If people re-open Knowledge after being redirected, they may no find the article they were reading as it could be hidden in the sidebar. When people click on the "
Original PR description
When a user reads an article from the frontend view of Knowledge and clicks on the "Sign in" button to sign in: internal users will be redirected to the Odoo backend while portal users will be…
When a user reads an article from the frontend view of Knowledge and clicks on the "Sign in" button to sign in: internal users will be redirected to the Odoo backend while portal users will be redirected to the `/my` page. The current redirection process is confusing because users may lose track of the article they were reading. If people re-open Knowledge after being redirected, they may no find the article they were reading as it could be hidden in the sidebar. When people click on the "Sign in" button from Knowledge, we assume that they probably wanted to edit the article, change the permissions, add new members, access their own workspace, etc. So, we will now redirect the user to the article they were reading after they sign in. With that change, portal users can still access the '/my' page from Knowledge by clicking on the home icon of the sidebar and internal users can view all apps of the backend by clicking on the home button of the Odoo navbar. task-3776350 Forward-Port-Of: odoo/enterprise#57972
Since [1], it's now possible to set a display name on a client action, but a fallback to the action's name was also added. The issue with this, is that the action's name is a very technical one, and we don't want to display it to the user. [1] https://github.com/odoo/odoo/commit/3ad4fd65387f60b524e5f786556963ead8ae9dfe Forward-Port-Of: odoo/enterprise#59028
Original PR description
Since [1], it's now possible to set a display name on a client action, but a fallback to the action's name was also added. The issue with this, is that the action's name is a very technical one, and we don't want to display it to the user. [1] https://github.com/odoo/odoo/commit/3ad4fd65387f60b524e5f786556963ead8ae9dfe Forward-Port-Of: odoo/enterprise#59028
Previously, the availability widget showed non-rental info, even for rental order lines. This was because the rental dates were never passed to the widget. This commit ensures the rental dates are passed. opw-3700809 Forward-Port-Of: odoo/enterprise#59015
Original PR description
Previously, the availability widget showed non-rental info, even for rental order lines. This was because the rental dates were never passed to the widget. This commit ensures the rental dates are passed. opw-3700809 Forward-Port-Of: odoo/enterprise#59015
Add an userError to prevent the user selecting quantity quality check Type with manufacturing operation types. opw-3770822 Forward-Port-Of: odoo/enterprise#58152 Forward-Port-Of: odoo/enterprise#57802
Original PR description
Add an userError to prevent the user selecting quantity quality check Type with manufacturing operation types. opw-3770822 Forward-Port-Of: odoo/enterprise#58152 Forward-Port-Of: odoo/enterprise#57802
Steps to reproduce: - Install Accounting and l10n_pe_edi - Switch to a Peruvian company (e.g. PE Company) - In Contacts, Configure a bank account (Banco de la nación - BANCPEPL) for PE Company - In Accounting settings, run the automatic currency rates service ([PE] SUNAT) - Create a product: (e.g. Product X) * Sales Price: 990.00 * Withhold code: Arrendamiento de bienes muebles * Withhold Percentage: 10.00 - Create an invoice: * Customer: [a Peruvian contact] (e.g. Comercial Co
Original PR description
Steps to reproduce: - Install Accounting and l10n_pe_edi - Switch to a Peruvian company (e.g. PE Company) - In Contacts, Configure a bank account (Banco de la nación - BANCPEPL) for PE Company - In…
Steps to reproduce:
- Install Accounting and l10n_pe_edi
- Switch to a Peruvian company (e.g. PE Company)
- In Contacts, Configure a bank account (Banco de la nación - BANCPEPL) for PE Company
- In Accounting settings, run the automatic currency rates service ([PE] SUNAT)
- Create a product: (e.g. Product X)
* Sales Price: 990.00
* Withhold code: Arrendamiento de bienes muebles
* Withhold Percentage: 10.00
- Create an invoice:
* Customer: [a Peruvian contact] (e.g. Comercial Constructora los Patitos S.A.)
* Operation Type: [1001] Operation Subject to Detraction
* Payment terms: End of Following Month
* Journal in: USD
* Invoice Lines:
- Product: Product X
- Account: 7012100 Merchandise - Merchandise - Local sale - Third parties
- Price: 990.00
- Taxes: 18%
- EDI Affect. Reason: Taxed- Onerous Operation
- Confirm the invoice
- Process to EDI service
Issue:
The remaining amount after deducting the withholding is not correct in the generated EDI document.
The total is 990.00 + Taxes (18%) = 1168.20
The withholding is 1168.20 * 10% = 116.82
The remaining amount should be 1168.20 - 116.82 = 1051,38
However, the remaining amount set in the EDI document is 1052,20, which is not correct.
Cause:
The rounding used to compute the withholding amounts are not correct.
The amount in the selected currency should contain 2 decimal digits (precision_rounding should be 0.01, instead of 2).
Also, the Detraction amount should be declared in PEN currency in the EDI document and should not contain the decimal part (precision_rounding should be 1, instead of 2).
opw-3747620
Forward-Port-Of: odoo/enterprise#58944
Forward-Port-Of: odoo/enterprise#58473This PR contains a revamp of the digest email in the new "Milk" style replacing the old purple with the new one. This has been adapted in all digest data too. The images of the digest email's tips have been replaced by "milkified" versions of them, already available on odoo cdn by the way. Task-3338467 Forward-Port-Of: odoo/enterprise#58992 Forward-Port-Of: odoo/enterprise#42790
Original PR description
This PR contains a revamp of the digest email in the new "Milk" style replacing the old purple with the new one. This has been adapted in all digest data too. The images of the digest email's tips have been replaced by "milkified" versions of them, already available on odoo cdn by the way. Task-3338467 Forward-Port-Of: odoo/enterprise#58992 Forward-Port-Of: odoo/enterprise#42790
Before this commit assets from `website_sale_stock_renting` was loaded before `website_sale_renting` because there was prepend in parent module assets PR: https://github.com/odoo/enterprise/pull/49610 So method `_getInvalidMessage` written in child(`website_sale_stock_renting`) get overridden by parent module(`website_sale_renting`) This commit add `website_sale_stock_renting` module assets after `website_sale_renting` module assets in order to execute method in proper order opw-3679735 F
Original PR description
Before this commit assets from `website_sale_stock_renting` was loaded before `website_sale_renting` because there was prepend in parent module assets PR: https://github.com/odoo/enterprise/pull/49610 So method `_getInvalidMessage` written in child(`website_sale_stock_renting`) get overridden by parent module(`website_sale_renting`) This commit add `website_sale_stock_renting` module assets after `website_sale_renting` module assets in order to execute method in proper order opw-3679735 Forward-Port-Of: odoo/enterprise#58947 Forward-Port-Of: odoo/enterprise#58639
Steps to reproduce: - Install both ups_rest and ups legacy - Configure the new ups shipping method as admin - Create an SO and try to add ups delivery as demo - Access error Bug: in ups legacy credential fields are only accessible to the admin sudo is used on the request on the new app they aren't hidden so no sudo was added on the request Fix: it makes sense for me to keep the credentials hidden for the new module and use sudo on the request opw-3771840 Forward-Port-Of: odoo/en
Original PR description
Steps to reproduce: - Install both ups_rest and ups legacy - Configure the new ups shipping method as admin - Create an SO and try to add ups delivery as demo - Access error Bug: in ups legacy credential fields are only accessible to the admin sudo is used on the request on the new app they aren't hidden so no sudo was added on the request Fix: it makes sense for me to keep the credentials hidden for the new module and use sudo on the request opw-3771840 Forward-Port-Of: odoo/enterprise#58895
Since `account.full.reconcile` doesn't have a `display_name`, the header of the group is not displayed nicely. By grouping per `matching_number` instead, we can have a nicer display. Forward-Port-Of: odoo/enterprise#58840
Original PR description
Since `account.full.reconcile` doesn't have a `display_name`, the header of the group is not displayed nicely. By grouping per `matching_number` instead, we can have a nicer display. Forward-Port-Of: odoo/enterprise#58840
Steps to reproduce the problem: - create a product and list it on eBay - uncheck the sell on eBay setting for the product. Don't archive it - create a second product and list it to the existing listing in eBay - sync an order with that product ==> First created product is shown in the sale order The eBay_id stays on the product, even after unchecking the setting. This seems to be voluntary as when relisting a product, after some time without selling it on eBay for instance, this id will t
Original PR description
Steps to reproduce the problem: - create a product and list it on eBay - uncheck the sell on eBay setting for the product. Don't archive it - create a second product and list it to the existing listing in eBay - sync an order with that product ==> First created product is shown in the sale order The eBay_id stays on the product, even after unchecking the setting. This seems to be voluntary as when relisting a product, after some time without selling it on eBay for instance, this id will then be used. We now take the first product that is checked as used in eBay. opw-3503924 Forward-Port-Of: odoo/enterprise#58852
Currently, we have some code repeating in SixDriver, WorldlineDriver_L and WOrldlineDriver_W. The goal of this PR is to move this code to a parent class for easier maintenance and better code strcture Additionally, it applies the code to every ctypes dependant terminal driver, adding some features like "smart sleep" or rejecting double request processing when the terminal is busy for every single of them task-3707945 Forward-Port-Of: odoo/enterprise#58877 Forward-Port-Of: odoo/enterpri
Original PR description
Currently, we have some code repeating in SixDriver, WorldlineDriver_L and WOrldlineDriver_W. The goal of this PR is to move this code to a parent class for easier maintenance and better code strcture Additionally, it applies the code to every ctypes dependant terminal driver, adding some features like "smart sleep" or rejecting double request processing when the terminal is busy for every single of them task-3707945 Forward-Port-Of: odoo/enterprise#58877 Forward-Port-Of: odoo/enterprise#57064
Forward-Port-Of: odoo/enterprise#58846
Original PR description
Forward-Port-Of: odoo/enterprise#58846
Before this commit, when toggling the Signing Order option in a template with more than one sign role, the signer emails would disappear (only their names would be kept). After this commit, by adding the context variable show_email as true in the Send action, the signers emails no longer disappear. This will make the emails labels persist after performing onchange calls in the user interface. task-3659895 Forward-Port-Of: odoo/enterprise#58175
Original PR description
Before this commit, when toggling the Signing Order option in a template with more than one sign role, the signer emails would disappear (only their names would be kept). After this commit, by adding the context variable show_email as true in the Send action, the signers emails no longer disappear. This will make the emails labels persist after performing onchange calls in the user interface. task-3659895 Forward-Port-Of: odoo/enterprise#58175