Skip to content

Commit

Permalink
[MIG] website_sale_product_assortment: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterPaulussen committed Dec 18, 2024
1 parent 5f30180 commit 421273f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion website_sale_product_assortment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "eCommerce product assortment",
"summary": "Use product assortments to display products available on e-commerce.",
"version": "16.0.1.1.0",
"version": "18.0.1.1.0",
"development_status": "Beta",
"license": "AGPL-3",
"category": "Website",
Expand Down
12 changes: 6 additions & 6 deletions website_sale_product_assortment/tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,41 @@ def setUp(self):
)

def test_01_ui_no_restriction(self):
partner_admin = self.env.ref("base.partner_admin")
self.env["ir.filters"].create(
{
"name": "Test Assortment",
"model_id": "product.product",
"is_assortment": True,
"domain": [("id", "!=", self.product.product_variant_id.id)],
"partner_domain": "[('id', '=', %s)]"
% self.env.ref("base.partner_admin").id,
"partner_domain": f"[('id', '=', {partner_admin.id})]",
}
)
self.start_tour("/shop", "test_assortment_with_no_restriction", login="admin")

def test_02_ui_no_show(self):
partner_admin = self.env.ref("base.partner_admin")
self.env["ir.filters"].create(
{
"name": "Test Assortment",
"model_id": "product.product",
"is_assortment": True,
"domain": [("id", "!=", self.product.product_variant_id.id)],
"partner_domain": "[('id', '=', %s)]"
% self.env.ref("base.partner_admin").id,
"partner_domain": f"[('id', '=', {partner_admin.id})]",
"website_availability": "no_show",
}
)
self.start_tour("/shop", "test_assortment_with_no_show", login="admin")

def test_03_ui_no_purchase(self):
partner_admin = self.env.ref("base.partner_admin")
self.env["ir.filters"].create(
{
"name": "Test Assortment",
"model_id": "product.product",
"is_assortment": True,
"domain": [("id", "!=", self.product.product_variant_id.id)],
"partner_domain": "[('id', '=', %s)]"
% self.env.ref("base.partner_admin").id,
"partner_domain": f"[('id', '=', {partner_admin.id})]",
"website_availability": "no_purchase",
"message_unavailable": "Can't purchase",
"assortment_information": """<span name='testing'>
Expand Down
4 changes: 2 additions & 2 deletions website_sale_product_assortment/views/ir_filters_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<field name="website_availability" />
<field
name="message_unavailable"
attrs="{'invisible': [('website_availability', '!=', 'no_purchase')]}"
invisible="website_availability != 'no_purchase'"
/>
<field
name="assortment_information"
attrs="{'invisible': [('website_availability', '!=', 'no_purchase')]}"
invisible="website_availability != 'no_purchase'"
/>
</group>
</xpath>
Expand Down

0 comments on commit 421273f

Please sign in to comment.