Skip to content

Commit

Permalink
[MIG] website_product_configurator: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAionTech committed Feb 22, 2024
1 parent e0bc250 commit c35a496
Show file tree
Hide file tree
Showing 27 changed files with 1,016 additions and 468 deletions.
86 changes: 86 additions & 0 deletions website_product_configurator/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
============================
Website Product Configurator
============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:571a6836c9659722dc42db79a4b0b1d7f1915bf9c139a7a34518f21973cdc009
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--configurator-lightgray.png?logo=github
:target: https://github.com/OCA/product-configurator/tree/16.0/website_product_configurator
:alt: OCA/product-configurator
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-configurator-16-0/product-configurator-16-0-website_product_configurator
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-configurator&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module facilitates to configure product on website.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-configurator/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-configurator/issues/new?body=module:%20website_product_configurator%0Aversion:%2016.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.

Credits
=======

Authors
~~~~~~~

* Pledra

Contributors
~~~~~~~~~~~~

* `Aion Tech <https://aiontech.company/>`_:

* Simone Rubino <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-PCatinean| image:: https://github.com/PCatinean.png?size=40px
:target: https://github.com/PCatinean
:alt: PCatinean

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-PCatinean|

This module is part of the `OCA/product-configurator <https://github.com/OCA/product-configurator/tree/16.0/website_product_configurator>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 0 additions & 1 deletion website_product_configurator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from . import models
from . import controllers
from . import tests
16 changes: 14 additions & 2 deletions website_product_configurator/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Website Product Configurator",
"version": "14.0.1.2.0",
"version": "16.0.1.0.0",
"summary": """Configure products in e-shop""",
"author": "Pledra, Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand All @@ -16,11 +16,23 @@
"data/ir_config_parameter_data.xml",
"data/config_form_templates.xml",
"data/cron.xml",
"views/assets.xml",
"views/product_view.xml",
"views/templates.xml",
"views/res_config_settings_view.xml",
],
"assets": {
"web.assets_frontend": [
"website_product_configurator/static/src/js/config_form.js",
"website_product_configurator/static/src/js/variant_mixin.js",
"website_product_configurator/static/src/js/website_sale.esm.js",
"website_product_configurator/static/src/js/website_config_tour.js",
"website_product_configurator/static/src/scss/config_form.scss",
"website_product_configurator/static/src/scss/tooltip.scss",
],
"web.assets_tests": [
"website_product_configurator/static/tests/tours/custom_values.esm.js",
],
},
"demo": ["demo/product_template_demo.xml"],
"images": ["static/description/cover.png"],
"application": True,
Expand Down
7 changes: 5 additions & 2 deletions website_product_configurator/controllers/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import logging

from odoo import http, models
from odoo.exceptions import UserError, ValidationError
Expand All @@ -8,6 +9,8 @@
from odoo.addons.http_routing.models.ir_http import slug
from odoo.addons.website_sale.controllers.main import WebsiteSale

_logger = logging.getLogger(__name__)


def get_pricelist():
sale_order = request.env.context.get("sale_order")
Expand Down Expand Up @@ -467,8 +470,8 @@ def save_configuration(
valid = config_session_id.sudo().validate_configuration()
if valid:
check_next_step = False
except Exception:
pass
except Exception as exc:
_logger.debug(exc, exc_info=True)

Check warning on line 474 in website_product_configurator/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

website_product_configurator/controllers/main.py#L473-L474

Added lines #L473 - L474 were not covered by tests
if check_next_step:
result = self.set_config_next_step(

Check warning on line 476 in website_product_configurator/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

website_product_configurator/controllers/main.py#L476

Added line #L476 was not covered by tests
config_session_id=config_session_id,
Expand Down
Loading

0 comments on commit c35a496

Please sign in to comment.