Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] sale_loyalty_limit: Migration to 17.0 #235

Open
wants to merge 18 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions sale_loyalty_limit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
============
Coupon Limit
============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7ee02c35cf9a86ded5ad53c98fdab3dc5f7b78725d4177bfc9918188e8c7351f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Fsale--promotion-lightgray.png?logo=github
:target: https://github.com/OCA/sale-promotion/tree/17.0/sale_loyalty_limit
: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-17-0/sale-promotion-17-0-sale_loyalty_limit
: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/sale-promotion&target_branch=17.0
:alt: Try me on Runboat

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

This module allows to configure a limit on the times a promotion can be
applied. Two limits can be configured: customer and salesman. Those
limits apply to either programs or coupons.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure customer limits:

1. Go to *Sales > Products > Discount & Loyalty* and select or create a
new one.
2. Set the *Maximum Customer Applications* to the number of times a
program can be used by a customer.

NOTE: The customer limit is applied at commercial entity level, not for
each contact inside the entity.

To configure salesmen limits:

1. Go to *Sales > Products > Discount & Loyalty* and select or create a
new one.
2. Add salesmen to the *Salesmen Limits* list and their maximum number
of applications.
3. You can add different limits to different salesmen groups.
4. If you want to constrain the use of the promotion to the salesmen
list, set the option *Strict limit* on, so any other salesman won't
be able to apply the promotion.

Usage
=====

Once the program limits are configured, apply the programs as usual in
your sale orders.

Once the limit for a customer or a salesman is reached, if we try to
apply a promotion:

- A code promotion will raise an error.
- A program with no code won't be applied.
- A coupon belonging to a limited program will raise an error.
- A promotion applied on the next order won't generate the coupon.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-promotion/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/sale-promotion/issues/new?body=module:%20sale_loyalty_limit%0Aversion:%2017.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
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- David Vidal
- Pilar Vargas

- `Akretion <https://www.akretion.com>`__:

- Florian Mounier

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-chienandalu| image:: https://github.com/chienandalu.png?size=40px
:target: https://github.com/chienandalu
:alt: chienandalu

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

|maintainer-chienandalu|

This module is part of the `OCA/sale-promotion <https://github.com/OCA/sale-promotion/tree/17.0/sale_loyalty_limit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions sale_loyalty_limit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions sale_loyalty_limit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Coupon Limit",
"summary": "Restrict number of promotions per customer or salesman",
"version": "17.0.1.0.0",
"development_status": "Production/Stable",
"category": "Sale",
"website": "https://github.com/OCA/sale-promotion",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["chienandalu"],
"license": "AGPL-3",
"depends": [
"loyalty_limit",
"sale_commercial_partner",
"sale_loyalty_order_line_link",
],
"data": ["security/ir.model.access.csv"],
}
71 changes: 71 additions & 0 deletions sale_loyalty_limit/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_loyalty_limit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-17 09:44+0000\n"
"PO-Revision-Date: 2025-01-17 09:44+0000\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: sale_loyalty_limit
#: model:ir.model,name:sale_loyalty_limit.model_loyalty_program
msgid "Loyalty Program"
msgstr "Programa de fidelización"

#. module: sale_loyalty_limit
#: model:ir.model,name:sale_loyalty_limit.model_loyalty_salesmen_limit
msgid "Loyalty Salesmen limits"
msgstr "Límites de los vendedores fieles"

#. module: sale_loyalty_limit
#: model:ir.model,name:sale_loyalty_limit.model_sale_order
msgid "Sales Order"
msgstr "Pedidos de venta"

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid ""
"This promo code was already applied %(count)s times for this customer and "
"there's an stablished limit of %(max)s for this promotion."
msgstr ""
"Este código promocional ya se ha aplicado %(count)s veces para este cliente y "
"hay un límite establecido de %(max)s para esta promoción."

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid ""
"This promo code was already applied %(times)s times for this salesman and "
"there's an stablished limit of %(max)s for this promotion."
msgstr ""
"Este código promocional ya fue aplicado %(times)s veces para este vendedor y "
"hay un límite establecido de %(max)s para esta promoción."

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid "This promotion is restricted to the listed salesmen."
msgstr "Esta promoción está restringida a los vendedores que figuran en la lista."

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid ""
"This promotion was already applied %(count)s times for this customer and "
"there's an established limit of %(max)s."
msgstr ""
"Esta promoción ya se ha aplicado %(count)s veces para este cliente y "
"hay un límite establecido de %(max)s."
86 changes: 86 additions & 0 deletions sale_loyalty_limit/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_coupon_limit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-06 17:33+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\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.17\n"

#. module: sale_loyalty_limit
#: model:ir.model,name:sale_loyalty_limit.model_loyalty_salesmen_limit
msgid "Loyalty Salesmen limits"
msgstr "Limiti programma fedeltà venditore"

#. module: sale_loyalty_limit
#: model:ir.model,name:sale_loyalty_limit.model_loyalty_program
msgid "Loyalty display on a website"
msgstr "Programma fedeltà visualizzato su sito web"

#. module: sale_loyalty_limit
#: model:ir.model,name:sale_loyalty_limit.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid ""
"This promo code was already applied %(count)s times for this customer and "
"there's an stablished limit of %(max)s for this promotion."
msgstr ""
"Questo buono sconto è già stato applicato %(count)s volte per questo cliente "
"e il limite massimo è di %(max)s per questa promozione."

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid ""
"This promo code was already applied %(times)s times for this salesman and "
"there's an stablished limit of %(max)s for this promotion."
msgstr ""
"Questo buono sconto è già stato applicato %(times)s volte per questo addetto "
"alle vendite e il limite massimo è di %(max)s per questa promozione."

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid "This promotion is restricted to the listed salesmen."
msgstr "Questa promozione è riservata all'addetto alle vendite indicato."

#. module: sale_loyalty_limit
#. odoo-python
#: code:addons/sale_loyalty_limit/models/sale_order.py:0
#, python-format
msgid ""
"This promotion was already applied %(count)s times for this customer and "
"there's an established limit of %(max)s."
msgstr ""
"Questa promozione è già stata applicata %(count)s volte per questo cliente e "
"il limite massimo è di %(max)s."

#~ msgid "Coupon"
#~ msgstr "Buono sconto"

#~ msgid "Coupon Rule"
#~ msgstr "Regola buono sconto"

#, python-format
#~ msgid ""
#~ "This promotion was already applied %(times)s times for this salesman and "
#~ "there's an stablished limit of %(max)s."
#~ msgstr ""
#~ "Questa promozione è già stata applicata %(times)s volte per questo "
#~ "addetto alle vendite e il limite massimo è di %(max)s."
74 changes: 74 additions & 0 deletions sale_loyalty_limit/i18n/sale_coupon_limit.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_coupon_limit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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: sale_coupon_limit
#: model:ir.model,name:sale_coupon_limit.model_coupon_coupon
msgid "Coupon"
msgstr ""

#. module: sale_coupon_limit
#: model:ir.model,name:sale_coupon_limit.model_coupon_rule
msgid "Coupon Rule"
msgstr ""

#. module: sale_coupon_limit
#: model:ir.model,name:sale_coupon_limit.model_coupon_rule_salesmen_limit
msgid "Coupon Rule Salesmen limits"
msgstr ""

#. module: sale_coupon_limit
#: model:ir.model,name:sale_coupon_limit.model_coupon_program
msgid "Coupon display on a website"
msgstr ""

#. module: sale_coupon_limit
#: code:addons/sale_coupon_limit/models/coupon_program.py:0
#, python-format
msgid ""
"This promo code was already applied %(count)s times for this customer and "
"there's an stablished limit of %(max)s for this promotion."
msgstr ""

#. module: sale_coupon_limit
#: code:addons/sale_coupon_limit/models/coupon_program.py:0
#, python-format
msgid ""
"This promo code was already applied %(times)s times for this salesman and "
"there's an stablished limit of %(max)s for this promotion."
msgstr ""

#. module: sale_coupon_limit
#: code:addons/sale_coupon_limit/models/coupon_coupon.py:0
#: code:addons/sale_coupon_limit/models/coupon_program.py:0
#, python-format
msgid "This promotion is restricted to the listed salesmen."
msgstr ""

#. module: sale_coupon_limit
#: code:addons/sale_coupon_limit/models/coupon_coupon.py:0
#: code:addons/sale_coupon_limit/models/coupon_program.py:0
#, python-format
msgid ""
"This promotion was already applied %(count)s times for this customer and "
"there's an stablished limit of %(max)s."
msgstr ""

#. module: sale_coupon_limit
#: code:addons/sale_coupon_limit/models/coupon_coupon.py:0
#, python-format
msgid ""
"This promotion was already applied %(times)s times for this salesman and "
"there's an stablished limit of %(max)s."
msgstr ""
Loading
Loading