diff --git a/README.md b/README.md index cfa3a918a5..665464e1af 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ addon | version | maintainers | summary [website_sale_attribute_filter_form_submit](website_sale_attribute_filter_form_submit/) | 16.0.1.0.0 | | Allow to apply manually the filters on the e-commerce [website_sale_attribute_filter_multiselect](website_sale_attribute_filter_multiselect/) | 16.0.1.0.0 | | Add multiselect display type for product and new filter for it [website_sale_cart_expire](website_sale_cart_expire/) | 16.0.1.0.3 | ivantodorovich | Cancel carts without activity after a configurable time +[website_sale_cart_selectable](website_sale_cart_selectable/) | 16.0.1.0.0 | | Add a toggle to products for enabling "Add to Cart" functionality in the e-commerce. [website_sale_category_breadcrumb](website_sale_category_breadcrumb/) | 16.0.1.0.0 | Rad0van | Displays Product Category Breadcrumb(s) in eCommerce [website_sale_checkout_skip_payment](website_sale_checkout_skip_payment/) | 16.0.1.2.2 | | Skip payment for logged users in checkout process [website_sale_comparison_hide_price](website_sale_comparison_hide_price/) | 16.0.1.0.0 | | Hide product prices on the shop diff --git a/setup/_metapackage/VERSION.txt b/setup/_metapackage/VERSION.txt index 741ec391e4..69430c4c7f 100644 --- a/setup/_metapackage/VERSION.txt +++ b/setup/_metapackage/VERSION.txt @@ -1 +1 @@ -16.0.20251006.0 \ No newline at end of file +16.0.20260605.0 \ No newline at end of file diff --git a/setup/_metapackage/setup.py b/setup/_metapackage/setup.py index 444bfa6b8b..0551294cd0 100644 --- a/setup/_metapackage/setup.py +++ b/setup/_metapackage/setup.py @@ -12,6 +12,7 @@ 'odoo-addon-website_sale_attribute_filter_form_submit>=16.0dev,<16.1dev', 'odoo-addon-website_sale_attribute_filter_multiselect>=16.0dev,<16.1dev', 'odoo-addon-website_sale_cart_expire>=16.0dev,<16.1dev', + 'odoo-addon-website_sale_cart_selectable>=16.0dev,<16.1dev', 'odoo-addon-website_sale_category_breadcrumb>=16.0dev,<16.1dev', 'odoo-addon-website_sale_checkout_skip_payment>=16.0dev,<16.1dev', 'odoo-addon-website_sale_comparison_hide_price>=16.0dev,<16.1dev', diff --git a/setup/website_sale_cart_selectable/odoo/addons/website_sale_cart_selectable b/setup/website_sale_cart_selectable/odoo/addons/website_sale_cart_selectable new file mode 120000 index 0000000000..6824ace7d7 --- /dev/null +++ b/setup/website_sale_cart_selectable/odoo/addons/website_sale_cart_selectable @@ -0,0 +1 @@ +../../../../website_sale_cart_selectable \ No newline at end of file diff --git a/setup/website_sale_cart_selectable/setup.py b/setup/website_sale_cart_selectable/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/website_sale_cart_selectable/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/website_sale_cart_selectable/README.rst b/website_sale_cart_selectable/README.rst new file mode 100644 index 0000000000..5475395cd9 --- /dev/null +++ b/website_sale_cart_selectable/README.rst @@ -0,0 +1,110 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +============================ +Website Sale Cart Selectable +============================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:ee968199fda9cec287d39aa499bf5c6ee8fbf092cab1e84f88fd7360e0ebba72 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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/16.0/website_sale_cart_selectable + :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-16-0/e-commerce-16-0-website_sale_cart_selectable + :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/e-commerce&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to enable or disable the "Add to cart" button in the +e-commerce on a per-product basis. + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +Odoo allows you to set products as unpublished, effectively disallowing people +from buying these products. However, a company may want to publish a product +online to allow a customer to view the product, but NOT allow the customer to +purchase the product. + +This module addresses that need by adding a toggle for the display of the "Add +to cart" button. + +Usage +===== + +To use this module, you need to: + +#. Go to menu *Website -> Products -> Products* +#. Edit or create one. +#. Within the *eCommerce* tab, there will be a new field named *Display "Add + to Cart" Button* +#. Set it or unset it to enable or disable the *Add To Cart* button in that + product. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* OpenSynergy Indonesia +* Tecnativa +* Akretion +* Coop IT Easy SC + +Contributors +~~~~~~~~~~~~ + +* Michael Viriyananda +* David Vidal +* Chafique Delli +* Carmen Bianca BAKKER + +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_cart_selectable/__init__.py b/website_sale_cart_selectable/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/website_sale_cart_selectable/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/website_sale_cart_selectable/__manifest__.py b/website_sale_cart_selectable/__manifest__.py new file mode 100644 index 0000000000..a123512b0a --- /dev/null +++ b/website_sale_cart_selectable/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2016 OpenSynergy Indonesia +# Copyright 2017 Tecnativa +# Copyright 2020 Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + "name": "Website Sale Cart Selectable", + "summary": 'Add a toggle to products for enabling "Add to Cart"' + " functionality in the e-commerce.", + "version": "16.0.1.0.0", + "category": "Website", + "website": "https://github.com/OCA/e-commerce", + "author": "OpenSynergy Indonesia, Tecnativa," + " Akretion, Coop IT Easy SC, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["website_sale"], + "data": [ + "views/product_view.xml", + "views/website_sale_template.xml", + ], + "installable": True, +} diff --git a/website_sale_cart_selectable/i18n/ca.po b/website_sale_cart_selectable/i18n/ca.po new file mode 100644 index 0000000000..7e4edfad2e --- /dev/null +++ b/website_sale_cart_selectable/i18n/ca.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_cart_selectable +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-01-20 17: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_cart_selectable +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_product__website_btn_addtocart_published +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_template__website_btn_addtocart_published +msgid "Button Add To Cart" +msgstr "Botó afegir a la cistella" + +#. module: website_sale_cart_selectable +#: model:ir.model,name:website_sale_cart_selectable.model_product_template +msgid "Product Template" +msgstr "Plantilla de producte" diff --git a/website_sale_cart_selectable/i18n/es.po b/website_sale_cart_selectable/i18n/es.po new file mode 100644 index 0000000000..c223c6d371 --- /dev/null +++ b/website_sale_cart_selectable/i18n/es.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_cart_selectable +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-11-03 13:08+0000\n" +"Last-Translator: claudiagn \n" +"Language-Team: none\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_cart_selectable +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_product__website_btn_addtocart_published +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_template__website_btn_addtocart_published +msgid "Button Add To Cart" +msgstr "Botón Añadir a la cesta" + +#. module: website_sale_cart_selectable +#: model:ir.model,name:website_sale_cart_selectable.model_product_template +msgid "Product Template" +msgstr "Plantilla de producto" diff --git a/website_sale_cart_selectable/i18n/fr.po b/website_sale_cart_selectable/i18n/fr.po new file mode 100644 index 0000000000..ce3b2fe661 --- /dev/null +++ b/website_sale_cart_selectable/i18n/fr.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_cart_selectable +# +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_cart_selectable +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_product__website_btn_addtocart_published +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_template__website_btn_addtocart_published +msgid "Button Add To Cart" +msgstr "Bouton Ajouter au panier" + +#. module: website_sale_cart_selectable +#: model:ir.model,name:website_sale_cart_selectable.model_product_template +msgid "Product Template" +msgstr "Modèle d'article" diff --git a/website_sale_cart_selectable/i18n/website_sale_cart_selectable.pot b/website_sale_cart_selectable/i18n/website_sale_cart_selectable.pot new file mode 100644 index 0000000000..3dce7fea08 --- /dev/null +++ b/website_sale_cart_selectable/i18n/website_sale_cart_selectable.pot @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_sale_cart_selectable +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: website_sale_cart_selectable +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_product__website_btn_addtocart_published +#: model:ir.model.fields,field_description:website_sale_cart_selectable.field_product_template__website_btn_addtocart_published +msgid "Display \"Add to Cart\" Button" +msgstr "" + +#. module: website_sale_cart_selectable +#: model:ir.model,name:website_sale_cart_selectable.model_product_template +msgid "Product" +msgstr "" diff --git a/website_sale_cart_selectable/models/__init__.py b/website_sale_cart_selectable/models/__init__.py new file mode 100644 index 0000000000..9649db77a1 --- /dev/null +++ b/website_sale_cart_selectable/models/__init__.py @@ -0,0 +1 @@ +from . import product diff --git a/website_sale_cart_selectable/models/product.py b/website_sale_cart_selectable/models/product.py new file mode 100644 index 0000000000..77d1ed1f3f --- /dev/null +++ b/website_sale_cart_selectable/models/product.py @@ -0,0 +1,12 @@ +# Copyright 2016 OpenSynergy Indonesia +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + website_btn_addtocart_published = fields.Boolean( + string='Display "Add to Cart" Button', copy=False, default=True + ) diff --git a/website_sale_cart_selectable/readme/CONTEXT.rst b/website_sale_cart_selectable/readme/CONTEXT.rst new file mode 100644 index 0000000000..23a4bc51e1 --- /dev/null +++ b/website_sale_cart_selectable/readme/CONTEXT.rst @@ -0,0 +1,7 @@ +Odoo allows you to set products as unpublished, effectively disallowing people +from buying these products. However, a company may want to publish a product +online to allow a customer to view the product, but NOT allow the customer to +purchase the product. + +This module addresses that need by adding a toggle for the display of the "Add +to cart" button. diff --git a/website_sale_cart_selectable/readme/CONTRIBUTORS.rst b/website_sale_cart_selectable/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..d56197ec3d --- /dev/null +++ b/website_sale_cart_selectable/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Michael Viriyananda +* David Vidal +* Chafique Delli +* Carmen Bianca BAKKER diff --git a/website_sale_cart_selectable/readme/DESCRIPTION.rst b/website_sale_cart_selectable/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..af9a1094ec --- /dev/null +++ b/website_sale_cart_selectable/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows you to enable or disable the "Add to cart" button in the +e-commerce on a per-product basis. diff --git a/website_sale_cart_selectable/readme/USAGE.rst b/website_sale_cart_selectable/readme/USAGE.rst new file mode 100644 index 0000000000..dfa4b3de8e --- /dev/null +++ b/website_sale_cart_selectable/readme/USAGE.rst @@ -0,0 +1,8 @@ +To use this module, you need to: + +#. Go to menu *Website -> Products -> Products* +#. Edit or create one. +#. Within the *eCommerce* tab, there will be a new field named *Display "Add + to Cart" Button* +#. Set it or unset it to enable or disable the *Add To Cart* button in that + product. diff --git a/website_sale_cart_selectable/static/description/icon.png b/website_sale_cart_selectable/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/website_sale_cart_selectable/static/description/icon.png differ diff --git a/website_sale_cart_selectable/static/description/index.html b/website_sale_cart_selectable/static/description/index.html new file mode 100644 index 0000000000..e48dd579ce --- /dev/null +++ b/website_sale_cart_selectable/static/description/index.html @@ -0,0 +1,459 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Website Sale Cart Selectable

+ +

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

+

This module allows you to enable or disable the “Add to cart” button in the +e-commerce on a per-product basis.

+

Table of contents

+ +
+

Use Cases / Context

+

Odoo allows you to set products as unpublished, effectively disallowing people +from buying these products. However, a company may want to publish a product +online to allow a customer to view the product, but NOT allow the customer to +purchase the product.

+

This module addresses that need by adding a toggle for the display of the “Add +to cart” button.

+
+
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to menu Website -> Products -> Products
  2. +
  3. Edit or create one.
  4. +
  5. Within the eCommerce tab, there will be a new field named Display “Add +to Cart” Button
  6. +
  7. Set it or unset it to enable or disable the Add To Cart button in that +product.
  8. +
+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • OpenSynergy Indonesia
  • +
  • Tecnativa
  • +
  • Akretion
  • +
  • Coop IT Easy SC
  • +
+
+
+

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_cart_selectable/views/product_view.xml b/website_sale_cart_selectable/views/product_view.xml new file mode 100644 index 0000000000..5376f268a9 --- /dev/null +++ b/website_sale_cart_selectable/views/product_view.xml @@ -0,0 +1,14 @@ + + + + + product.template + + + + + + + + + diff --git a/website_sale_cart_selectable/views/website_sale_template.xml b/website_sale_cart_selectable/views/website_sale_template.xml new file mode 100644 index 0000000000..0c63f71da3 --- /dev/null +++ b/website_sale_cart_selectable/views/website_sale_template.xml @@ -0,0 +1,38 @@ + + + + + + + + +