Daily updates from Odoo
Saturday, March 9, 2024
22 changes · saas-17.1
Enhancements to existing features
This update enables Italian businesses to correctly handle Internal Reverse Charge invoicing, aligning with local tax regulations. It automatically maps tax rates and exemptions, generates necessary tax integration XMLs for submission to the tax agency, and improves invoice import processes for Italian VAT transactions.
Original PR description
Add support for Internal Reverse Charge invoicing flows in Italy. - Add 0% sale taxes and purchase taxes targeting `VJ` grids in `l10n_it` for every Tax Exemption Reason involved (Scrap, Gold...) -…
Add support for Internal Reverse Charge invoicing flows in Italy.
- Add 0% sale taxes and purchase taxes targeting `VJ` grids in `l10n_it` for every Tax Exemption Reason involved (Scrap, Gold...)
- Add a Fiscal Position (equivalent to the Belgian "CoContractant" one) mapping the sale tax and purchase taxes to their Reverse Charge corresponding taxes. Those fiscal positions all have a different law-required note (with the law reference) that has to be printed on the PDF invoice through Odoo standard mechanisms.
- The way we compare the invoice features and each document type requirements has been revised and expanded for the tax_tags sets case. Now it should also avoid comparisons after the first failure, instead of doing all the comparison anyway.
- Imported vendor bills that have `TD16, TD17, TD18` now have their 0% reverse charge sale taxes converted to their purchase 22% VAT reverse charge corresponding tax impacting `VJ` tax grids, following this mapping:
```
Sale tax examption reason -> VJ grid targeted by purchase tax
N3.2: VJ3
N3.3: VJ1
N6.1: VJ6
N6.2: VJ7
N6.3: VJ12
N6.4: VJ13
N6.5: VJ14
N6.6: VJ15
N6.7: VJ16
N6.8: VJ17
```
- Vendor bills that have taxes targeting grids `VJ6, VJ7, VJ8, VJ12, VJ13, VJ14, VJ15, VJ16, VJ17` are exported as Tax Integrations XMLs to be sent to the Tax Agency with the document type `TD16`
- Vendor bills that have taxes targeting grid `VJ3` are exported as Tax Integrations XMLs to be sent to the Tax Agency with the document type `TD17`
- Vendor bills that have taxes targeting grid `VJ9` are exported as Tax Integrations XMLs to be sent to the Tax Agency with the document type `TD18`
Link: https://www.odoo.com/web#model=project.task&id=3724926
task-3724926
Forward-Port-Of: odoo/odoo#153556Resolved issues and error corrections
This update resolves a crash that occurred when replying to messages within the Discuss app, specifically when using the Odoobot chat. The fix prevents a rendering issue caused by temporary message data, ensuring stable message sending and receiving. This improves the reliability of the Discuss app for all users.
Original PR description
Before this commit, when replying to a message from Odoobot DM chat, there was the following crash: ``` Caused by: TypeError: Cannot read properties of undefined (reading 'toLocaleString') at get…
Before this commit, when replying to a message from Odoobot
DM chat, there was the following crash:
```
Caused by: TypeError: Cannot read properties of undefined (reading 'toLocaleString')
at get datetimeShort
```
Steps to reproduce:
- install mail
- Open Discuss app as Marc Demo
- Open OdooBot chat
- Click "Reply" on 1st message of OdooBot
- Send the message
=> Crash
This happens because when sending a message, it shows the temporary
message locally until the data of genuine message on server is
received. Visually temporary message and genuine message are the
same, but technical there's a juggle where temporary message exists
while the genuine message is not created, and finally this is
deleted on creating the genuine message from message post.
When the network is slow (fast 3g), it's possible that temporary
message exists while rendering `Thread` component, and during this
rendering the temporary message is deleted.
Normally OWL should detect that and cancel ongoing rendering fiber,
so that the `Thread` does NOT render reactive stuffs that exist no
more, like the temporary message.
However, this behaviour does not seem to work in this exact scenario.
After investigation, it looks like Components with slots are not
propagating the cancelling of fiber as expected. As a result,
message can no longer exist but it's still rendered by the
`ActionSwiper` (default) slot.
This commit adds a `t-if` guard inside the `ActionSwiper` default
slot as to not render if the message no longer exists.
This is a genuine bug of OWL that is hard to reproduce, therefore
a quick fix is made before having a proper OWL fix.
opw-3775992This update resolves an issue where users could incorrectly select personal stages when creating sub-tasks within the portal. Now, sub-tasks created from tasks automatically use the correct project stage, ensuring tasks are organized according to the project's workflow. This improves the accuracy and efficiency of task management within the portal.
Original PR description
When creating a sub-task from a task form view in portal, the domain of the stage should exclude personal stages and include only the one of the project. taskid:3551354 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#156580 Forward-Port-Of: odoo/odoo#142555
This update streamlines the redirection process for blog posts within the Odoo website. The change simplifies the handling of URL parameters, making the system more efficient and easier to maintain. This improves the overall user experience by ensuring faster and more reliable access to blog content.
Original PR description
Don't try to keep extra params and co. Keep it simple... Else we should pop from request.params `blog` and `post` keys because now they are converted as query param with the slug format: /blog/name-1/post-1?blog=blog.blog(1,)&question=blog.post(1,) Forward-Port-Of: odoo/odoo#156890
This update clarifies the testing process for our Invoicing localization (l10n_in) module. The code was reorganized to separate related files, making it easier to maintain and test. This change includes new test cases to ensure accurate handling of invoices, particularly regarding tax and GST treatment, improving the overall reliability of the invoicing process.
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 Forward-Port-Of: odoo/odoo#153773
This update resolves a memory issue in the stock delivery process that occurred when handling a large number of stock move lines. By optimizing the data retrieval process, the system now performs faster, reducing processing time from 4.77 seconds to 3.50 seconds. This improvement ensures smoother and more efficient stock delivery operations.
Original PR description
compute_packages method fetches all columns for stock_move_lines and its result_package_id. If stock_move_lines are a big number, it causes memoryerror. Pre fetch only the required fields. Also its better to use _read_group then search count in a loop. ``` select COUNT(*) from stock_move_line +---------+ | count | |---------| | 2546604 | +---------+ ``` While fetching 4000 records. time before: 4.77s time after: 3.50s 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#154150
This update corrects a technical issue in the Odoo Point of Sale Stripe integration. The change ensures the system handles missing payment data correctly, preventing a JavaScript error that could disrupt payment processing. It also incorporates best practices from Stripe documentation regarding Canadian payment methods.
Original PR description
According to stripe documentation, the `card_present` attribute can be nullable, see: https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present https://docs.stripe.com/api/payment_methods/object#payment_method_object-card_present As a consequence, if it is not given, card_present values would be undefined which create a JS traceback when the `brand` attribute is get. It also looks like Canada can give the brand under a different key `interac_present`: https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-interac_present If the `card_present` key is missing, we'll try to read it from there opw-3752751 Forward-Port-Of: odoo/odoo#156009 Forward-Port-Of: odoo/odoo#155702
This update corrects a bug where the Peppol verification process was incorrectly validating partners without PEPPOL EAS or endpoint details. Previously, users could initiate verification even without this information, leading to inaccurate results. Now, verification only runs when PEPPOL details are present, ensuring data integrity.
Original PR description
If a partner doesn't have peppol eas or endpoint set, we still go through with checking participant's registration. This is not an issue if checking on a partner form, as the Verify button is invisible without these details being filled in. However, in the partner list view the button is always visible and it is possible to run verification for non-peppol customers. As a result, all of them show up as valid Peppol participants. With this commit we only run verification if there are eas and endpoint details. opw-3784945 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156973 Forward-Port-Of: odoo/odoo#156877
This pull request addresses a minor error in the French language translation for Odoo. A mistake was identified and corrected within the l10n_fr localization files. This ensures accurate and consistent French translations for users.
Original PR description
During this commit: https://github.com/odoo/odoo/commit/8bee46f117b1e6822429e8688f70cb27cc237bb4 We have translated the l10n_fr localisation, but we made a mistake on a line. This PR will correct the translation issue Task: 3792865 opw-3754691 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157027
This update resolves an issue where employee phone numbers weren't being properly recorded when creating employees from signed applications. Now, the system automatically copies either the phone number or mobile number to the employee's information, ensuring accurate data capture. This improves the reliability of employee records.
Original PR description
When an employee is created from a signed application, the phone number or the mobile number was not copied to the employee private information. Now, the phone number is copied and if not present, the mobile number is copied. Task: 3659409 Forward-Port-Of: odoo/odoo#156538 Forward-Port-Of: odoo/odoo#152888
This update resolves an issue where branch companies in Point of Sale couldn't utilize the fiscal positions of their parent companies. Now, branches can seamlessly use their parent's fiscal settings, streamlining accounting and reporting within Point of Sale. This improves accuracy and simplifies processes for businesses with multiple branch locations.
Original PR description
**Before PR:** - In the point-of-sale, when a company had branches, - The branch company was unable to use the fiscal position of its parent company. **After PR:** - The branch company can now use the fiscal position of its parent company in the point-of-sale. Task ID: 3775865 Forward-Port-Of: odoo/odoo#156676
This update resolves a crash that occurred when using the 'Sales Order' button within the project update feature. The issue stemmed from a null value being passed to the system, causing an error. This fix ensures the button functions reliably, preventing disruptions to users updating project statuses.
Original PR description
Step to Reproduce : -> Create product: Project & task -> Create SO > Add product > Confirm it -> Go to Newly created project > Project update > Sales order -> Click on the project stat button > again go to project status > Sales Order -> Crash it Before these commit: -> Clicking on so stat button in project update caused a traceback error that null value is not defined. -> When we are passing the context It was observed that create key has null value in that context. -> In sale_project if create_for_project_id has a null value then create key also have null value. After these commit: -> So if we set False in the context, If we get null value of create key it is set to False. task- 3586341 Forward-Port-Of: odoo/odoo#153780
This update corrects a technical issue in the Purchase Dashboard by removing a hardcoded date. Previously, the dashboard used an outdated date format, which could cause inaccurate reporting. This change ensures the dashboard consistently uses the current date, improving data accuracy and reliability.
Original PR description
Replace the hardcoded date "09-15-2022" in the list domain by `context_today().strftime(\"%Y-%m-%d\")` The domain is now stringified since it contains a dynamic value which is not valid in a json file. Task: 3756934 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156550
This update fixes an issue where product expiry reports weren't correctly formatting ZPL labels. The previous fix only updated the data structure, but didn't update the underlying template. This change ensures accurate barcode generation for product expiry labels, improving inventory tracking accuracy.
Original PR description
The previous fix ae3ec529c77779d08e5e1728a0c4a6afa5cb8bcf introduced a dict to display the values required in the zpl label template. This change didn't also update the template inheriting this one, hence the need for this fix. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157106
This update fixes an issue where time sheet entries linked to projects using global time off were incorrectly included in time off calculations. The change ensures that time sheet entries are only considered for global time off when they are directly associated with that type of time off. This improves the accuracy of time off reporting.
Original PR description
Fix to avoid considering TS lines for projects linked to global time off Forward-Port-Of: https://github.com/odoo/odoo/pull/156338 Forward-Port-Of: odoo/odoo#157108
This update resolves an issue where keyboard navigation within slideshows wasn't working immediately after the slideshow opened. Users now can directly use left, right, and escape keys to control the slideshow. Additionally, a minor code correction was made to ensure proper accessibility attributes.
Original PR description
When a slideshow opens, the keyboard events don't work right off the bat. You first need to click on one of the arrows before being able to interact with the keyboard, which defeats the purpose. We also correct the attribute `aria-labbelledby` (both wrongly spelled and wrongly used) to `aria-label`. (A [previous commit] already corrected it in 16.0.) Steps to reproduce: - Drop an Images Wall snippet and save. - Click on an image: the slideshow appears. => Pressing left, right or escape doesn't work. - Switch to the next image. => Pressing left, right or escape now works. [previous commit]: https://github.com/odoo/odoo/commit/d36c14e346f1b2ce3c8e4218c3dfaaa2d2a1db4a Forward-Port-Of: odoo/odoo#156889 Forward-Port-Of: odoo/odoo#155724
This update corrects a technical issue where codes within the Italian EDI XML invoice templates were being unnecessarily translated. This change ensures consistency and prevents potential errors when these templates are used by Italian tax agencies or internal users. It maintains the integrity of the XML format and avoids unnecessary complexity.
Original PR description
Codes like "Exch.Rate" in the Italian EDI XML template for invoices were translated. They shouldn't be, as they have pretty short char limit and it's risky to people change that. The XML users are either domestic or the Italian Tax Agency itself, so no point in translating "Divisa" into "Currency" anyway. Link: https://www.odoo.com/web#model=project.task&id=3627379 opw-3627379 Forward-Port-Of: odoo/odoo#156987 Forward-Port-Of: odoo/odoo#153111
This update resolves an issue where users couldn't correctly link sales orders to company contacts when using the timesheet recording feature. The fix ensures the system accurately identifies the correct partner ID based on company versus individual contact information, allowing for proper order selection.
Original PR description
Steps to reproduce:
- Create a new company contact and add a contact inside that company
- Create two service product that are service with following config:
- Invoicing policy: Based on Timesheets
- Create on Order: Project & Task
- Make an SO for the contact inside the company with the two service in
the order
- Confirm the SO
- Click on the smart button "Recorded"
- Click on new
- Click on new line at the "Sale Order item" column
Issues:
The list display "No records"
Solution:
Make sure that we search with the correct attributes, before we were
trying to match partner_id and commercial_partner_id.
Although similar in our case they are not equal as commercial_partner_id
represent the company and partner_id represent the individual.
opw-3750939
Forward-Port-Of: odoo/odoo#156471This update resolves a bug where selecting a product tag on the product shop would incorrectly select the associated category. The issue stemmed from conflicting IDs within the website's code. The fix renames the tag's ID to 'tag_15' to avoid this conflict and ensure tags correctly select categories.
Original PR description
To reproduce: ============= - create a `product.public.category` -> (id = 15 for example) - create a `product.tag` with same id as the created category - create two products, one with the category…
To reproduce: ============= - create a `product.public.category` -> (id = 15 for example) - create a `product.tag` with same id as the created category - create two products, one with the category and the other with the tag - go to the shop and make sure to have the categories positioned on left (by default they are on top) - select the tag (by clicking on the label not the checkbox) -> the category is selected Problem: ======== with this configuration the checkbox of the category has `id=15` attribute and the tag has `id=15` attribute too. so when we click on the tag label and thanks to the `for=15` attribute of the label, we will trigger click event on `input#15` which is the category checkbox because it's the first one in the DOM. Solution: ========= set id of the tag to `tag_15` and the for attribute of the label to `tag_15` to avoid the conflict with the category checkbox. opw-3759654 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156940
This update ensures that websites remain accessible to public users even after a company is archived. Previously, archiving a company linked to a website would break website access. This change corrects a potential disruption to website functionality for customers and users.
Original PR description
This commit prohibits the archival of a company if it is associated with a website. Otherwise, the website wouldn't be accessible anymore by public users (and so by all users if they need to login). Step to reproduce: - On website 2, change the company from SF to Chicago - In the website list view (in debug mode), reorder the websites so website 2 is the first one in the tree view - Archive the Chicago company (from debug > companies and do it from the list view) - Try to access the website/runbot from an incognito tab - It will show a raw 403 error Note that the companies can only be archives since Odoo 16, thanks to this commit: https://github.com/odoo/odoo/commit/7d0996bb151f68647b22719eee5ed4a4c35574bb opw-3749772 Forward-Port-Of: odoo/odoo#156988 Forward-Port-Of: odoo/odoo#156470
This update resolves a bug that occurred when repeatedly clicking the 'Contact Us' link in edit mode. The fix ensures the link editing functionality works reliably by addressing a timing issue related to how the link tool widget is initialized. This improves the user experience for editing website content.
Original PR description
Steps to reproduce: - Go to website (Homepage) > Switch to "Edit" mode. - double-click the "Contact Us" button in the header or keep clicking it many times > Traceback: Cannot read properties of…
Steps to reproduce: - Go to website (Homepage) > Switch to "Edit" mode. - double-click the "Contact Us" button in the header or keep clicking it many times > Traceback: Cannot read properties of undefined (reading 'find')... After converting the `linktools` widget to Owl in [1], the DOM element of the component [2] was retrieved in an async process after it was mounted, (some legacy code can trigger the instantiation of the `linktools` when its parent component is not in the DOM and `this.linkComponentWrapperRef.el` won't be returned, see: `Link` > `onMounted`). When double-clicking the link, This implementation will lead to a race condition where the `onWillUpdateProps()` (mainly triggered by the click to focus the URL input...) will try to access the DOM element from [2] before being correctly set in `onMounted()`. The goal of this commit is to fix this behaviour by simply waiting for `onMounted` changes to be done before doing any adaptation on the `linktools` DOM. [1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997 opw-3706902 Forward-Port-Of: odoo/odoo#155418
This update corrects a technical issue that prevented the 'Save current search' option within the filters dropdown from being translated. The change ensures that all users can see the filter option in their preferred language, improving the user experience and localization support. This was a necessary fix following a recent code refactoring.
Original PR description
Due to a refactor of the code in [1], the string "Save current search" in the filters dropdown was not translatable anymore. This commit fixes that, so it is translatable again. [1] 976491e01272336bc34abcdcec2718f83e19c5fc --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156946 Forward-Port-Of: odoo/odoo#156915