Friday, June 7, 2024
12 changes · 17.0
Resolved issues and error corrections
Fixed an issue where WhatsApp message templates were displaying selection field codes (like 'out_invoice') instead of their user-friendly labels (like 'Customer Invoice'). This ensures customers see meaningful text in WhatsApp messages rather than technical identifiers, improving communication clarity.
Original PR description
Problem:
When a selection field is mapped in a template variable, its key is returned instead of its value. E.g. a selection field is mapped in a template variable whose one of the selections is `('out_invoice', 'Customer Invoice')` then `out_invoice` will be returned instead of `Customer Invoice`.
Technical Problem:
The function `_find_value_from_field_path` of the class `BaseModel` is used to get the value of the template variable. This function uses `.mapped()` to get the template's variable value which returns the key instead of the value whenever the last field of the chain is a selection field.
Solution:
The `last_field_of_chain` and `last_model` are obtained using `field_path`. If `last_field_of_chain` is of the selection field then the function `convert_to_export` of the `Selection` class is used to get the value of the selection field by using the key obtained in the `field_value` and the `last_model`.
Task-3964078
Forward-Port-Of: odoo/enterprise#63695This fix corrects a rounding error in the German DATEV tax export when early payment discounts are applied to invoices. Previously, the system was calculating early payment discount amounts as 5.68 instead of the correct 5.67, which could cause discrepancies in exported accounting records. The fix ensures accurate financial reporting for German companies using early payment terms.
Original PR description
Configure 'Cash Discount Tax Reduction' on 'On early payment' Have a payment term [TERM] configured with 2% discount for early payment Create a [BILL_1] with: - partner: [DEMO] - payment terms: [TERM] - invoice line: qty 1, unit amount 161.10, tax 19% Create a [BILL_2] with: - partner: [DEMO] - payment terms: [TERM] - invoice line: qty 1, unit amount 77.50, tax 19% Create a bank statement with: - partner: [DEMO] - amount -278.27 - label: test Reconcile the bank statement with the 2 bills, the system will create 2 epd lines: - Discount line with credit 4.77 - Discount line tax with credit 0.90 Go to General Ledger Export "DATEV (ZIP)" and check accounting_entries.csv Issue: Early payment line amount will be 5.68 instead of 5.67 Similar to https://github.com/odoo/enterprise/commit/111cf205d91a1c8f46bc8d3f7b96b6dbfac7071b opw-3801374 Forward-Port-Of: odoo/enterprise#63799 Forward-Port-Of: odoo/enterprise#62910
This update repositions the date field to the top of POS receipts in Chile to comply with local legal requirements. The change ensures that receipts generated by the system now meet Chilean regulatory standards for document formatting.
Original PR description
The chilean law requires the date to be on top of the receipt. This is now the case. Community PR: odoo/odoo#168270
This fix resolves an issue where the document preview would unexpectedly jump back to the first file when changing a file's owner. The problem occurred because the preview switching logic didn't properly distinguish between intentional preview changes and automatic component updates. Now the system correctly maintains the currently selected document preview even when file properties are modified.
Original PR description
To reproduce the Issue: - Preview any file. - Switch the file preview by clicking the NEXT button twice or thrice. - Now change the owner of the file. - The preview, switches back to the file you…
To reproduce the Issue: - Preview any file. - Switch the file preview by clicking the NEXT button twice or thrice. - Now change the owner of the file. - The preview, switches back to the file you chose to preview at first. Reason: - Just as we change the owner of the file, the Component is rendered again, triggering the `onWillUpdateProps`. - At this moment, the value inside the `nextProps.startIndex` is the value, which was set the first time we clicked a file to preview it. It is not equal to the index of the file currently previewed (`this.state.index`). - Hence, the LOC `this.activateFile(nextProps.startIndex)` executes and switches the preview back to the file present at the `startIndex`. ref. to, where the values of the `previewStore` (including the `startIndex`) are set: https://github.com/odoo/enterprise/blob/saas-16.4/documents/static/src/views/hooks.js#L330-L334 After this commit: - As we select multiple documents, and try to switch the preview from the `DocumentsInspector`, we now compare the current index with the index of the file we wish to preview. The record (`DocumentsKanbanRecord`) of the file (to switch the preview to) is already set as the `selectedDocument` before this Component is rendered. refer - https://github.com/odoo/enterprise/blob/saas-16.4/documents/static/src/views/hooks.js#L296-L298 - While updating the values inside the `DocumentsInspector` we no longer the face the issue of the preview switching to another document Task-3599129 Forward-Port-Of: odoo/enterprise#55957
This fix restores the draft button functionality on received vendor bills in the Mexican localization module. Previously, users were unable to see or use the draft button when working with vendor bills received through the EDI system, which prevented them from reverting bills back to draft status when needed.
Original PR description
Button draft was not display on received vendor bills. opw-3903120
This fix resolves a crash that occurred when creating database indexes with SQL expressions. The system now properly handles SQL objects as index expressions, preventing errors during the logging of database schema changes. This ensures database operations complete successfully without interruption.
Original PR description
When creating an index via `create_index` or `create_unique_index` the `expressions` parameter can be an `SQL` object, but would crash during logging of the schema change, as it expects `expressions` to be a `str`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed a bug where the payment term preview was not displaying when a payment term had only one line. Previously, the preview would only appear after adding a second line. Now users can see the payment term preview immediately with just one line configured.
Original PR description
BEFORE (runbot 30/05/2024): https://github.com/odoo/odoo/assets/56789189/81f717b0-29c2-4ae5-8fc0-89b8c6fbf6b4 AFTER: https://github.com/odoo/odoo/assets/56789189/acd9777c-bb46-4aff-a7a9-4f389768fc55 STEP TO REPRODUCE: -Create a payment 15 days after invoice date with one payment term line only -The preview of payment term now should be display on the right bottom corner but it doesn't until we create a second line for it FIX by correct computation of 'example_invalid' will now become True if none lines found 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
This fix corrects how the system determines when the company data setup onboarding step is complete. Previously, the system would mark this step as done even if users only opened it without entering any information. Now, users must fill in at least the street field before the step is considered complete, matching the behavior from the previous version and ensuring proper data collection during onboarding.
Original PR description
-PROPBLEM: one of the common onboarding step is setup company data where we will fill street, country or phone,... . Currently, when doing that step, the system always considers done eventhough we just open it and do nothing, unlike behavior in v16 where we will need to fill 'street' at least to be able to consider done -Solution is to do same like in 16.0, check if 'street' then we will consider the setup company data onboarding is finish https://github.com/odoo/odoo/blob/16.0/odoo/addons/base/models/res_company.py#L336-L338 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
This pull request contains multiple bug fixes across several Odoo modules including mail header formatting, time off date handling, blog filtering display, website metadata, and web editor link functionality. These fixes address issues with email delivery reliability, date picker accuracy, result counting, and content editing behavior to improve overall system stability and user experience.
Original PR description
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
The HR Attendance Kiosk interface now displays in the company's preferred language instead of defaulting to English. This allows employees at companies using non-English languages to see the attendance kiosk in their own language, improving usability and accessibility for international teams.
Original PR description
Currently, no language was passed to the HR Attendance Kiosk, so it would default to English. This change passes the language of the company partner to the kiosk mode in order to allow companies having the portal in their own language. task-3976591
This fix corrects how optional products are positioned when added to quotations created from templates. Previously, optional products were always inserted at a default position rather than at the end of the quotation, which could result in incorrect product ordering. The fix ensures optional products are now properly sequenced to appear after all existing products.
Original PR description
Steps: - Create a quotation template with 2+ products and optional products. - Create a new quotation using the template. - Add an optional product from the template. Issue: - Optional product is not added at the end of the quotation. Cause: - Optional product sequence defaults to 10 instead of continuing the sequence. Fix: - Adjust the sequence of added optional products in add_order_button to be the max sequence + 1. opw-3932966 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix corrects an issue where the received quantity on purchase orders was not updating properly when stock receipts were modified. When users unlocked a stock picking and changed the received quantity, the purchase order line would not reflect these changes. This update ensures that received quantities are now calculated and displayed correctly on purchase orders.
Original PR description
**Description of the issue/feature this PR addresses:** Wrong depends on _compute_qty_received of the purchase.order.line. **Current behavior before PR:** 1. Create a new purchase order.  2. Receive the products.  3. Unlock the stock picking and change the received quantity.  4. The received quantity on the purchase order is not updated.  **Desired behavior after PR is merged:** The received quantity of the purchase order is updated correctly. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr