diff --git a/website_sale_product_sort/README.rst b/website_sale_product_sort/README.rst new file mode 100644 index 0000000..6d3c047 --- /dev/null +++ b/website_sale_product_sort/README.rst @@ -0,0 +1,113 @@ +========================= +Website Sale Product Sort +========================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fe--commerce-lightgray.png?logo=github + :target: https://github.com/OCA/e-commerce/tree/12.0/website_sale_product_sort + :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-12-0/e-commerce-12-0-website_sale_product_sort + :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/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to set a default sorting criteria for the e-commerce product +list. + +It provides the standard criterias, but allows to extend the options via third +modules. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module, you need to: + +#. Go to *Website > Configuration > Settings* +#. Select the website you want to configure. +#. In the *Product* section there's a *Sort Criteria* option that you + can set as the default one for the website selected. + +To extend the module you can override the method providing sorting options like +this: + + .. code-block:: python + + @api.model + def _get_product_sort_criterias(self): + res = super()._get_product_sort_criterias() + return res.append(("default_code asc", _("Reference - A to Z"))) + +Usage +===== + +After you've configured the default website settings: + +#. Go to the configured website shop url. +#. The products will be sorted by default by the chosen option. + +Known issues / Roadmap +====================== + +* Could be nice to have a related model to configure the sorting options without + the need of third modules. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_: + + * David Vidal + +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. + +This module is part of the `OCA/e-commerce `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_sale_product_sort/__init__.py b/website_sale_product_sort/__init__.py new file mode 100644 index 0000000..91c5580 --- /dev/null +++ b/website_sale_product_sort/__init__.py @@ -0,0 +1,2 @@ +from . import controllers +from . import models diff --git a/website_sale_product_sort/__manifest__.py b/website_sale_product_sort/__manifest__.py new file mode 100644 index 0000000..9d43cd8 --- /dev/null +++ b/website_sale_product_sort/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + 'name': 'Website Sale Product Sort', + 'summary': 'Allow to define default sort criteria for e-commerce', + 'version': '12.0.1.0.1', + 'development_status': 'Beta', + 'category': 'Website', + 'website': 'https://github.com/OCA/e-commerce', + 'author': 'Tecnativa, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'depends': [ + 'website_sale', + ], + 'data': [ + "views/website_sale_sort.xml", + "views/res_config_settings_view.xml", + ], + 'application': False, + 'installable': True, +} diff --git a/website_sale_product_sort/controllers/__init__.py b/website_sale_product_sort/controllers/__init__.py new file mode 100644 index 0000000..12a7e52 --- /dev/null +++ b/website_sale_product_sort/controllers/__init__.py @@ -0,0 +1 @@ +from . import main diff --git a/website_sale_product_sort/controllers/main.py b/website_sale_product_sort/controllers/main.py new file mode 100644 index 0000000..75229a4 --- /dev/null +++ b/website_sale_product_sort/controllers/main.py @@ -0,0 +1,23 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo.http import request, route +from odoo.addons.website_sale.controllers.main import WebsiteSale + + +class WebsiteSale(WebsiteSale): + + def _get_search_order(self, post): + """We can configure default sort criteria for every website""" + return "website_published desc,%s , id desc" % post.get( + "order", request.website.default_product_sort_criteria + ) + + @route() + def shop(self, page=0, category=None, search="", ppg=False, **post): + """We can configure default sort criteria for every website""" + response = super().shop( + page=page, category=category, search=search, ppg=ppg, **post + ) + response.qcontext["order"] = post.get( + "order", request.website.default_product_sort_criteria) + return response diff --git a/website_sale_product_sort/i18n/ca.po b/website_sale_product_sort/i18n/ca.po new file mode 100644 index 0000000..ef05c88 --- /dev/null +++ b/website_sale_product_sort/i18n/ca.po @@ -0,0 +1,79 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_product_sort +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-01-20 20:44+0000\n" +"Last-Translator: claudiagn \n" +"Language-Team: none\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:14 +#, python-format +msgid "Catalog price: High to Low" +msgstr "Preu de catàleg: Alt a Baix" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:15 +#, python-format +msgid "Catalog price: Low to High" +msgstr "Preu de catàleg: Baix a Alt" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_res_config_settings +msgid "Config Settings" +msgstr "Paràmetres de configuració" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Default Sort Criteria" +msgstr "Criteris d'ordenació predeterminats" + +#. module: website_sale_product_sort +#: model:ir.model.fields,help:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,help:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Default criteria for sorting products in the shop" +msgstr "Criteris predeterminats per ordenar els productes a la botiga" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:16 +#, python-format +msgid "Name - A to Z" +msgstr "Nom - A a Z" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:17 +#, python-format +msgid "Name - Z to A" +msgstr "Nom - Z a A" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:13 +#, python-format +msgid "Relevance" +msgstr "Rellevància" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Sort Criteria" +msgstr "Criteri d'ordenació" + +#. module: website_sale_product_sort +#: model:ir.model.fields,field_description:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,field_description:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Sort products by" +msgstr "Ordenar productes per" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_website +msgid "Website" +msgstr "Lloc web" diff --git a/website_sale_product_sort/i18n/es.po b/website_sale_product_sort/i18n/es.po new file mode 100644 index 0000000..ec814ca --- /dev/null +++ b/website_sale_product_sort/i18n/es.po @@ -0,0 +1,80 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_product_sort +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-05-13 10:59+0000\n" +"PO-Revision-Date: 2020-11-03 13:08+0000\n" +"Last-Translator: claudiagn \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:14 +#, python-format +msgid "Catalog price: High to Low" +msgstr "Precio de catálogo: Mayor a Menor" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:15 +#, python-format +msgid "Catalog price: Low to High" +msgstr "Precio de catálogo: Menor a Mayor" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_res_config_settings +msgid "Config Settings" +msgstr "Ajustes de Configuración" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Default Sort Criteria" +msgstr "Criterio de ordenación por defecto" + +#. module: website_sale_product_sort +#: model:ir.model.fields,help:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,help:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Default criteria for sorting products in the shop" +msgstr "Criterio por defecto para ordenar los productos en la tienda" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:16 +#, python-format +msgid "Name - A to Z" +msgstr "Nombre: de la A a la Z" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:17 +#, python-format +msgid "Name - Z to A" +msgstr "Nombre: de la Z a la A" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:13 +#, python-format +msgid "Relevance" +msgstr "Relevancia" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Sort Criteria" +msgstr "Criterio de ordenación" + +#. module: website_sale_product_sort +#: model:ir.model.fields,field_description:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,field_description:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Sort products by" +msgstr "Ordernar productos por" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_website +msgid "Website" +msgstr "Sitio web" diff --git a/website_sale_product_sort/i18n/fr.po b/website_sale_product_sort/i18n/fr.po new file mode 100644 index 0000000..98a48b3 --- /dev/null +++ b/website_sale_product_sort/i18n/fr.po @@ -0,0 +1,79 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_product_sort +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-11-23 15:55+0000\n" +"Last-Translator: Yann Papouin \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:14 +#, python-format +msgid "Catalog price: High to Low" +msgstr "Prix catalogue : décroissant" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:15 +#, python-format +msgid "Catalog price: Low to High" +msgstr "Prix catalogue : croissant" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_res_config_settings +msgid "Config Settings" +msgstr "Paramètres de config" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Default Sort Criteria" +msgstr "Critère de tri par défaut" + +#. module: website_sale_product_sort +#: model:ir.model.fields,help:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,help:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Default criteria for sorting products in the shop" +msgstr "Critère par défaut pour trier les articles de la boutique" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:16 +#, python-format +msgid "Name - A to Z" +msgstr "Nom : de A à Z" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:17 +#, python-format +msgid "Name - Z to A" +msgstr "Nom : de Z à A" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:13 +#, python-format +msgid "Relevance" +msgstr "Pertinence" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Sort Criteria" +msgstr "Critère de tri" + +#. module: website_sale_product_sort +#: model:ir.model.fields,field_description:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,field_description:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Sort products by" +msgstr "Trier les articles par" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_website +msgid "Website" +msgstr "Site Web" diff --git a/website_sale_product_sort/i18n/nl.po b/website_sale_product_sort/i18n/nl.po new file mode 100644 index 0000000..45ecadb --- /dev/null +++ b/website_sale_product_sort/i18n/nl.po @@ -0,0 +1,79 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_product_sort +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-12-15 17:19+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: none\n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:14 +#, python-format +msgid "Catalog price: High to Low" +msgstr "Catalogus prijs: Hoog naar Laag" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:15 +#, python-format +msgid "Catalog price: Low to High" +msgstr "Catalogus prijs: Laag naar Hoog" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Default Sort Criteria" +msgstr "Standaard Sortering Criteria" + +#. module: website_sale_product_sort +#: model:ir.model.fields,help:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,help:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Default criteria for sorting products in the shop" +msgstr "Standaard criteria voor de sortering van producten" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:16 +#, python-format +msgid "Name - A to Z" +msgstr "Naam - A naar Z" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:17 +#, python-format +msgid "Name - Z to A" +msgstr "Naam - Z naar A" + +#. module: website_sale_product_sort +#: code:addons/website_sale_product_sort/models/website.py:13 +#, python-format +msgid "Relevance" +msgstr "Relevantie" + +#. module: website_sale_product_sort +#: model_terms:ir.ui.view,arch_db:website_sale_product_sort.res_config_settings_view_form +msgid "Sort Criteria" +msgstr "Sorteer Criteria" + +#. module: website_sale_product_sort +#: model:ir.model.fields,field_description:website_sale_product_sort.field_res_config_settings__product_sort_criteria +#: model:ir.model.fields,field_description:website_sale_product_sort.field_website__default_product_sort_criteria +msgid "Sort products by" +msgstr "Sorteer product op" + +#. module: website_sale_product_sort +#: model:ir.model,name:website_sale_product_sort.model_website +msgid "Website" +msgstr "Website" diff --git a/website_sale_product_sort/models/__init__.py b/website_sale_product_sort/models/__init__.py new file mode 100644 index 0000000..74b81ab --- /dev/null +++ b/website_sale_product_sort/models/__init__.py @@ -0,0 +1,2 @@ +from . import website +from . import res_config_settings diff --git a/website_sale_product_sort/models/res_config_settings.py b/website_sale_product_sort/models/res_config_settings.py new file mode 100644 index 0000000..f711295 --- /dev/null +++ b/website_sale_product_sort/models/res_config_settings.py @@ -0,0 +1,13 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + product_sort_criteria = fields.Selection( + related='website_id.default_product_sort_criteria', + default_model='website', + readonly=False, + ) diff --git a/website_sale_product_sort/models/website.py b/website_sale_product_sort/models/website.py new file mode 100644 index 0000000..9986c25 --- /dev/null +++ b/website_sale_product_sort/models/website.py @@ -0,0 +1,26 @@ +# Copyright 2020 Tecnativa - David Vidal +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import _, api, fields, models + + +class Website(models.Model): + _inherit = "website" + + @api.model + def _get_product_sort_criterias(self): + """Extend to add more sort criterias""" + return [ + ('website_sequence desc', _('Relevance')), + ('list_price desc', _('Catalog price: High to Low')), + ('list_price asc', _('Catalog price: Low to High')), + ('name asc', _('Name - A to Z')), + ('name desc', _('Name - Z to A')), + ] + + default_product_sort_criteria = fields.Selection( + selection='_get_product_sort_criterias', + string="Sort products by", + help="Default criteria for sorting products in the shop", + default='website_sequence desc', + required=True, + ) diff --git a/website_sale_product_sort/readme/CONFIGURE.rst b/website_sale_product_sort/readme/CONFIGURE.rst new file mode 100644 index 0000000..218fdc6 --- /dev/null +++ b/website_sale_product_sort/readme/CONFIGURE.rst @@ -0,0 +1,16 @@ +To configure this module, you need to: + +#. Go to *Website > Configuration > Settings* +#. Select the website you want to configure. +#. In the *Product* section there's a *Sort Criteria* option that you + can set as the default one for the website selected. + +To extend the module you can override the method providing sorting options like +this: + + .. code-block:: python + + @api.model + def _get_product_sort_criterias(self): + res = super()._get_product_sort_criterias() + return res.append(("default_code asc", _("Reference - A to Z"))) diff --git a/website_sale_product_sort/readme/CONTRIBUTORS.rst b/website_sale_product_sort/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..0ff1feb --- /dev/null +++ b/website_sale_product_sort/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `Tecnativa `_: + + * David Vidal diff --git a/website_sale_product_sort/readme/DESCRIPTION.rst b/website_sale_product_sort/readme/DESCRIPTION.rst new file mode 100644 index 0000000..36df5ff --- /dev/null +++ b/website_sale_product_sort/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This module allows to set a default sorting criteria for the e-commerce product +list. + +It provides the standard criterias, but allows to extend the options via third +modules. diff --git a/website_sale_product_sort/readme/ROADMAP.rst b/website_sale_product_sort/readme/ROADMAP.rst new file mode 100644 index 0000000..ea1a482 --- /dev/null +++ b/website_sale_product_sort/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +* Could be nice to have a related model to configure the sorting options without + the need of third modules. diff --git a/website_sale_product_sort/readme/USAGE.rst b/website_sale_product_sort/readme/USAGE.rst new file mode 100644 index 0000000..c46dc84 --- /dev/null +++ b/website_sale_product_sort/readme/USAGE.rst @@ -0,0 +1,4 @@ +After you've configured the default website settings: + +#. Go to the configured website shop url. +#. The products will be sorted by default by the chosen option. diff --git a/website_sale_product_sort/static/description/icon.png b/website_sale_product_sort/static/description/icon.png new file mode 100644 index 0000000..3a0328b Binary files /dev/null and b/website_sale_product_sort/static/description/icon.png differ diff --git a/website_sale_product_sort/static/description/index.html b/website_sale_product_sort/static/description/index.html new file mode 100644 index 0000000..8976bd1 --- /dev/null +++ b/website_sale_product_sort/static/description/index.html @@ -0,0 +1,466 @@ + + + + + + +Website Sale Product Sort + + + +
+

