Open
Conversation
Without this patch, it's easy that the tour fails randomly due to a timeout when generating the sales order report. These assets can take a long time, increasing when more addons are installed.
In an integrated database, this patch makes the test go from this log:
2020-11-06 10:34:53,941 34 INFO devel werkzeug: 127.0.0.1 - - [06/Nov/2020 10:34:53] "POST /payment/transfer/feedback HTTP/1.1" 302 - 730 4.368 11.800
To this one:
2020-11-06 10:32:55,517 34 INFO devel werkzeug: 127.0.0.1 - - [06/Nov/2020 10:32:55] "POST /payment/transfer/feedback HTTP/1.1" 302 - 479 2.906 5.771
That's about 50% the time.
In the same patch, I remove the `self.env` patch that was only needed for Odoo v11 and lower.
With the old tour, timeout problems started to occur, even with 7830084 This partially reverts that, and instead uses a simpler tour to test the creation of the SO. TT26399
If we don't trigger the onchanges, we won't get some of the default values that the order type has defined TT30235
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: e-commerce-15.0/e-commerce-15.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_order_type/
Currently translated at 100.0% (1 of 1 strings) Translation: e-commerce-15.0/e-commerce-15.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_order_type/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: e-commerce-16.0/e-commerce-16.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_order_type/
Currently translated at 100.0% (1 of 1 strings) Translation: e-commerce-16.0/e-commerce-16.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_order_type/es/
When using the demo product "Customizable Desk" in the standard behaviour there is an intermediate step in which the variant of the product to be added to the cart is chosen. This step may not be there if there are no variants really because some module has modified this and to avoid errors in the tests it is better to create a product in which we are sure that there are no variants and the step of selecting the variant before adding to the cart does not exist.
Currently translated at 100.0% (1 of 1 strings) Translation: e-commerce-18.0/e-commerce-18.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_order_type/es/
Currently translated at 0.0% (0 of 1 strings) Translation: e-commerce-18.0/e-commerce-18.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_order_type/pt_BR/
Currently translated at 0.0% (0 of 1 strings) Translation: e-commerce-18.0/e-commerce-18.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_order_type/ca/
Currently translated at 100.0% (1 of 1 strings) Translation: e-commerce-18.0/e-commerce-18.0-website_sale_order_type Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_order_type/it/
97f9f88 to
a88437f
Compare
a88437f to
2edd1d0
Compare
ferran-S73
approved these changes
Mar 4, 2026
Contributor
|
This PR has the |
|
@OCA/e-commerce-maintainers Please, can you review/merge this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've modified both functions.
To set the payment term, I found that sale_get_payment_term is no longer called, as it has been deprecated since 17.0. Instead, I am using _prepare_sale_order_values directly.
For the pricelist retrieval, I am overriding get_pricelist_available to check for the partner's pricelist. If none is found, it behaves as usual.
I’ve also added a test to verify the override of get_pricelist_available.