- Your order:
+ Your order:
@@ -2180,7 +2180,7 @@
Total:
-
+
|
@@ -2234,7 +2234,7 @@
Total: |
+ t-options='{"widget": "monetary", "display_currency": website_sale_order.currency_id}'/>
|
diff --git a/addons/website_sale_loyalty/tests/test_shop_sale_coupon.py b/addons/website_sale_loyalty/tests/test_shop_sale_coupon.py
index 1c3c63f4c69..3e81086dcac 100644
--- a/addons/website_sale_loyalty/tests/test_shop_sale_coupon.py
+++ b/addons/website_sale_loyalty/tests/test_shop_sale_coupon.py
@@ -10,16 +10,6 @@ from odoo.addons.sale.tests.test_sale_product_attribute_value_config import Test
@tagged('post_install', '-at_install')
class TestUi(TestSaleProductAttributeValueCommon, HttpCase):
- @classmethod
- def setUpClass(cls):
- super(TestUi, cls).setUpClass()
- # set currency to not rely on demo data and avoid possible race condition
- cls.currency_ratio = 1.0
- pricelist = cls.env.ref('product.list0')
- new_currency = cls._setup_currency(cls.currency_ratio)
- pricelist.currency_id = new_currency
- cls.env.flush_all()
-
def test_01_admin_shop_sale_loyalty_tour(self):
# pre enable "Show # found" option to avoid race condition...
public_category = self.env['product.public.category'].create({'name': 'Public Category'})
diff --git a/addons/website_sale_product_configurator/static/tests/tours/website_sale_shop_custom_attributes_value.js b/addons/website_sale_product_configurator/static/tests/tours/website_sale_shop_custom_attributes_value.js
index ba8ee0c26a4..ddce065de8f 100644
--- a/addons/website_sale_product_configurator/static/tests/tours/website_sale_shop_custom_attributes_value.js
+++ b/addons/website_sale_product_configurator/static/tests/tours/website_sale_shop_custom_attributes_value.js
@@ -14,10 +14,7 @@ tour.register("a_shop_custom_attribute_value", {
trigger: 'a.js_add_cart_json:has(i.fa-plus)',
run: 'click',
}, {
- trigger: 'span.text-danger span:contains(750)',
- run: function (){}, // check
-}, {
- trigger: 'span.oe_price span:contains(600)',
+ trigger: 'span.oe_currency_value:contains(750)',
run: function (){}, // check
}, {
id: 'add_cart_step',
@@ -53,7 +50,7 @@ tour.register("a_shop_custom_attribute_value", {
extra_trigger: '.oe_advanced_configurator_modal .js_product:has(strong:contains(Chair floor protection))',
run: 'click'
}, {
- trigger: 'span:contains(1,257.00)',
+ trigger: 'span:contains(1,557.00)',
run: function (){}, // check
}, {
trigger: 'button:has(span:contains(Proceed to Checkout))',
diff --git a/addons/website_sale_product_configurator/tests/test_customize.py b/addons/website_sale_product_configurator/tests/test_customize.py
index adeb3c6a226..b97b078f770 100644
--- a/addons/website_sale_product_configurator/tests/test_customize.py
+++ b/addons/website_sale_product_configurator/tests/test_customize.py
@@ -9,15 +9,7 @@ from odoo.tests import tagged
class TestUi(HttpCase, TestProductConfiguratorCommon):
def test_01_admin_shop_custom_attribute_value_tour(self):
- # Ensure that only one pricelist is available during the test, with the company currency.
- # This ensures that tours with triggers on the amounts will run properly.
- # To this purpose, we will ensure that only the public_pricelist is available for the default_website.
- public_pricelist = self.env.ref('product.list0')
- default_website = self.env.ref('website.default_website')
- self.env['product.pricelist'].search([
- ('id', '!=', public_pricelist.id),
- ('website_id', 'in', [False, default_website.id])]
- ).website_id = self.env.ref('website.website2')
- public_pricelist.currency_id = self.env.company.currency_id
- self._create_pricelist(public_pricelist)
+ # Ensure that no pricelist is available during the test.
+ # This ensures that tours which triggers on the amounts will run properly.
+ self.env['product.pricelist'].search([]).action_archive()
self.start_tour("/", 'a_shop_custom_attribute_value', login="admin")
diff --git a/addons/website_sale_product_configurator/tests/test_website_sale_configurator.py b/addons/website_sale_product_configurator/tests/test_website_sale_configurator.py
index c74ef951d22..1c9201dbfb6 100644
--- a/addons/website_sale_product_configurator/tests/test_website_sale_configurator.py
+++ b/addons/website_sale_product_configurator/tests/test_website_sale_configurator.py
@@ -31,14 +31,7 @@ class TestWebsiteSaleProductConfigurator(TestProductConfiguratorCommon, HttpCase
# in this case. However, we still want to make sure that the correct
# variant attributes are taken into account when calculating the price.
url = self.product_product_custo_desk.website_url
- # Ensure that only one pricelist is available during the test, with the company currency.
+ # Ensure that no pricelist is available during the test.
# This ensures that tours with triggers on the amounts will run properly.
- # To this purpose, we will ensure that only the public_pricelist is available for the default_website.
- public_pricelist = self.env.ref('product.list0')
- default_website = self.env.ref('website.default_website')
- self.env['product.pricelist'].search([
- ('id', '!=', public_pricelist.id),
- ('website_id', 'in', [False, default_website.id])]
- ).website_id = self.env.ref('website.website2')
- public_pricelist.currency_id = self.env.company.currency_id
+ self.env['product.pricelist'].search([]).action_archive()
self.start_tour(url, 'website_sale_product_configurator_optional_products_tour', login='portal')
diff --git a/addons/website_sale_slides/data/sale_order_demo.xml b/addons/website_sale_slides/data/sale_order_demo.xml
index 9af0c32eff6..6af321868fd 100644
--- a/addons/website_sale_slides/data/sale_order_demo.xml
+++ b/addons/website_sale_slides/data/sale_order_demo.xml
@@ -10,7 +10,6 @@
-
@@ -32,7 +31,6 @@
-
diff --git a/addons/website_sale_stock/controllers/variant.py b/addons/website_sale_stock/controllers/variant.py
index f16c3892799..59a27eba04d 100644
--- a/addons/website_sale_stock/controllers/variant.py
+++ b/addons/website_sale_stock/controllers/variant.py
@@ -8,6 +8,6 @@ from odoo.addons.website_sale.controllers.variant import WebsiteSaleVariantContr
class WebsiteSaleStockVariantController(WebsiteSaleVariantController):
@http.route()
def get_combination_info_website(self, product_template_id, product_id, combination, add_qty, **kw):
- kw['context'] = kw.get('context', {})
+ kw['context'] = kw.get('context') or {} # context may be passed as None in some cases
kw['context'].update(website_sale_stock_get_quantity=True)
return super(WebsiteSaleStockVariantController, self).get_combination_info_website(product_template_id, product_id, combination, add_qty, **kw)
diff --git a/addons/website_sale_stock_wishlist/controllers/variant.py b/addons/website_sale_stock_wishlist/controllers/variant.py
index 0b9b1684392..6167d9dba08 100644
--- a/addons/website_sale_stock_wishlist/controllers/variant.py
+++ b/addons/website_sale_stock_wishlist/controllers/variant.py
@@ -8,6 +8,6 @@ from odoo.addons.website_sale.controllers.variant import WebsiteSaleVariantContr
class WebsiteSaleStockWishlistVariantController(WebsiteSaleVariantController):
@http.route()
def get_combination_info_website(self, product_template_id, product_id, combination, add_qty, **kw):
- kw['context'] = kw.get('context', {})
+ kw['context'] = kw.get('context') or {} # context may be passed as None in some cases
kw['context'].update(website_sale_stock_wishlist_get_wish=True)
return super().get_combination_info_website(product_template_id, product_id, combination, add_qty, **kw)
diff --git a/addons/website_sale_wishlist/controllers/main.py b/addons/website_sale_wishlist/controllers/main.py
index 6439ffed87e..eabf8510608 100644
--- a/addons/website_sale_wishlist/controllers/main.py
+++ b/addons/website_sale_wishlist/controllers/main.py
@@ -14,9 +14,7 @@ class WebsiteSaleWishlist(WebsiteSale):
pricelist = website.pricelist_id
product = request.env['product.product'].browse(product_id)
- price = product._get_combination_info_variant(
- pricelist=website.pricelist_id,
- )['price']
+ price = product._get_combination_info_variant(pricelist=website.pricelist_id)['price']
Wishlist = request.env['product.wishlist']
if request.website.is_public_user():
diff --git a/addons/website_sale_wishlist/models/product_wishlist.py b/addons/website_sale_wishlist/models/product_wishlist.py
index 8c34a703f85..66d1f3a9778 100644
--- a/addons/website_sale_wishlist/models/product_wishlist.py
+++ b/addons/website_sale_wishlist/models/product_wishlist.py
@@ -15,7 +15,7 @@ class ProductWishlist(models.Model):
partner_id = fields.Many2one('res.partner', string='Owner')
product_id = fields.Many2one('product.product', string='Product', required=True)
- currency_id = fields.Many2one('res.currency', related='pricelist_id.currency_id', readonly=True)
+ currency_id = fields.Many2one('res.currency', related='website_id.currency_id', readonly=True)
pricelist_id = fields.Many2one('product.pricelist', string='Pricelist', help='Pricelist when added')
price = fields.Monetary(currency_field='currency_id', string='Price', help='Price of the product when it has been added in the wishlist')
website_id = fields.Many2one('website', ondelete='cascade', required=True)
diff --git a/addons/website_sale_wishlist/views/website_sale_wishlist_template.xml b/addons/website_sale_wishlist/views/website_sale_wishlist_template.xml
index 3efdd370e7e..9bff806d1c9 100644
--- a/addons/website_sale_wishlist/views/website_sale_wishlist_template.xml
+++ b/addons/website_sale_wishlist/views/website_sale_wishlist_template.xml
@@ -192,7 +192,7 @@
-
+
diff --git a/odoo/addons/base/tests/test_res_users.py b/odoo/addons/base/tests/test_res_users.py
index 4b6fa13b4c9..c52d67f616e 100644
--- a/odoo/addons/base/tests/test_res_users.py
+++ b/odoo/addons/base/tests/test_res_users.py
@@ -427,7 +427,7 @@ class TestUsersGroupWarning(TransactionCase):
# 97 requests if only base is installed
# 412 runbot community
# 549 runbot enterprise
- with self.assertQueryCount(__system__=436), \
+ with self.assertQueryCount(__system__=437), \
Form(self.test_group_user.with_context(show_user_group_warning=True), view='base.view_users_form') as UserForm:
UserForm._values[self.sales_categ_field] = self.group_sales_user.id
UserForm._perform_onchange([self.sales_categ_field])
|