Website Sale Product Sort

+ + +

Beta License: AGPL-3 OCA/e-commerce Translate me on Weblate Try me on Runbot

+

This module allows to set a default sorting criteria for the e-commerce product +list.

+

It provides the standard criterias, but allows to extend the options via third +modules.

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to:

+
    +
  1. Go to Website > Configuration > Settings
  2. +
  3. Select the website you want to configure.
  4. +
  5. In the Product section there’s a Sort Criteria option that you +can set as the default one for the website selected.
  6. +
+

To extend the module you can override the method providing sorting options like +this:

+
+
+@api.model
+def _get_product_sort_criterias(self):
+  res = super()._get_product_sort_criterias()
+  return res.append(("default_code asc", _("Reference - A to Z")))
+
+
+
+
+

Usage

+

After you’ve configured the default website settings:

+
    +
  1. Go to the configured website shop url.
  2. +
  3. The products will be sorted by default by the chosen option.
  4. +
+
+
+

Known issues / Roadmap

+
    +
  • Could be nice to have a related model to configure the sorting options without +the need of third modules.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/website_sale_product_sort/views/res_config_settings_view.xml b/website_sale_product_sort/views/res_config_settings_view.xml new file mode 100644 index 0000000..0ec7e28 --- /dev/null +++ b/website_sale_product_sort/views/res_config_settings_view.xml @@ -0,0 +1,27 @@ + + + + + + res.config.settings + + +
+
+
+
+
+
+
+ +
+ diff --git a/website_sale_product_sort/views/website_sale_sort.xml b/website_sale_product_sort/views/website_sale_sort.xml new file mode 100644 index 0000000..e64f7b1 --- /dev/null +++ b/website_sale_product_sort/views/website_sale_sort.xml @@ -0,0 +1,11 @@ + + + + +