Skip to content

Commit

Permalink
[MIG] website_sale_attribute_filter_category: Migration to 12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-teruel committed Oct 22, 2019
1 parent 6371469 commit c0bba95
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 52 deletions.
10 changes: 5 additions & 5 deletions website_sale_attribute_filter_category/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Website Sale Attribute Filter Category
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/11.0/website_sale_attribute_filter_category
:target: https://github.com/OCA/e-commerce/tree/12.0/website_sale_attribute_filter_category
:alt: OCA/e-commerce
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/e-commerce-11-0/e-commerce-11-0-website_sale_attribute_filter_category
:target: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_attribute_filter_category
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/113/11.0
:target: https://runbot.odoo-community.org/runbot/113/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -46,7 +46,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_attribute_filter_category%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_attribute_filter_category%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand Down Expand Up @@ -78,6 +78,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/11.0/website_sale_attribute_filter_category>`_ project on GitHub.
This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/12.0/website_sale_attribute_filter_category>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
6 changes: 2 additions & 4 deletions website_sale_attribute_filter_category/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
'name': 'Website Sale Attribute Filter Category',
'summary': 'Allow group attributes in shop by categories',
'version': '11.0.1.0.0',
'version': '12.0.1.0.0',
'development_status': 'Beta',
'category': 'Website',
'website': 'https://github.com/OCA/e-commerce',
Expand All @@ -12,13 +12,11 @@
'application': False,
'installable': True,
'depends': [
'website_sale_product_attribute_filter_visibility',
'website_sale_comparison',
],
'data': [
'views/assets.xml',
'views/templates.xml',
],
'demo': [
'data/demo.xml',
],
}
31 changes: 0 additions & 31 deletions website_sale_attribute_filter_category/data/demo.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Website Sale Attribute Filter Category</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/e-commerce/tree/11.0/website_sale_attribute_filter_category"><img alt="OCA/e-commerce" src="https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/e-commerce-11-0/e-commerce-11-0-website_sale_attribute_filter_category"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/113/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/e-commerce/tree/12.0/website_sale_attribute_filter_category"><img alt="OCA/e-commerce" src="https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_attribute_filter_category"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/113/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of website sale module to allow to group
product attributes filter by their categories.</p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -396,7 +396,7 @@ <h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/e-commerce/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_attribute_filter_category%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_attribute_filter_category%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -426,7 +426,7 @@ <h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/e-commerce/tree/11.0/website_sale_attribute_filter_category">OCA/e-commerce</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/e-commerce/tree/12.0/website_sale_attribute_filter_category">OCA/e-commerce</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@ odoo.define("website_sale_attribute_filter_category.tour", function (require) {
var base = require("web_editor.base");

var steps = [
{
trigger: "a:contains('Customize')",
},
{
trigger: "a:contains('Product Attribute')",
},
{
trigger: "a[href='/shop']",
},
{
trigger: "a:contains('iPod')",
extra_trigger: ".js_attributes:has(span:contains('Test Category'))",
trigger: "a:contains('Customizable Desk')",
extra_trigger: ".js_attributes:has(span:contains('Test category'))",
},
];
tour.register("website_sale_attribute_filter_category",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,53 @@

class websiteSaleAttributeFilterCategoryHttpCase(HttpCase):

def setUp(self):
super().setUp()
# Models
AttributeCategory = self.env['product.attribute.category']
ProductAttribute = self.env['product.attribute']
ProductAttributeValue = self.env['product.attribute.value']
ProductAttributeLine = self.env['product.template.attribute.line']
self.attribute_category = AttributeCategory.create({
'name': 'Test category',
})
self.product_attribute = ProductAttribute.create({
'name': 'Test',
'website_published': True,
'create_variant': 'no_variant',
'category_id': self.attribute_category.id,
})
self.product_attribute_value_test_1 = ProductAttributeValue.create({
'name': 'Test v1',
'attribute_id': self.product_attribute.id,
})
self.product_attribute_value_test_2 = ProductAttributeValue.create({
'name': 'Test v2',
'attribute_id': self.product_attribute.id,
})
self.product_template = self.env.ref(
'product.product_product_4_product_template')
self.product_attribute_line = ProductAttributeLine.create({
'product_tmpl_id': self.product_template.id,
'attribute_id': self.product_attribute.id,
'value_ids': [(6, 0,
[self.product_attribute_value_test_1.id,
self.product_attribute_value_test_2.id]
)]
})
self.product_template.write({
'attribute_line_ids': [(4, self.product_attribute_line.id)]
})
# Active attribute's filter in /shop. By default it's disabled.
self.env.ref('website_sale.products_attributes').active = True

def test_ui_website(self):
"""Test frontend tour."""
tour = (
"odoo.__DEBUG__.services['web_tour.tour']",
"website_sale_attribute_filter_category",
)
self.phantom_js(
self.browser_js(
url_path="/",
code="%s.run('%s')" % tour,
ready="%s.tours['%s'].ready" % tour,
Expand Down

0 comments on commit c0bba95

Please sign in to comment.