Skip to content

Commit

Permalink
[16.0][MIG] website_sale_product_detail_attribute_image: migration to…
Browse files Browse the repository at this point in the history
… 16.0
  • Loading branch information
Segui-S73 committed Feb 22, 2023
1 parent c9e46c9 commit e3a9548
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 21 deletions.
6 changes: 6 additions & 0 deletions setup/website_sale_product_detail_attribute_image/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
11 changes: 7 additions & 4 deletions website_sale_product_detail_attribute_image/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Website Sale Product Detail Attribute Image
: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/15.0/website_sale_product_detail_attribute_image
:target: https://github.com/OCA/e-commerce/tree/16.0/website_sale_product_detail_attribute_image
: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-15-0/e-commerce-15-0-website_sale_product_detail_attribute_image
:target: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_product_detail_attribute_image
: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/15.0
:target: https://runbot.odoo-community.org/runbot/113/16.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -62,6 +62,7 @@ Authors
~~~~~~~

* Tecnativa
* Studio73

Contributors
~~~~~~~~~~~~
Expand All @@ -73,7 +74,9 @@ Contributors

* Studio73 <studio73.es>:
* `Studio73 <https://studio73.es>`_:

* Miguel Gandia
* Óscar Seguí

Other credits
~~~~~~~~~~~~~
Expand All @@ -93,6 +96,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/15.0/website_sale_product_detail_attribute_image>`_ project on GitHub.
This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/16.0/website_sale_product_detail_attribute_image>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
7 changes: 4 additions & 3 deletions website_sale_product_detail_attribute_image/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Copyright 2019 Tecnativa - Sergio Teruel
# Copyright 2023 Studio73 - Óscar Seguí <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Product Detail Attribute Image",
"summary": "Display attributes images in shop product detail",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"development_status": "Production/Stable",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
Expand All @@ -21,8 +22,8 @@
"/website_sale_product_detail_attribute_image/static/src/scss/style.scss",
],
"web.assets_tests": [
"/website_sale_product_detail_attribute_image/static/src/js/"
"website_sale_product_detail_attribute_image_tour.js",
"/website_sale_product_detail_attribute_image/static/tests/tours"
"/website_sale_product_detail_attribute_image.js",
],
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@

* Studio73 <studio73.es>:
* `Studio73 <https://studio73.es>`_:
* Miguel Gandia

* Miguel Gandia
* Óscar Seguí
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Website Sale Product Detail Attribute Image</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="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/15.0/website_sale_product_detail_attribute_image"><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-15-0/e-commerce-15-0-website_sale_product_detail_attribute_image"><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/15.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="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/16.0/website_sale_product_detail_attribute_image"><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-16-0/e-commerce-16-0-website_sale_product_detail_attribute_image"><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/16.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
display images, name and values related to product attributes in e-commerce
product page.</p>
Expand Down Expand Up @@ -442,7 +442,7 @@ <h2><a class="toc-backref" href="#id7">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/15.0/website_sale_product_detail_attribute_image">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/16.0/website_sale_product_detail_attribute_image">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 @@ -4,8 +4,13 @@
odoo.define("website_sale_product_detail_attribute_image.tour", function (require) {
"use strict";

var session = require("web.session");

var domReady = new Promise(function (resolve) {
$(resolve);
});
var ready = Promise.all([domReady, session.is_bound]);
var tour = require("web_tour.tour");
var base = require("web_editor.base");

var steps = [
{
Expand All @@ -22,7 +27,7 @@ odoo.define("website_sale_product_detail_attribute_image.tour", function (requir
{
url: "/shop",
test: true,
wait_for: base.ready(),
wait_for: ready,
},
steps
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
from odoo.tests import HttpCase, tagged


@tagged("post_install", "-at_install")
class WebsiteSaleHttpCase(HttpCase):
def setUp(self):
super().setUp()
Expand Down Expand Up @@ -87,13 +88,9 @@ def setUp(self):

def test_ui_website(self):
"""Test frontend tour."""
tour = (
"odoo.__DEBUG__.services['web_tour.tour']",
self.start_tour(
"/",
"website_sale_product_detail_attribute_image",
)
self.browser_js(
url_path="/",
code="%s.run('%s')" % tour,
ready="%s.tours['%s'].ready" % tour,
login="admin",
timeout=200,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name="Attribute's Images"
>
<xpath
expr="//div[@id='product_details']/../div[hasclass('col-md-6', 'mt-md-4')]"
expr="//div[@t-attf-class='col-lg-#{image_cols[0]} mt-lg-4 o_wsale_product_images position-relative']"
position="inside"
>
<div class="row mt16 mb0 product-detail-attributes">
Expand Down

0 comments on commit e3a9548

Please sign in to comment.