Friday, March 21, 2025
26 changes · 18.0
Enhancements to existing features
This update improves Odoo's internal Hoot testing framework and related unit tests, making test results clearer and reducing cases where tests are accidentally skipped or behave inconsistently. These changes are limited to the test ecosystem, helping developers maintain quality without affecting normal business operations.
Original PR description
## Pull Request HOOT (PRHOOT) 29 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. Enterprise: https://github.com/odoo/enterprise/pull/81834 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fixes a visual issue in the Discuss sidebar where pinned thread entries were all treated as the first item in the list. The change restores the intended styling so users can scan pinned conversations more clearly.
Original PR description
Follow-up of https://github.com/odoo/odoo/pull/200310 PR above made a small typo: it removed `isCategoryOpen` which was alias for `thread.discussAppCategory.open` in template, but this was still mistakenly used in the `isFirst` props of a sub-thread template. As a result, the list of pinned thread was not shown correctly, as all items we wrongly flagged as the first item. Before / After  
Miscellaneous changes
This reverts commit 43041dfd66e984978ad743c4f720e580f82bd1aa. It looks like Google and Microsoft flag custom headers as Spam. opw-4439329 opw-4458057 opw-4471333 opw-4492740 opw-4501103 opw-4503823 opw-4507802 opw-4517232 opw-4523135 opw-4529415 opw-4547995 opw-4556927 opw-4557754 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 a
Original PR description
This reverts commit 43041dfd66e984978ad743c4f720e580f82bd1aa. It looks like Google and Microsoft flag custom headers as Spam. opw-4439329 opw-4458057 opw-4471333 opw-4492740 opw-4501103 opw-4503823 opw-4507802 opw-4517232 opw-4523135 opw-4529415 opw-4547995 opw-4556927 opw-4557754 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#202812 Forward-Port-Of: odoo/odoo#200193
The website editor now shows the Donation Button preview correctly while it is being dragged. This prevents extra prefilled donation buttons from appearing in the drag preview, making the editing experience clearer and less confusing.
Original PR description
**[FIX] website_payment: fix donation button preview on drag** Steps to reproduce: - Enter edit mode. - If not already installed, click the "Donation Button" in the snippet menu to install the "website_payment" app. - Start dragging the "Donation Button" without dropping it onto the page to display its preview. - Bug: Prefilled buttons are displayed in the preview when they shouldn't be. This bug was introduced by commit [1], where the prefilled buttons were added to the "s_donation" snippet template so that they would be visible in the "s_donation" preview in the snippets dialog. Unfortunately, this change also made them visible for the inner "Donation Button" snippet, which shouldn't be the case. [1]: https://github.com/odoo/odoo/commit/edf81c13d8f2f6d29a77d68cbfa0dc9216da3c2a
This fixes an error that occurred when selling a physical gift card in Point of Sale after removing the expiration date. Staff can now create valid physical gift cards with no expiry date, avoiding checkout interruptions.
Original PR description
Creating a physical gift card in the PoS without an expiration date led to an Odoo error.
Steps to reproduce:
-------------------
* Open a PoS
* Add a gift card
* Click on Sell physical gift card?
* Input a unique code and a value
* Remove the default expiration date
* Click on Add Balance
> Observation:
TypeError: value.toFormat is not a function
at serializeDate
Why the fix:
------------
the addBalance() method was trying to format the expiration date with serializeDate(this.state.expirationDate) without verrifing that it exists.
opw-4623141
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an automated sales test so it confirms a quotation using the visible confirmation button instead of relying on a navigation shortcut that is unavailable in the test flow. This improves reliability of the test coverage for quotation handling without changing day-to-day user behavior.
Original PR description
Follow-up of https://github.com/odoo/odoo/pull/194593 This PR added test coverage for the fix, but it failed at the last step '.o_menu_brand' to confirm the quotation. The intent is to save to quotation, but it relies on implicit action to quit (and save) the record from the app icon, which acts as a "go to main page of app". This button is not present in tours for some reasons, hence the step failing. This commit fixes it by manually confirming the quotation by clicking on the dedicated button, which is present in practice and in the tour. runbot-161274 In practice  In tour <img width="558" alt="Screenshot 2025-03-21 at 11 13 11" src="https://github.com/user-attachments/assets/8013a70a-0a0a-4a73-8820-d49678af84a5" />
The eCommerce product combo configurator no longer shows internal product reference codes to website visitors. This keeps backend-only information out of the storefront and presents a cleaner shopping experience.
Original PR description
This reference should only be shown in the backend.
Draft invoice PDFs now show only the draft invoice label instead of including a temporary placeholder invoice number. This prevents customers or staff from seeing misleading invoice numbers before an invoice is finalized.
Original PR description
### Steps to reproduce: - Create a new draft invoice - In the actions click "PDF without Payment" - In the PDF the name is "Draft Invoice INV/2023/0001" - It should only be "Draft Invoice" ### Cause: "INV/2023/0001" is the placeholders in the XML. It is displayed because the name for draft moves is no longer '/' but null. ### Solution: Change the condition to also check if `o.name` exists. opw-4607518
This fixes sale orders so global or fixed discount lines are automatically removed when all product lines are deleted. It prevents leftover discounts from remaining on empty orders, keeping order totals and records cleaner for sales teams.
Original PR description
## Description of the issue/feature this PR addresses: Ensured that the discount line is removed when all products are deleted from the sale order. ## Current behavior before PR: have a look at [this](https://excalidraw.com/#json=FsEs8xRNq5druyUCVA0yF,8aHZoS4w1p8SWKRPr4WPEQ) ## Desired behavior after PR is merged: Discount(Global/Fixed) lines will be deleted if there are no products in the order line --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adjusts Odoo's internal unit tests to work better with recent Hoot testing changes. It helps ensure test results are more accurate and reliable, reducing the risk of missed issues during development without affecting customer-facing features.
Original PR description
## Pull Request HOOT (PRHOOT) 29 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. Community: https://github.com/odoo/odoo/pull/199461 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adds a test to ensure that when a bank statement line linked to a batch payment is reset, the related payments are also reset correctly. This helps prevent accounting inconsistencies, especially for payments that do not use an outstanding account.
Original PR description
Test that resetting a statement line that was merged with a batch payment also resets the payments, especially for payments without an outstanding account. It wasn't the case because there is no real link between the batch payment and the statement line, and neither between the statement line and the payment itself. The fix is in community.
The system automatically fill the Bank Account info on invoices, however this does not work as expected when the move type is changed after creation Steps to reproduce: - Create an invoice, set partner with bank account defined - Switch to credit note - Check 'Other info' tab Issue: Bank Partner will be left blank, but it should be the partner bank account opw-4640629 Forward-Port-Of: odoo/odoo#202369
Original PR description
The system automatically fill the Bank Account info on invoices, however this does not work as expected when the move type is changed after creation Steps to reproduce: - Create an invoice, set partner with bank account defined - Switch to credit note - Check 'Other info' tab Issue: Bank Partner will be left blank, but it should be the partner bank account opw-4640629 Forward-Port-Of: odoo/odoo#202369
**Steps to reproduce:** - Install Accounting and l10n_sa_edi - Switch to a Saudi Arabian company (e.g. SA Company) - Duplicate "Customer Invoices" journal: * Default Income Account: 500001 Sales Account * Electronic invoicing: [disabled] - Create a retention tax: * Name: Retention 10% * Amount: -10.00000% * Is Retention: [checked] - Create an invoice: * Customer: [a Saudi Arabian contact] (e.g. ARAMCO Medinah Branch) * Journal: Customer Invoices * Invoice Lines:
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_sa_edi - Switch to a Saudi Arabian company (e.g. SA Company) - Duplicate "Customer Invoices" journal: * Default Income Account: 500001 Sales…
**Steps to reproduce:**
- Install Accounting and l10n_sa_edi
- Switch to a Saudi Arabian company (e.g. SA Company)
- Duplicate "Customer Invoices" journal:
* Default Income Account: 500001 Sales Account
* Electronic invoicing: [disabled]
- Create a retention tax:
* Name: Retention 10%
* Amount: -10.00000%
* Is Retention: [checked]
- Create an invoice:
* Customer: [a Saudi Arabian contact] (e.g. ARAMCO Medinah Branch)
* Journal: Customer Invoices
* Invoice Lines:
- Price: 100.00
- Taxes: "Sales Tax 15%" + "Retention 10%"
- Confirm the invoice
- Print the invoice
- Scan the QR code on the invoice with an app like "E-invoice QR Reader"
=> In the QR code, the total amount of the invoice with VAT included is 115.00 and the total amount of the VAT is 15.00.
The amount of the retention tax is excluded from the total and the VAT amounts, which is the expected behavior.
- Create the exact same invoice with the duplicated journal without electronic invoicing
- Confirm the invoice
- Print the invoice
- Scan the QR code on the invoice
**Issue:**
In the QR code, the amount of the retention (-10.00) is taken into account.
The total amount of the invoice with VAT included is 105.00 and the total amount of the VAT is 5.00.
The QR code should provide the same amounts either the used journal has "Electronic invoicing" enabled or not.
**Cause:**
Depending on the presence of an electronic invoice document or not, the QR code is generated by the overriding compute method from "l10_sa_edi" or the original one in "l10n_sa".
However, the "Is Retention" field of the "account.tax" model is introduced by "l10n_sa_edi" module and when the QR code is computed by the original method, this field is not taken into account and the corresponding retention tax is wrongly handled like any other tax.
**Solution:**
Use the same total amounts than the ones computed in "l10n_sa_edi" (where retention tax are excluded) in the original compute method if "l10n_sa_edi" is installed.
**Issue 2:** (revealed by the fix)
In "_get_invoice_line_allowance_vals_list" method, a variable can be used without being assigned (i.e. "fixed_tax_charge_vals_list").
opw-4525519
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#196640If the target url had duplicate keys in its query params, the redirect url would only contain the key-value pair corresponding to the first occurrence of the key. This is incorrect, as a shop url typically contains multiple attribute values in its query params. The issue was caused by an accidental cast from MultiDict to Dict when handling the query params. opw-4466925 Forward-Port-Of: odoo/odoo#202744 Forward-Port-Of: odoo/odoo#199570
Original PR description
If the target url had duplicate keys in its query params, the redirect url would only contain the key-value pair corresponding to the first occurrence of the key. This is incorrect, as a shop url typically contains multiple attribute values in its query params. The issue was caused by an accidental cast from MultiDict to Dict when handling the query params. opw-4466925 Forward-Port-Of: odoo/odoo#202744 Forward-Port-Of: odoo/odoo#199570
Issue ===== When product's code is computed, which is depend of the product's suppliers since each supplier can have a specific code, the first supplier is taken regardless if this supplier info is specific to another product variant which can cause to use the wrong code if there is multiple supplier with the same vendor but for different variants of the same product template. How to reproduce ================ 1. Install Puchase and Barcode; 2. Create a product with at least 2 variants;
Original PR description
Issue ===== When product's code is computed, which is depend of the product's suppliers since each supplier can have a specific code, the first supplier is taken regardless if this supplier info is…
Issue ===== When product's code is computed, which is depend of the product's suppliers since each supplier can have a specific code, the first supplier is taken regardless if this supplier info is specific to another product variant which can cause to use the wrong code if there is multiple supplier with the same vendor but for different variants of the same product template. How to reproduce ================ 1. Install Puchase and Barcode; 2. Create a product with at least 2 variants; 3. In the "Purchase" tab of this product, add two vendor pricelists with the same vendor but each for a different product variant and each with a different code; 4. Go in Purchase, create a new RFQ for this vendor, add a PO line for each variant and confirm the order; 5. Go in Barcode and open the PO's receipt -> You can see both lines have the same vendor's code (from the first pricelist) regardless the pricelist's product variant. Cause of the issue ================== In `_compute_product_code`, it uses the first product (template) supplier info regardless the product variant. Solution ======== In `_compute_product_code`, we skip a supplier info if it concerns another variant, and we break the supplier info loop only if it concerns the current product variant. Miscellaneous ============= The check of the `product.supplierinfo` `read` access right is moved outside of the loop so it is done only one time. [OPW-4589073](https://www.odoo.com/odoo/project/49/tasks/4589073) Forward-Port-Of: odoo/odoo#201900 Forward-Port-Of: odoo/odoo#201753
The aim of this commit is to allow non-users employee to be considered as "forwarding" vendor bills instead of sending it in their name, as the vendor would be the company anyway Steps to reproduce: - Create a fresh db with the mailing aliases setup and employee and account apps installed - Choose a demo data employee that has no user and set the parent_id as the db company. - Make sure the company doesn't have an email set. - Send an email from that employee work_email to the email alias
Original PR description
The aim of this commit is to allow non-users employee to be considered as "forwarding" vendor bills instead of sending it in their name, as the vendor would be the company anyway Steps to reproduce: - Create a fresh db with the mailing aliases setup and employee and account apps installed - Choose a demo data employee that has no user and set the parent_id as the db company. - Make sure the company doesn't have an email set. - Send an email from that employee work_email to the email alias of the Vendor Bills journal. Problem, the created bill has the employee set as the vendor. Expected behavior is that no vendor is set. opw-4516730 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#202667
Issue: In Barcode, performing certain operations and then reverting your changes can drastically affect the state of records: "picked" status or the visual demand of the move. ### Steps to reproduce: - Create a storable product tracked by SN. Put 2 SN in stock SN1 and SN2 - Create a delivery order for 2 units and mark as to do. > The two SN's should be reserved on your delivery. - Go to the barcode app, scan SN1. - Edit edit the SN1 line to set the qty back to 0. - Leave the barcode a
Original PR description
Issue: In Barcode, performing certain operations and then reverting your changes can drastically affect the state of records: "picked" status or the visual demand of the move. ### Steps to reproduce:…
Issue: In Barcode, performing certain operations and then reverting your changes can drastically affect the state of records: "picked" status or the visual demand of the move. ### Steps to reproduce: - Create a storable product tracked by SN. Put 2 SN in stock SN1 and SN2 - Create a delivery order for 2 units and mark as to do. > The two SN's should be reserved on your delivery. - Go to the barcode app, scan SN1. - Edit edit the SN1 line to set the qty back to 0. - Leave the barcode app and come back to the record. #### > The subline related to SN1 displays now a demand of 0. A new barcode line has been created with a demand of 1 for SN1. In short an extra record was created unecessarily. ### Cause of the issue: In the barcode app the demand of each line is measured by the quantity present on its move lines. In our set up, the move is related to 2 moves lines with a quantity of 1 that are not picked. Scanning SN1 will update the qty_done of its line to 1. As such, the move line quantity will be set from 1 to 1 and the move line will be picked: https://github.com/odoo/enterprise/blob/e8c831a540c12019c560cc19abf7abe8785d0e0e/stock_barcode/models/stock_move_line.py#L58-L61 In turns, the picked state of the move will be set to picked: https://github.com/odoo/odoo/blob/7bc38562f1988ba15525c04168e30c06a8f1d33c/addons/stock/models/stock_move.py#L208-L212 Now, editing the qty done of the move once more from 1 to 0 to reset the reservation will not revert the process for 2 reasons: 1. The quantity of the move line will be reset form its current value to 0, altering the demand of the barcode line to 0. 2. Even if the move line was unpicked in this process, the picked compute method of the move will never reset the picked state as the compute method can only set a True value. We therefore end up with a picked move without any picked move line and for which one of the picked move line has a quantity of 0. Now, leaving the barcode app will launch the split_uncompleted_moves method in order to not lose the changes made to the record and since the move is picked for the wrong reason, the move will be splitted in 2 instead of escaping the split process. https://github.com/odoo/enterprise/blob/e8c831a540c12019c560cc19abf7abe8785d0e0e/stock_barcode/models/stock_move.py#L21-L22 Enterprise: https://github.com/odoo/enterprise/pull/80675 opw-4600565 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202469 Forward-Port-Of: odoo/odoo#200167
Commit 0bdfda2af4d70a6c33773ecd4aaa717ef6a17d62 introduced a new behavior where delivery transfer to transit locations (inter companies transfer) could create a new Sale Order Line if necessary. However, we do not want this behavior if the transit location is just a step in the delivery to the Customer location. Hence, if there are any destination moves, we do not create a new sale order line. OPW-4643937 --- Test result without fix: ``` 2025-03-19 16:08:42,057 57047 ERROR oes_test
Original PR description
Commit 0bdfda2af4d70a6c33773ecd4aaa717ef6a17d62 introduced a new behavior where delivery transfer to transit locations (inter companies transfer) could create a new Sale Order Line if necessary.…
Commit 0bdfda2af4d70a6c33773ecd4aaa717ef6a17d62 introduced a new behavior where delivery transfer to transit locations (inter companies transfer) could create a new Sale Order Line if necessary. However, we do not want this behavior if the transit location is just a step in the delivery to the Customer location.
Hence, if there are any destination moves, we do not create a new sale order line.
OPW-4643937
---
Test result without fix:
```
2025-03-19 16:08:42,057 57047 ERROR oes_test_17.4 odoo.addons.sale_stock.tests.test_sale_stock: FAIL: TestSaleStock.test_custom_delivery_route_new_sale_line
Traceback (most recent call last):
File "/home/odoo/projects/odoo-src/multiverse/src/saas-17.4/odoo/addons/sale_stock/tests/test_sale_stock.py", line 2197, in test_custom_delivery_route_new_sale_line
self.assertEqual(len(sale_order.order_line), 1)
AssertionError: 2 != 1
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#202559Steps to reproduce: - In any of the SOL Many2one field with create=True. - Create a SOL using create option in dropdown. Issue: - A SOL is created without product. Reason: - Incorrect SQL constraint passed . Fix: - Adding a validation error which is tapped in if Many2one quick create i.e., Create option fails and opens the Many2X form. - We cant change the SQL contraint because it is only applied when module is intalled/updated/reinstalled. --- Why the SQL contsrai
Original PR description
Steps to reproduce: - In any of the SOL Many2one field with create=True. - Create a SOL using create option in dropdown. Issue: - A SOL is created without product. Reason: - Incorrect SQL constraint…
Steps to reproduce: - In any of the SOL Many2one field with create=True. - Create a SOL using create option in dropdown. Issue: - A SOL is created without product. Reason: - Incorrect SQL constraint passed . Fix: - Adding a validation error which is tapped in if Many2one quick create i.e., Create option fails and opens the Many2X form. - We cant change the SQL contraint because it is only applied when module is intalled/updated/reinstalled. --- Why the SQL contsraint fails "CHECK(display_type IS NOT NULL OR is_downpayment OR (product_id IS NOT NULL AND product_uom IS NOT NULL))" Also is_downpayment doesnt have a default value. Here consider we dont event send a single value all as nulls then result would be CHECK(NULL IS NOT NULL OR NULL OR (NULL IS NOT NULL AND NULL IS NOT NULL)) CHECK(FALSE OR NULL OR (FALSE AND FALSE) CHECK(FALSE OR NULL OR FALSE) CHECK(NULL) SQL doesn't categorize NULL into truthy or falsy value. For example a SQL constraint as CHECK (row1 NOT NULL OR row2 ...(and N number of conditions)) -- will always pass the check (even if you pass all the rows as NULL) NULL OR NULL -- TRUE (passes the empty NULL column value as [null]) FALSE OR NULL -- TRUE (passes the empty NULL column value as [null]) TRUE OR NULL -- TRUE It there is another column which has value it glady create a row with values and [null]/empty value for others. task-4441043 Co-Authored By - @xavierbol Forward-Port-Of: odoo/odoo#192464
Steps to reproduce: - Install event_booth_sale module - Create SO. - Add product and apply any reward or promotion. - Try changing the quantity of the reward line. Issue: - Quantity of reward line is editable when event_booth_sale module is installed. Cause: - The readonly attribute was completely overridden instead of adding condition. - As a result, the quantity is only set to readonly when is_event_booth is True. Fix: - Update the readonly attribute by including the is_event_
Original PR description
Steps to reproduce: - Install event_booth_sale module - Create SO. - Add product and apply any reward or promotion. - Try changing the quantity of the reward line. Issue: - Quantity of reward line is editable when event_booth_sale module is installed. Cause: - The readonly attribute was completely overridden instead of adding condition. - As a result, the quantity is only set to readonly when is_event_booth is True. Fix: - Update the readonly attribute by including the is_event_booth condition using the 'or' operator, ensuring that quantity of reward lines remain readonly as intended. opw-4585797 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202653
This commit reverts 5594b08f8bd399e7c653ca25e6211ae64ea7d898 because while buyer reference is mandatory for B2G it is not for B2C and B2B: "The buyer reference must be indicated on every electronic invoice to public contracting authorities of the federal administration." https://en.e-rechnung-bund.de/e-invoicing-faq/buyer-reference/ opw-4460079 X-original-commit: f6af0b3285b4835256fa1ab7b729dc3b334abe76 Description of the issue/feature this PR addresses: Current behavior before
Original PR description
This commit reverts 5594b08f8bd399e7c653ca25e6211ae64ea7d898 because while buyer reference is mandatory for B2G it is not for B2C and B2B: "The buyer reference must be indicated on every electronic invoice to public contracting authorities of the federal administration." https://en.e-rechnung-bund.de/e-invoicing-faq/buyer-reference/ opw-4460079 X-original-commit: f6af0b3285b4835256fa1ab7b729dc3b334abe76 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#202662
before this PR: - The QR code on the E-Invoice broke when multiple invoice lines reduced the available space. after this PR: - Adjusted the layout to ensure the QR code moves to a new page if there isn't enough space on the current page. task - 4658271 Forward-Port-Of: odoo/odoo#202503
Original PR description
before this PR: - The QR code on the E-Invoice broke when multiple invoice lines reduced the available space. after this PR: - Adjusted the layout to ensure the QR code moves to a new page if there isn't enough space on the current page. task - 4658271 Forward-Port-Of: odoo/odoo#202503
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#202454 Forward-Port-Of: odoo/odoo#200650
Before this commit: The "I Take It" button visibility was inconsistent across different view because different conditions were used to determine its visibility in each view. After this commit: This commit enhance the visibility of the "I Take It" button now it has consistent visibility across the views by follow same condition for every view. task-4455488 Forward-Port-Of: odoo/enterprise#79319
Original PR description
Before this commit: The "I Take It" button visibility was inconsistent across different view because different conditions were used to determine its visibility in each view. After this commit: This commit enhance the visibility of the "I Take It" button now it has consistent visibility across the views by follow same condition for every view. task-4455488 Forward-Port-Of: odoo/enterprise#79319
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#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#74313
Issue: In Barcode, performing certain operations and then reverting your changes can drastically affect the state of records: "picked" status or the visual demand of the move. ### Steps to reproduce: - Create a storable product tracked by SN. Put 2 SN in stock SN1 and SN2 - Create a delivery order for 2 units and mark as to do. > The two SN's should be reserved on your delivery. - Go to the barcode app, scan SN1. - Edit edit the SN1 line to set the qty back to 0. - Leave the barcode a
Original PR description
Issue: In Barcode, performing certain operations and then reverting your changes can drastically affect the state of records: "picked" status or the visual demand of the move. ### Steps to reproduce:…
Issue: In Barcode, performing certain operations and then reverting your changes can drastically affect the state of records: "picked" status or the visual demand of the move. ### Steps to reproduce: - Create a storable product tracked by SN. Put 2 SN in stock SN1 and SN2 - Create a delivery order for 2 units and mark as to do. > The two SN's should be reserved on your delivery. - Go to the barcode app, scan SN1. - Edit edit the SN1 line to set the qty back to 0. - Leave the barcode app and come back to the record. #### > The subline related to SN1 displays now a demand of 0. A new barcode line has been created with a demand of 1 for SN1. In short an extra record was created unecessarily. ### Cause of the issue: In the barcode app the demand of each line is measured by the quantity present on its move lines. In our set up, the move is related to 2 moves lines with a quantity of 1 that are not picked. Scanning SN1 will update the qty_done of its line to 1. As such, the move line quantity will be set from 1 to 1 and the move line will be picked: https://github.com/odoo/enterprise/blob/e8c831a540c12019c560cc19abf7abe8785d0e0e/stock_barcode/models/stock_move_line.py#L58-L61 In turns, the picked state of the move will be set to picked: https://github.com/odoo/odoo/blob/7bc38562f1988ba15525c04168e30c06a8f1d33c/addons/stock/models/stock_move.py#L208-L212 Now, editing the qty done of the move once more from 1 to 0 to reset the reservation will not revert the process for 2 reasons: 1. The quantity of the move line will be reset form its current value to 0, altering the demand of the barcode line to 0. 2. Even if the move line was unpicked in this process, the picked compute method of the move will never reset the picked state as the compute method can only set a True value. We therefore end up with a picked move without any picked move line and for which one of the picked move line has a quantity of 0. Now, leaving the barcode app will launch the split_uncompleted_moves method in order to not lose the changes made to the record and since the move is picked for the wrong reason, the move will be splitted in 2 instead of escaping the split process. https://github.com/odoo/enterprise/blob/e8c831a540c12019c560cc19abf7abe8785d0e0e/stock_barcode/models/stock_move.py#L21-L22 Community: https://github.com/odoo/odoo/pull/200167 opw-4600565 Forward-Port-Of: odoo/enterprise#81744 Forward-Port-Of: odoo/enterprise#80675