Skip to content

Commit 2f2e259

Browse files
committed
[IMP] website_attribute_set: add test cases
1 parent 8205885 commit 2f2e259

14 files changed

Lines changed: 203 additions & 22 deletions

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
odoo_test_helper
12
odoo-addon-attribute_set @ git+https://github.com/OCA/odoo-pim.git@refs/pull/192/head#subdirectory=attribute_set
23
odoo-addon-product_attribute_set @ git+https://github.com/OCA/odoo-pim.git@refs/pull/196/head#subdirectory=product_attribute_set
34
odoo-addon-pim @ git+https://github.com/OCA/odoo-pim.git@refs/pull/197/head#subdirectory=pim

website_attribute_set/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

website_attribute_set/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

website_attribute_set/controllers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

website_attribute_set/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

website_attribute_set/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

website_attribute_set/models/attribute_attribute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

website_attribute_set/models/attribute_set_owner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

website_attribute_set/models/mixins.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

@@ -44,7 +44,6 @@ def search_extra(env, search_term):
4444
if similarity > 80:
4545
extra_domain = [(attribute.name, "!=", False)]
4646
extra_domains.append(extra_domain)
47-
4847
return expression.OR(extra_domains)
4948

5049

@@ -67,5 +66,4 @@ def _search_fetch(self, search_detail, search, limit, order):
6766
domain, limit=limit, order=search_detail.get("order", order)
6867
)
6968
count = model.search_count(domain)
70-
7169
return results, count

website_attribute_set/models/product_product.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011 Kencove (http://www.kencove.com).
1+
# Copyright 2025 Kencove (http://www.kencove.com).
22
# @author Mohamed Alkobrosli <[email protected]>
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44

@@ -48,5 +48,4 @@ def _prepare_additional_attributes_for_display(self):
4848
groups[attribute.attribute_group_id][attribute][product] = (
4949
values.mapped("name")
5050
)
51-
5251
return groups

0 commit comments

Comments
 (0)