Skip to content

Commit

Permalink
[MIG] website_sale_order_type: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dalonsod authored and david-s73 committed Sep 17, 2024
1 parent d2446e7 commit fd714c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
4 changes: 2 additions & 2 deletions website_sale_order_type/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Website sale order type",
"summary": "This module allows sale_order_type to work with website_sale.",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"development_status": "Beta",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
Expand All @@ -14,7 +14,7 @@
"depends": ["website_sale", "sale_order_type"],
"assets": {
"web.assets_tests": [
"/website_sale_order_type/static/src/js/website_sale_order_type_tour.js"
"/website_sale_order_type/static/src/tests/tours/website_sale_order_type_tour.esm.js"
]
},
"auto_install": True,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* Copyright 2020 Tecnativa - João Marques
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */

odoo.define("website_sale_order_type.tour", function (require) {
"use strict";
import {registry} from "@web/core/registry";

var tour = require("web_tour.tour");

var steps = [
registry.category("web_tour.tours").add("website_sale_order_type_tour", {
test: true,
url: "/shop",
steps: () => [
{
trigger: ".oe_product_cart a:contains('Test Product SO Type')",
},
Expand All @@ -20,16 +20,5 @@ odoo.define("website_sale_order_type.tour", function (require) {
{
trigger: ".btn:contains('Process Checkout')",
},
];
tour.register(
"website_sale_order_type_tour",
{
url: "/shop",
test: true,
},
steps
);
return {
steps: steps,
};
],
});
6 changes: 4 additions & 2 deletions website_sale_order_type/tests/test_website_sale_order_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@tagged("post_install", "-at_install")
class TestFrontend(HttpCase):
def setUp(self):
super(TestFrontend, self).setUp()
super().setUp()
self.sale_type_model = self.env["sale.order.type"]
self.product_template = self.env["product.template"].create(
{
Expand All @@ -33,7 +33,7 @@ def create_sale_type(self):
)
self.warehouse = self.env.ref("stock.warehouse0")
self.immediate_payment = self.env.ref("account.account_payment_term_immediate")
self.sale_pricelist = self.env.ref("product.list0")
self.sale_pricelist = self.env.ref("website_sale.list_europe")
self.free_carrier = self.env.ref("account.incoterm_FCA")
return self.sale_type_model.create(
{
Expand All @@ -57,3 +57,5 @@ def test_website_sale_order_type(self):
[("id", "not in", existing_orders.ids)]
)
self.assertEqual(created_order.type_id, self.sale_type)
self.assertEqual(created_order.payment_term_id, self.sale_type.payment_term_id)
self.assertEqual(created_order.pricelist_id, self.sale_type.pricelist_id)

0 comments on commit fd714c4

Please sign in to comment.