From 84e0472083abb53b11cdd1d5c2c3ce37eca240a9 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Tue, 29 Aug 2023 07:35:23 +0200 Subject: [PATCH] [MIG] website_sale_coupon_page: Renamed to website_sale_loyalty_page + Migration to 16.0 TT44378 --- .../odoo/addons/website_sale_coupon_page | 1 - .../odoo/addons/website_sale_loyalty_page | 1 + .../setup.py | 0 website_sale_loyalty_page/README.rst | 27 +++---- website_sale_loyalty_page/__manifest__.py | 11 ++- website_sale_loyalty_page/controllers/main.py | 19 +++-- website_sale_loyalty_page/i18n/es.po | 72 +++++++++---------- .../i18n/website_sale_coupon_page.pot | 72 +++++++++---------- website_sale_loyalty_page/models/__init__.py | 2 +- .../{coupon_program.py => loyalty_program.py} | 8 +-- .../readme/CONFIGURE.rst | 6 +- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 21 +++--- .../src/js/website_sale_coupon_page_admin.js | 34 --------- ...js => website_sale_loyalty_page_portal.js} | 4 +- .../templates/promotion_templates.xml | 8 +-- website_sale_loyalty_page/tests/__init__.py | 2 +- .../tests/test_website_sale_coupon_page.py | 64 ----------------- .../tests/test_website_sale_loyalty_page.py | 43 +++++++++++ .../views/sale_coupon_program_views.xml | 25 ------- .../views/sale_loyalty_program_views.xml | 28 ++++++++ 21 files changed, 199 insertions(+), 250 deletions(-) delete mode 120000 setup/website_sale_coupon_page/odoo/addons/website_sale_coupon_page create mode 120000 setup/website_sale_loyalty_page/odoo/addons/website_sale_loyalty_page rename setup/{website_sale_coupon_page => website_sale_loyalty_page}/setup.py (100%) rename website_sale_loyalty_page/models/{coupon_program.py => loyalty_program.py} (56%) delete mode 100644 website_sale_loyalty_page/static/src/js/website_sale_coupon_page_admin.js rename website_sale_loyalty_page/static/src/js/{website_sale_coupon_page_portal.js => website_sale_loyalty_page_portal.js} (87%) delete mode 100644 website_sale_loyalty_page/tests/test_website_sale_coupon_page.py create mode 100644 website_sale_loyalty_page/tests/test_website_sale_loyalty_page.py delete mode 100644 website_sale_loyalty_page/views/sale_coupon_program_views.xml create mode 100644 website_sale_loyalty_page/views/sale_loyalty_program_views.xml diff --git a/setup/website_sale_coupon_page/odoo/addons/website_sale_coupon_page b/setup/website_sale_coupon_page/odoo/addons/website_sale_coupon_page deleted file mode 120000 index a27d1eb9a..000000000 --- a/setup/website_sale_coupon_page/odoo/addons/website_sale_coupon_page +++ /dev/null @@ -1 +0,0 @@ -../../../../website_sale_coupon_page \ No newline at end of file diff --git a/setup/website_sale_loyalty_page/odoo/addons/website_sale_loyalty_page b/setup/website_sale_loyalty_page/odoo/addons/website_sale_loyalty_page new file mode 120000 index 000000000..892c946d3 --- /dev/null +++ b/setup/website_sale_loyalty_page/odoo/addons/website_sale_loyalty_page @@ -0,0 +1 @@ +../../../../website_sale_loyalty_page \ No newline at end of file diff --git a/setup/website_sale_coupon_page/setup.py b/setup/website_sale_loyalty_page/setup.py similarity index 100% rename from setup/website_sale_coupon_page/setup.py rename to setup/website_sale_loyalty_page/setup.py diff --git a/website_sale_loyalty_page/README.rst b/website_sale_loyalty_page/README.rst index fd363aea8..80ab156bd 100644 --- a/website_sale_loyalty_page/README.rst +++ b/website_sale_loyalty_page/README.rst @@ -1,6 +1,6 @@ -======================== -Website Sale Coupon Page -======================== +========================= +Website Sale Loyalty Page +========================= .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -14,14 +14,14 @@ Website Sale Coupon Page :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--promotion-lightgray.png?logo=github - :target: https://github.com/OCA/sale-promotion/tree/15.0/website_sale_coupon_page + :target: https://github.com/OCA/sale-promotion/tree/16.0/website_sale_loyalty_page :alt: OCA/sale-promotion .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/sale-promotion-15-0/sale-promotion-15-0-website_sale_coupon_page + :target: https://translation.odoo-community.org/projects/sale-promotion-16-0/sale-promotion-16-0-website_sale_loyalty_page :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/296/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/sale-promotion&target_branch=16.0 + :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -37,10 +37,10 @@ Configuration To show the promotions/coupons on website you need to: -#. Go to *Sales > Products > Promotion Programs/Coupon Programs*. +#. Go to *Website > eCommerce > Loyalty > Discount & Loyalty*. #. Select the program that we will publish. -#. In the Website section, upload an image, add a text or both. -#. Press on the smart button for publishing the promotion/coupon. +#. In the Website tab, upload an image, add a text or both. +#. Press on the smart button for publishing the loyalty. **Note:** The order of the items is defined by a sequence, but the promotions will appear before the coupons. @@ -59,7 +59,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -79,6 +79,7 @@ Contributors * Pedro M. Baeza * Carlos Roca * Stefan Ungureanu + * Pilar Vargas Maintainers ~~~~~~~~~~~ @@ -93,6 +94,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/sale-promotion `_ project on GitHub. +This module is part of the `OCA/sale-promotion `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_sale_loyalty_page/__manifest__.py b/website_sale_loyalty_page/__manifest__.py index 98d949e68..d7ce9d0ee 100644 --- a/website_sale_loyalty_page/__manifest__.py +++ b/website_sale_loyalty_page/__manifest__.py @@ -2,23 +2,22 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { - "name": "Website Sale Coupon Page", - "version": "15.0.1.0.0", + "name": "Website Sale Loyalty Page", + "version": "16.0.1.0.0", "category": "Website", "website": "https://github.com/OCA/sale-promotion", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "LGPL-3", "application": False, "installable": True, - "depends": ["website_sale_coupon"], + "depends": ["website_sale_loyalty"], "data": [ - "views/sale_coupon_program_views.xml", + "views/sale_loyalty_program_views.xml", "templates/promotion_templates.xml", ], "assets": { "web.assets_tests": [ - "/website_sale_coupon_page/static/src/js/website_sale_coupon_page_admin.js", - "/website_sale_coupon_page/static/src/js/website_sale_coupon_page_portal.js", + "/website_sale_loyalty_page/static/src/js/website_sale_loyalty_page_portal.js", ] }, } diff --git a/website_sale_loyalty_page/controllers/main.py b/website_sale_loyalty_page/controllers/main.py index b6607189f..250cb95be 100644 --- a/website_sale_loyalty_page/controllers/main.py +++ b/website_sale_loyalty_page/controllers/main.py @@ -8,7 +8,7 @@ class WebsiteSale(http.Controller): @http.route(["""/promotions"""], type="http", auth="public", website=True) def promotion(self, **post): all_promos = ( - request.env["coupon.program"] + request.env["loyalty.program"] .sudo() .search( [ @@ -21,12 +21,11 @@ def promotion(self, **post): ) values = {"promos": []} for promo in all_promos: - if promo._is_valid_partner(request.env.user.partner_id): - values["promos"].append( - { - "id": promo.id, - "image_1920": promo.image_1920, - "public_name": promo.public_name, - } - ) - return request.render("website_sale_coupon_page.promotion_layout", values) + values["promos"].append( + { + "id": promo.id, + "image_1920": promo.image_1920, + "public_name": promo.public_name, + } + ) + return request.render("website_sale_loyalty_page.promotion_layout", values) diff --git a/website_sale_loyalty_page/i18n/es.po b/website_sale_loyalty_page/i18n/es.po index 2e5fec979..a89500f84 100644 --- a/website_sale_loyalty_page/i18n/es.po +++ b/website_sale_loyalty_page/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * website_sale_coupon_page +# * website_sale_loyalty_page # msgid "" msgstr "" @@ -17,90 +17,90 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 2.0.6\n" -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.available_promotions +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.available_promotions msgid "No promotions available" msgstr "No hay promociones disponibles" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__can_publish +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__can_publish msgid "Can Publish" msgstr "" -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.promotion_item +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.promotion_item msgid "Close" msgstr "Cerrar" -#. module: website_sale_coupon_page -#: model:ir.model,name:website_sale_coupon_page.model_coupon_program -msgid "Coupon display on a website" +#. module: website_sale_loyalty_page +#: model:ir.model,name:website_sale_loyalty_page.model_coupon_program +msgid "Loyalty display on a website" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_1920 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_1920 msgid "Image" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_1024 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_1024 msgid "Image 1024" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_128 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_128 msgid "Image 128" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_256 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_256 msgid "Image 256" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_512 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_512 msgid "Image 512" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__is_published +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__is_published msgid "Is Published" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,help:website_sale_coupon_page.field_coupon_program__public_name +#. module: website_sale_loyalty_page +#: model:ir.model.fields,help:website_sale_loyalty_page.field_coupon_program__public_name msgid "Name of the promo showed on website bellow the banner image." msgstr "" "Nombre de la promoción mostrado en el sitio web debajo del la imagen " "promocional." -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.promotion_layout +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.promotion_layout msgid "Promotions" msgstr "Cupones y Promociones" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__public_name +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__public_name msgid "Public Name" msgstr "Nombre público" -#. module: website_sale_coupon_page -#: model:ir.model.fields,help:website_sale_coupon_page.field_coupon_program__website_url +#. module: website_sale_loyalty_page +#: model:ir.model.fields,help:website_sale_loyalty_page.field_coupon_program__website_url msgid "The full URL to access the document through the website." msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__website_published +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__website_published msgid "Visible on current website" msgstr "" -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.coupon_program_view_form_common +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.coupon_program_view_form_common msgid "Website" msgstr "Sitio Web" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__website_url +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__website_url msgid "Website URL" msgstr "" diff --git a/website_sale_loyalty_page/i18n/website_sale_coupon_page.pot b/website_sale_loyalty_page/i18n/website_sale_coupon_page.pot index 5462ad054..15f6ce166 100644 --- a/website_sale_loyalty_page/i18n/website_sale_coupon_page.pot +++ b/website_sale_loyalty_page/i18n/website_sale_coupon_page.pot @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * website_sale_coupon_page +# * website_sale_loyalty_page # msgid "" msgstr "" @@ -13,87 +13,87 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.available_promotions +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.available_promotions msgid "No promotions available" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__can_publish +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__can_publish msgid "Can Publish" msgstr "" -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.promotion_item +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.promotion_item msgid "Close" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model,name:website_sale_coupon_page.model_coupon_program -msgid "Coupon display on a website" +#. module: website_sale_loyalty_page +#: model:ir.model,name:website_sale_loyalty_page.model_coupon_program +msgid "Loyalty display on a website" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_1920 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_1920 msgid "Image" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_1024 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_1024 msgid "Image 1024" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_128 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_128 msgid "Image 128" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_256 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_256 msgid "Image 256" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__image_512 +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__image_512 msgid "Image 512" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__is_published +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__is_published msgid "Is Published" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,help:website_sale_coupon_page.field_coupon_program__public_name +#. module: website_sale_loyalty_page +#: model:ir.model.fields,help:website_sale_loyalty_page.field_coupon_program__public_name msgid "Name of the promo showed on website bellow the banner image." msgstr "" -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.promotion_layout +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.promotion_layout msgid "Promotions" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__public_name +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__public_name msgid "Public Name" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,help:website_sale_coupon_page.field_coupon_program__website_url +#. module: website_sale_loyalty_page +#: model:ir.model.fields,help:website_sale_loyalty_page.field_coupon_program__website_url msgid "The full URL to access the document through the website." msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__website_published +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__website_published msgid "Visible on current website" msgstr "" -#. module: website_sale_coupon_page -#: model_terms:ir.ui.view,arch_db:website_sale_coupon_page.coupon_program_view_form_common +#. module: website_sale_loyalty_page +#: model_terms:ir.ui.view,arch_db:website_sale_loyalty_page.coupon_program_view_form_common msgid "Website" msgstr "" -#. module: website_sale_coupon_page -#: model:ir.model.fields,field_description:website_sale_coupon_page.field_coupon_program__website_url +#. module: website_sale_loyalty_page +#: model:ir.model.fields,field_description:website_sale_loyalty_page.field_coupon_program__website_url msgid "Website URL" msgstr "" diff --git a/website_sale_loyalty_page/models/__init__.py b/website_sale_loyalty_page/models/__init__.py index e74b5d252..9afd49560 100644 --- a/website_sale_loyalty_page/models/__init__.py +++ b/website_sale_loyalty_page/models/__init__.py @@ -1 +1 @@ -from . import coupon_program +from . import loyalty_program diff --git a/website_sale_loyalty_page/models/coupon_program.py b/website_sale_loyalty_page/models/loyalty_program.py similarity index 56% rename from website_sale_loyalty_page/models/coupon_program.py rename to website_sale_loyalty_page/models/loyalty_program.py index 9deebaa14..aec187119 100644 --- a/website_sale_loyalty_page/models/coupon_program.py +++ b/website_sale_loyalty_page/models/loyalty_program.py @@ -4,10 +4,10 @@ from odoo import fields, models -class CouponProgram(models.Model): - _name = "coupon.program" - _inherit = ["coupon.program", "image.mixin", "website.published.mixin"] - _description = "Coupon display on a website" +class LoyaltyProgram(models.Model): + _name = "loyalty.program" + _inherit = ["loyalty.program", "image.mixin", "website.published.mixin"] + _description = "Loyalty display on a website" public_name = fields.Html( help="Name of the promo showed on website bellow the banner image.", diff --git a/website_sale_loyalty_page/readme/CONFIGURE.rst b/website_sale_loyalty_page/readme/CONFIGURE.rst index 1b54e7160..1d0555cf7 100644 --- a/website_sale_loyalty_page/readme/CONFIGURE.rst +++ b/website_sale_loyalty_page/readme/CONFIGURE.rst @@ -1,9 +1,9 @@ To show the promotions/coupons on website you need to: -#. Go to *Sales > Products > Promotion Programs/Coupon Programs*. +#. Go to *Website > eCommerce > Loyalty > Discount & Loyalty*. #. Select the program that we will publish. -#. In the Website section, upload an image, add a text or both. -#. Press on the smart button for publishing the promotion/coupon. +#. In the Website tab, upload an image, add a text or both. +#. Press on the smart button for publishing the loyalty. **Note:** The order of the items is defined by a sequence, but the promotions will appear before the coupons. diff --git a/website_sale_loyalty_page/readme/CONTRIBUTORS.rst b/website_sale_loyalty_page/readme/CONTRIBUTORS.rst index 93255c3d8..94d722a53 100644 --- a/website_sale_loyalty_page/readme/CONTRIBUTORS.rst +++ b/website_sale_loyalty_page/readme/CONTRIBUTORS.rst @@ -3,3 +3,4 @@ * Pedro M. Baeza * Carlos Roca * Stefan Ungureanu + * Pilar Vargas diff --git a/website_sale_loyalty_page/static/description/index.html b/website_sale_loyalty_page/static/description/index.html index 0b6dab33b..0135402ca 100644 --- a/website_sale_loyalty_page/static/description/index.html +++ b/website_sale_loyalty_page/static/description/index.html @@ -3,8 +3,8 @@ - -Website Sale Coupon Page + +Website Sale Loyalty Page -
-

Website Sale Coupon Page

+
+

Website Sale Loyalty Page

-

Beta License: LGPL-3 OCA/sale-promotion Translate me on Weblate Try me on Runbot

+

Beta License: LGPL-3 OCA/sale-promotion Translate me on Weblate Try me on Runboat

This module allows to publish promotions on Website using banners uploaded to each one.

Table of contents

@@ -387,10 +387,10 @@

Website Sale Coupon Page

Configuration

To show the promotions/coupons on website you need to:

    -
  1. Go to Sales > Products > Promotion Programs/Coupon Programs.
  2. +
  3. Go to Website > eCommerce > Loyalty > Discount & Loyalty.
  4. Select the program that we will publish.
  5. -
  6. In the Website section, upload an image, add a text or both.
  7. -
  8. Press on the smart button for publishing the promotion/coupon.
  9. +
  10. In the Website tab, upload an image, add a text or both.
  11. +
  12. Press on the smart button for publishing the loyalty.

Note: The order of the items is defined by a sequence, but the promotions will appear before the coupons.

@@ -406,7 +406,7 @@

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.

+feedback.

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

@@ -424,6 +424,7 @@

Contributors

  • Pedro M. Baeza
  • Carlos Roca
  • Stefan Ungureanu
  • +
  • Pilar Vargas
  • @@ -435,7 +436,7 @@

    Maintainers

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

    +

    This module is part of the OCA/sale-promotion project on GitHub.

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

    diff --git a/website_sale_loyalty_page/static/src/js/website_sale_coupon_page_admin.js b/website_sale_loyalty_page/static/src/js/website_sale_coupon_page_admin.js deleted file mode 100644 index 9e0d4bc70..000000000 --- a/website_sale_loyalty_page/static/src/js/website_sale_coupon_page_admin.js +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2020 Jairo Llopis - Tecnativa - * License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ - -odoo.define("website_sale_coupon_page.tour_admin", function (require) { - "use strict"; - - const tour = require("web_tour.tour"); - const base = require("web_editor.base"); - - tour.register( - "website_sale_coupon_page_admin", - { - url: "/promotions", - test: true, - wait_for: base.ready(), - }, - [ - { - trigger: - ".card:has(.card-body:has(.card-text:contains('10% discount'))) .card-img-top", - }, - { - trigger: "button:has(span:has(i.fa-times))", - extra_trigger: ".show:has(.modal-body:has(img))", - }, - { - trigger: - ".card:has(.card-body:has(.card-text:contains('10% discount just for admin')))", - extra_trigger: - ".card:has(.card-body:has(.card-text:contains('10% discount just for admin'))):not(:has(.card-img-top))", - }, - ] - ); -}); diff --git a/website_sale_loyalty_page/static/src/js/website_sale_coupon_page_portal.js b/website_sale_loyalty_page/static/src/js/website_sale_loyalty_page_portal.js similarity index 87% rename from website_sale_loyalty_page/static/src/js/website_sale_coupon_page_portal.js rename to website_sale_loyalty_page/static/src/js/website_sale_loyalty_page_portal.js index 6011cd258..db85856af 100644 --- a/website_sale_loyalty_page/static/src/js/website_sale_coupon_page_portal.js +++ b/website_sale_loyalty_page/static/src/js/website_sale_loyalty_page_portal.js @@ -1,13 +1,13 @@ /* Copyright 2020 Jairo Llopis - Tecnativa * License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ -odoo.define("website_sale_coupon_page.tour_portal", function (require) { +odoo.define("website_sale_loyalty_page.tour_portal", function (require) { "use strict"; const tour = require("web_tour.tour"); tour.register( - "website_sale_coupon_page_portal", + "website_sale_loyalty_page_portal", { url: "/promotions", test: true, diff --git a/website_sale_loyalty_page/templates/promotion_templates.xml b/website_sale_loyalty_page/templates/promotion_templates.xml index 8f08262bd..375522590 100644 --- a/website_sale_loyalty_page/templates/promotion_templates.xml +++ b/website_sale_loyalty_page/templates/promotion_templates.xml @@ -4,7 +4,7 @@

    Promotions

    - +
    @@ -13,7 +13,7 @@
    - +
    @@ -37,7 +37,7 @@ > @@ -71,7 +71,7 @@