Skip to content

[MIG][19.0] website_sale_order_type#1174

Open
Vicent-S73 wants to merge 31 commits intoOCA:19.0from
Studio73:19.0-mig-website_sale_order_type
Open

[MIG][19.0] website_sale_order_type#1174
Vicent-S73 wants to merge 31 commits intoOCA:19.0from
Studio73:19.0-mig-website_sale_order_type

Conversation

@Vicent-S73
Copy link
Copy Markdown

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.

SimoRubi and others added 30 commits March 3, 2026 08:35
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/
@Vicent-S73 Vicent-S73 force-pushed the 19.0-mig-website_sale_order_type branch 2 times, most recently from 97f9f88 to a88437f Compare March 3, 2026 10:44
@Vicent-S73 Vicent-S73 force-pushed the 19.0-mig-website_sale_order_type branch from a88437f to 2edd1d0 Compare March 3, 2026 11:09
Copy link
Copy Markdown

@Reyes4711-S73 Reyes4711-S73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Functional review OK

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@Reyes4711-S73
Copy link
Copy Markdown

@OCA/e-commerce-maintainers Please, can you review/merge this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.