Friday, December 15, 2023
5 changes · master
Resolved issues and error corrections
This fixes how Odoo calculates certain percentage-based taxes used in Brazilian accounting, especially when taxes are included in the displayed price. Businesses using these tax rules should see more accurate invoice and order totals, reducing accounting errors and manual corrections.
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
Pinterest shares now use the image of the product variant selected by the shopper, such as the black desk instead of the default white desk. This makes shared product links more accurate and improves the customer experience when promoting products on social media.
Original PR description
Steps to reproduce the issue fixed by this commit: - Go on /shop - Click on the Customizable Desk product - Click on the Black variant - Share the product on Pinterest => The image shared is the white desk instead of the black one. This commit updates the image shared to the one of the variant. Unfortunatly, for other social networks, we can't use the variant image because they don't take an image/media parameter in their sharer url. They simply crawl the page and take the image in the meta tag and our JS code can't change this meta tag dynamically. The server cannot know which variant is selected because it's in the fragments part of the url. task-3485494
This fix stops Odoo from saving the open or folded state of live chat windows that are temporary or about to be closed. It prevents errors when visitors fold a new chat before sending a message and avoids unnecessary server updates during chat closure.
Original PR description
Since [1], the fold state of the live chat is stored on the server. However, this save is also done for temporary live chats (that are not saved on the server). As a consequence, an error occurs when a user folds a chat window before posting any message. Steps to reproduce the issue: - Open a live chat - Send a message - Close the live chat - Open another live chat - Fold the chat window - An error occurs Another undesirable save is triggered when the chat window opens to show the feedback panel: the live chat is about to be discarded so saving the state is not required. Steps to reproduce the issue: - Open a live chat - Send a message - Fold the chat window - Click on close - The chat window opens and the "open" state is saved on the server. This PR fixes both issues. [1]: https://github.com/odoo/odoo/pull/145905
This fix ensures certain Brazilian taxes included in the price are calculated from the correct total amount. It prevents incorrect tax values in accounting, reconciliation, and localized point-of-sale or e-invoicing flows where division-style taxes apply.
Original PR description
The current tax engine doesn't work with division taxes because the tax amounts must be computed on the price included amount but can't be on the price excluded one. Unfortunately, the current engine is finding first the price excluded amount before computing "really" the tax amounts. It means, 20% division price included on 100 should be computed as: 100 * 0.2 = 20 However, when trying to compute the tax amount on 100 - 20 = 80, we are not able to retrieve the original tax amount of 20. opw: 3443703
Accounting localization tests were updated to match the corrected way new account codes are generated when accounts are copied. This keeps automated checks reliable across country-specific reports and expense scenarios without changing business workflows.
Original PR description
Since we have fixed the behaviour of _search_new_account_codes, which is now used by account.copy(), we also need to adjust the account codes expected by tests that use account.copy() to generate a new account. Community PR: https://github.com/odoo/odoo/pull/136707 taskid:3521121