Saturday, March 22, 2025
9 changes · master
Miscellaneous changes
This PR introduces a local upgrade script to fix the duplicate UUID issue for customers who upgraded to 18.0 before this PR was merged: #194990 The creation of this local upgrade script was requested towards the end of the conversation on that PR. Before the above PR was merged, older POS [order, order.line, payment] records all got the same UUID during the upgrade to 18.0 for the reason laid out in the conversation on the PR: > [in reference to the default value for the uuid column c
Original PR description
This PR introduces a local upgrade script to fix the duplicate UUID issue for customers who upgraded to 18.0 before this PR was merged: #194990 The creation of this local upgrade script was requested…
This PR introduces a local upgrade script to fix the duplicate UUID issue for customers who upgraded to 18.0 before this PR was merged: #194990 The creation of this local upgrade script was requested towards the end of the conversation on that PR. Before the above PR was merged, older POS [order, order.line, payment] records all got the same UUID during the upgrade to 18.0 for the reason laid out in the conversation on the PR: > [in reference to the default value for the uuid column calling `uuid4()`] ... when the ORM inits the column it will set the same value for all rows. Current behavior before PR: Post-upgrade POS tickets get sent to Tech for us to clean manually via a server action that duplicates UUIDs. Desired behavior after PR is merged: Post-upgrade POS tickets can be solved in Functional by "Upgrading" the `point_of_sale` module **or** the customer doesn't need to create a ticket because they solved it themselves by upgrading their module. Forward-Port-Of: odoo/odoo#201287 Forward-Port-Of: odoo/odoo#200067
Nothing prevents from creating templates and composers on non thread models. However most necessary code relies on mail.thread. Here we move code from mail.thread directly to BaseModel. For most business models it does not change anything. For some side models it allows / fixes usage of SMS composer, allowing to dynamically find numbers / partners, ... One notable use case that triggered this PR is sending of SMS to users using their work phone number, or through their partner. Either
Original PR description
Nothing prevents from creating templates and composers on non thread models. However most necessary code relies on mail.thread. Here we move code from mail.thread directly to BaseModel. For most…
Nothing prevents from creating templates and composers on non thread models. However most necessary code relies on mail.thread. Here we move code from mail.thread directly to BaseModel. For most business models it does not change anything. For some side models it allows / fixes usage of SMS composer, allowing to dynamically find numbers / partners, ... One notable use case that triggered this PR is sending of SMS to users using their work phone number, or through their partner. Either we hack user model, either we provide a generic fix. Note that in current master (18.2+) most 'mail' generic features are supported on non-thread models (template usage and sending, mailing using composer, ...). SMS is still thread-specific while phone capabilities have already been moved to generic code. We therefore continue towards generic simple mail / sms usage on business records, while advanced features (followers, logs, direct post using SMS type) require thread-enabled models. Task-4113190 sentry-4681535519 Forward-Port-Of: odoo/odoo#202913 Forward-Port-Of: odoo/odoo#200650
Current behaviour: --- Mexican phone numbers are not managed correctly following the 2019 changes in Mexico. (Removing a 1 in phone numbers) Cause of the issue: --- The phonenumbers library removing support of mexican phone numbers starting with 1 in 8.13.38 The Whatsapp API still using the mexican phone numbers starting with 1 Fixes: --- Patched the phonenumbers library, removing 1 at the right place for mexican phone numbers. Similar to: https://github.com/odoo/odoo/commit/53885
Original PR description
Current behaviour: --- Mexican phone numbers are not managed correctly following the 2019 changes in Mexico. (Removing a 1 in phone numbers) Cause of the issue: --- The phonenumbers library removing support of mexican phone numbers starting with 1 in 8.13.38 The Whatsapp API still using the mexican phone numbers starting with 1 Fixes: --- Patched the phonenumbers library, removing 1 at the right place for mexican phone numbers. Similar to: https://github.com/odoo/odoo/commit/53885e41867653ad45ca3aef55886c280240b76a Changed the forcing to international format when parsing, to make sure the patches are applied before detecting an issue. Similar to: https://github.com/odoo/odoo/commit/29a4de8e29a2e330b8e5993c9fde23c69a2eff5e opw-4473528 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202295 Forward-Port-Of: odoo/odoo#197838
Steps to reproduce: - insert a line chart into a spreadsheet with the horizontal axis being a time axis - ensures a domain is applied such that at least some past data is excluded - open the configuration side panel - check the "Cumulative data" checkbox => the chart doesn't take into account past data. When reloading it works. opw-4646477 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202841 Forward-Port-Of:
Original PR description
Steps to reproduce: - insert a line chart into a spreadsheet with the horizontal axis being a time axis - ensures a domain is applied such that at least some past data is excluded - open the configuration side panel - check the "Cumulative data" checkbox => the chart doesn't take into account past data. When reloading it works. opw-4646477 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202841 Forward-Port-Of: odoo/odoo#202746
Description of the issue this commit addresses: When registering a SEPA payment, it is possible to get a UserError telling you to validate therecipient bank account while it is validated. --- Steps to reproduce: 1. Install account. 2. Activate SEPA Credit Transfer (SCT) in the settings. 3. On the Bank journal's settings, input an account number. 4. Make sure the accounts used for the transfer authorize sending money. 5. Create a move in the misc journal with multiple lines and d
Original PR description
Description of the issue this commit addresses: When registering a SEPA payment, it is possible to get a UserError telling you to validate therecipient bank account while it is validated. --- Steps…
Description of the issue this commit addresses: When registering a SEPA payment, it is possible to get a UserError telling you to validate therecipient bank account while it is validated. --- Steps to reproduce: 1. Install account. 2. Activate SEPA Credit Transfer (SCT) in the settings. 3. On the Bank journal's settings, input an account number. 4. Make sure the accounts used for the transfer authorize sending money. 5. Create a move in the misc journal with multiple lines and distinct partners. 6. Post the move. Go in the journal entries. Select it. "Register Payment". 7. Change the Payment Method for SEPA Credit Transfer. "Create Payments". 8. A UserError shows up. --- Desired behavior after this commit is merged: No UserError shows up, the payments are created. --- Note on the fix: The error happened because one of the condition for raising the UserError is a value of a record in a many2one relation which is a stored computed field. As the payment is created with a list of values, the compute method is not triggered and the many2one remains empty while it should not. This fix makes sure the partner_bank_id is only put in the payment values once it has been computed to avoid keeping it false. --- opw-4518374 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#203003 Forward-Port-Of: odoo/odoo#201608
Before this commit: this.document.getSelection() can return null and causes traceback when accessing anchorNode at preserveSelection After this commit: ensure document selection is not empty --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202884
Original PR description
Before this commit: this.document.getSelection() can return null and causes traceback when accessing anchorNode at preserveSelection After this commit: ensure document selection is not empty --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202884
**Steps to reproduce:** - Install Accounting and l10n_ke_edi_tremol - Switch to a Kenyan company (e.g. KE Company) - Configure USD currency: * Rounding Factor: 0.000100 * Decimal Places: 4 * Rate: 0.007729205731 Unit per KES 129.379400000000 KES per Unit - Create a product with decimal in the price (e.g. 1234.56) - Create an invoice: * Customer: [a Kenyan customer] * Currency: USD * Product: [the created product] * Taxes: 16% - Confirm the invoice - Send the invoice t
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_ke_edi_tremol - Switch to a Kenyan company (e.g. KE Company) - Configure USD currency: * Rounding Factor: 0.000100 * Decimal Places: 4 * Rate:…
**Steps to reproduce:**
- Install Accounting and l10n_ke_edi_tremol
- Switch to a Kenyan company (e.g. KE Company)
- Configure USD currency:
* Rounding Factor: 0.000100
* Decimal Places: 4
* Rate: 0.007729205731 Unit per KES 129.379400000000 KES per Unit
- Create a product with decimal in the price (e.g. 1234.56)
- Create an invoice:
* Customer: [a Kenyan customer]
* Currency: USD
* Product: [the created product]
* Taxes: 16%
- Confirm the invoice
- Send the invoice to fiscal device (It will not be possible without some credentials. However, if a breakpoint is set at the last line ("return" line) of "_l10n_ke_cu_lines_messages" method, the total amount in KSh sent to the fiscal device can be checked.)
**Issue:**
The total amount in KSh sent to the fiscal device is different than the total amount in USD converted to KSh with the used currency rate.
**Cause:**
In the "_l10n_ke_cu_lines_messages" method (the method used to compute the amounts sent to the fiscal device), a rounding is done by forcing the number of decimal to 2 without taking into account the configuration of the currency when computing the price.
opw-4567098
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#202998
Forward-Port-Of: odoo/odoo#202706Some datasource functionalities (i.e. insert PIVOT and LIST) create a new sheet based on the source name. Unfortunately, sheet names cannot contain some predefined characters (mostly for excel compatibility purpose). This revision adds a sanitization of the source name before creating the sheet. task-4347719 Forward-Port-Of: odoo/enterprise#81928 Forward-Port-Of: odoo/enterprise#74313
Original PR description
Some datasource functionalities (i.e. insert PIVOT and LIST) create a new sheet based on the source name. Unfortunately, sheet names cannot contain some predefined characters (mostly for excel compatibility purpose). This revision adds a sanitization of the source name before creating the sheet. task-4347719 Forward-Port-Of: odoo/enterprise#81928 Forward-Port-Of: odoo/enterprise#74313
Current behaviour: --- Mexican phone numbers are not managed correctly following the 2019 changes in Mexico. (Removing a 1 in phone numbers) Cause of the issue: --- The phonenumbers library removing support of mexican phone numbers starting with 1 in 8.13.38 The Whatsapp API still using the mexican phone numbers starting with 1 Fixes: --- See community commit Adding extra tests in test_whatsapp Similar to: https://github.com/odoo/enterprise/commit/a35a039e5fba569cd379b23d37ce512b
Original PR description
Current behaviour: --- Mexican phone numbers are not managed correctly following the 2019 changes in Mexico. (Removing a 1 in phone numbers) Cause of the issue: --- The phonenumbers library removing support of mexican phone numbers starting with 1 in 8.13.38 The Whatsapp API still using the mexican phone numbers starting with 1 Fixes: --- See community commit Adding extra tests in test_whatsapp Similar to: https://github.com/odoo/enterprise/commit/a35a039e5fba569cd379b23d37ce512b5a23f7e2 opw-4473528 Forward-Port-Of: odoo/enterprise#81677 Forward-Port-Of: odoo/enterprise#79416