Tuesday, April 9, 2024
35 changes
Enhancements to existing features
The 'Apply Now' button on job postings has been optimized to use job names instead of ID numbers in URLs. This change eliminates unnecessary page redirects that were slowing down the application process, making it faster and more efficient for candidates to apply for positions.
Original PR description
-Same behaviour as [1] we should use slug(job) instead of job.id 1: a2c6ddf8158bf40f13b5c5a8b89deb3d2ae8af6b 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#160809 Forward-Port-Of: odoo/odoo#160622
Resolved issues and error corrections
This fix corrects an issue where journal entries created from company-paid expense reports were all assigned the same date, regardless of when individual expenses occurred. Now each journal entry will properly reflect the actual date of the corresponding expense, ensuring accurate financial records and better audit trails.
Original PR description
Before when we create an expense report paid by company with multiple expenses of different dates then we posted the expense report. The journal entries had all the same date. Now journal entries will match the date of the expense when it is an expense paid by company. Signed, Logan Staelens lost@odoo.com https://github.com/lost-odoo Forward-Port-Of: odoo/odoo#159083
This update improves the error messages displayed when users encounter issues on public discussion pages. Instead of cryptic technical errors that are difficult to understand and report, users will now see clearer, more user-friendly messages that help them better understand what went wrong.
Original PR description
Before this PR, the error displayed in the public page was quite cryptic. It was hard for the user to understand that error and even harder to report it if needed. This PR makes the error more user friendly. task-3850559
This fix resolves an issue where document headers in boxed layout PDFs were overlapping and cropping the body content on pages after the first page. By reducing unnecessary whitespace in the header design, the header now fits within the standard page margins, ensuring all document content displays correctly across all pages.
Original PR description
### Steps to reproduce issue: 1. Select a boxed layout document 2. Create an invoice and add lines until the pdf version is on two pages 3. Print the pdf 4. On every page except the first one, the body of the document is cropped by the header ### Explanation: The PDF consists of three parts: the header, the footer and the body, and they are added separately. The body is delimited by the paper format and margins. Those do not depend on the size of the header and the footer. In the boxed layout, the height of the header is bigger than the default size of the top margin of the body. Because of that, it covers a part of the body. ### Suggested fix: By removing some whitespace, the header size has been reduced to a size smaller than the default margins of the document while keeping every information readable. opw-3768511 Forward-Port-Of: odoo/odoo#160770 Forward-Port-Of: odoo/odoo#159125
This fix corrects a language inconsistency on the email unsubscribe page where some text was displaying in the user's language instead of the website's language. The fix ensures all content on the unsubscribe page displays in the correct language by properly setting the language attribute, providing a consistent user experience for customers in different regions.
Original PR description
### Steps to reproduce issue: 1. Download two languages, set one as the user's language, the other as the website's 2. Make sure MailHog is running 3. Create a Mailing Contact with two different…
### Steps to reproduce issue: 1. Download two languages, set one as the user's language, the other as the website's 2. Make sure MailHog is running 3. Create a Mailing Contact with two different Mailing Lists 4. Create a mail with a link to unsubscribe 5. Send mail to one of the Contact's Mailing lists 6. Through MailHog, click on the subscription cancelling link 7. The first line is in the user's language and the others in the website's language ### Explanation: While most of the webpage originates from an XML file, translated using the language of the website. https://github.com/odoo/odoo/blob/2ad911dab1f34b1b6dda1016cc189f0fea64b12c/addons/mass_mailing/views/mass_mailing_templates_portal.xml#L118 The first line is passed through javascript and translated on the fly. https://github.com/odoo/odoo/blob/efd178daee689192d4e930a075475587038b3e0d/addons/mass_mailing/static/src/js/unsubscribe.js#L50-L55 The line is translated thanks to an object fetched at the load of the page. The url where the object is located can receive parameters including the language, but defaults to the user's and is not set in our case. https://github.com/odoo/odoo/blob/0ca2ca9e8914dda77166b62dc8c2e9dc1ca1d3a4/addons/web/static/src/legacy/js/core/translation.js#L73-L78 ### Suggested fix: The language can be passed through the attribute `lang` of the document. https://github.com/odoo/odoo/blob/658bc65b22dba86a35f6bba0f892427e1be4aed1/addons/web/static/src/legacy/js/core/session.js#L205-L211 https://github.com/odoo/odoo/blob/e251354ce4b7df1763247385413e98f975981479/addons/web/views/webclient_templates.xml#L10 This option is already used in `website` and, [since 16.0](https://github.com/odoo/odoo/commit/5136ac7e4daaadda396c45c8538a81f8d6c44c0e), is inherited once `website` is installed. https://github.com/odoo/odoo/blob/c3c8003c6d1c4d694531c93e803e7e9cd7ebaa83/addons/website/views/website_templates.xml#L39-L50 opw-3748027 Forward-Port-Of: odoo/odoo#160697 Forward-Port-Of: odoo/odoo#159341
Fixed a visual bug where spaces between rating icons would disappear when users changed the score in the rating snippet. The issue was caused by a jQuery library update that changed how HTML tags are processed. The fix ensures proper spacing is maintained between icons regardless of score changes.
Original PR description
To reproduce the issue: -Drag and drop the rating snippet. -Change the score from options. -Notice that spaces between icons disappear. Specification: In the release notes[[1]](…
To reproduce the issue: -Drag and drop the rating snippet. -Change the score from options. -Notice that spaces between icons disappear. Specification: In the release notes[[1]]( https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/) of jQuery 3.5.0, it's stated that security fixes related to the HTML parser were implemented. Consequently, self-closing e.g. `<i/>` tags inside function arguments were replaced with e.g. `<i></i>`. As a result, trailing spaces lost significance, causing icons to stick together. Prior to Odoo 16.2, jQuery 3.3.1 was utilized, which allowed the use of self-closing tags in the append function. This behavior was as expected.However, starting from Odoo 16.2, jQuery version 3.6.3 was adopted. After this PR: Instead of using self-closing `<i/>` tags, `<i></i> ` with a trailing space was used. This trailing space gained significance due to the prefilter no longer ignoring it. Consequently, icons no longer stick together after changing the score. task-3576760 Forward-Port-Of: odoo/odoo#160061
Mauritius phone numbers were not being recognized correctly, causing WhatsApp messages to fail with an "Invalid number" error. This fix updates the phone number parsing library to properly handle Mauritius phone numbers, allowing users to successfully send WhatsApp messages to contacts in Mauritius.
Original PR description
When the user adds a valid Mauritius phone number, it is not correctly parsed by the phonenumbers library, resulting in a user error while sending a WhatsApp message to that number. Steps to produce: - Create a new contact with the Mauritius country selected. - Add a phone number (e.g., '+23057654321'). - Try to send WhatsApp messages using this phone number. - This will throw an Invalid number error. Problem: `phonenumbers==8.12.1` python library is used in odoo for parsing phone numbers. The `8.12.1` version is too old and cannot parse Mauritius phone numbers correctly. Solution: The `8.12.13` version accurately parses Mauritius phone numbers. Currently, The latest version of the phonenumbers library is `8.13.31`. Hence, the latest code from the latest version of the phonenumbers library is monkey-patched into the system. Task - 3799632 Forward-Port-Of: odoo/odoo#160956 Forward-Port-Of: odoo/odoo#157504
This fix improves the reliability of deleting messages and attachments in the mail system. Previously, items would disappear from the user's screen before being confirmed deleted in the database, which could cause confusion if the deletion failed. Now the system confirms the deletion in the database first before removing items from the screen, ensuring a more reliable user experience.
Original PR description
**Current Status** - when remove attachment or message, The system will perform deletion on the interface before performing deletion in the DB. However, in some situations, exceptions will occur during the deletion process. So it will happen that the attachment or message has been deleted on the interface but still exists under the database. From a function that helps optimize user experience, it will cause a worse situation with user experience **Solution** - Make rpc calls before deleting messages or attachments on the interface 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 an issue where inventory quantities were being recorded in incorrect locations when processing subcontracted purchase orders. When a destination location was changed during receipt processing, the system was incorrectly updating the subcontractor's location, causing inventory to appear in vendor locations instead of the intended warehouse locations. The fix ensures that subcontractor location assignments are preserved during the order fulfillment process.
Original PR description
**Steps to reproduce:** - Install mrp and purchase - Go to "Inventory / Configuration / Settings" - Activate "Storage Locations" - Go to "Inventory / Configuration / Warehouse Management / Operations…
**Steps to reproduce:**
- Install mrp and purchase
- Go to "Inventory / Configuration / Settings"
- Activate "Storage Locations"
- Go to "Inventory / Configuration / Warehouse Management / Operations Types"
- Edit "Receipts" type by activating "Show Detailed Operations"
- Go to "Manufactoring / Configuration / Settings"
- Activate "Subcontracting"
- Create product: (e.g. Product XYZ)
* Product Type: Storable Product
- Create a BoM for Product XYZ:
* BoM Type: Subcontracting
* Subcontractors: [any] (e.g. Azure Interior)
- Create a PO:
* Vendor: Azure Interior
* Products: 2 x Product XYZ
- Confirm the PO
- Open the picking from PO via the Receipt smart button
- In "Operations" tab, set done to 1
- On the picking form, change the destination location (e.g. WH/Stock/Shelf1)
- Save
- In "Detailed Operations" tab, a line should have appeared
- Select the same destination location on that line (i.e. WH/Stock/Shelf1)
- Validate the picking and create a backorder for the remaining quantity to produce
- Go to "Inventory / Reporting / Locations"
- Check the locations of Product XYZ (Search Product: XYZ - Group by: Location)
=> The "On Hand Quantity" for Product XYZ is as followed:
* Virtual Locations/Production: -1.00 (correct)
* WH/Stock/Shelf1: 1.00 (correct)
- Open the backorder picking from PO via the Receipt smart button
- Record the production of the remaining unit
- Validate the picking
- Go to "Inventory / Reporting / Locations"
- Check the locations of Product XYZ
**Issue:**
The "On Hand Quantity" for Product XYZ is as followed:
* Partners/Vendors: -1.00 (incorrect, it should be empty)
* Physical Locations/Subcontracting Location: 1.00 (incorrect, it should be 0.00)
* Virtual Locations/Production: -2.00 (correct)
* WH/Stock/Shelf1: 2.00 (correct)
**Cause:**
When the PO is confirmed, the stock picking and the stock move are created, they both have the same source and destination locations.
However, in an overridden method from "mrp_subcontracting" module, a check is performed on the move to determine if it is a subcontract.
If it is the case, its source location is set to the subcontractor location and so, the source location of the picking and the move is not the same anymore.
When the destination location is changed on the picking, an onchange is triggering an update of the destination location AND the source location of the move to the values coming from the picking, erasing the subcontractor location set on the move.
The issue only happens for the backorder, because the source location update is not propagated to the stock move lines.
In the case of the original picking, the move lines were already created with the subcontractor location as source location.
But when the backorder is created, the move lines are created with the values coming from a move without the subcontractor location.
**Solution:**
Do not propagate "location_id" from the picking to the subcontracting moves.
opw-3777379
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#160970
Forward-Port-Of: odoo/odoo#158442This update corrects how website metadata displays the site name in social media previews. Previously, the site name was incorrectly showing the company name instead of the actual website name, which caused problems for businesses running multiple websites. Now the correct site name will appear when content is shared on social media platforms.
Original PR description
This commit fixes the 'og:site_name' metadata, which previously defaulted to the company name (see [1]), causing issues for multi-site setups. Now, the metadata actually uses the site name. Steps to reproduce: - Navigate to any page - Right-click and select "View Page Source" - In the <head> section, observe the meta property "og:site_name" set to "MyCompany". [1]: https://github.com/odoo/odoo/commit/156955de6b4e6288ac606d29b843081842154eff opw-3791082 Forward-Port-Of: odoo/odoo#160454