diff --git a/pos_loyalty/README.rst b/pos_loyalty/README.rst new file mode 100644 index 00000000..f3441df6 --- /dev/null +++ b/pos_loyalty/README.rst @@ -0,0 +1,105 @@ +=============== +Loyalty Program +=============== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Fpos-lightgray.png?logo=github + :target: https://github.com/OCA/pos/tree/11.0/pos_loyalty + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-11-0/pos-11-0-pos_loyalty + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/184/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to define a loyalty program in the point of sale, +where the customers earn loyalty points and get rewards. + +This module is a forward-port to v10 of the pos_loyalty module from Odoo's +saas-6 branch. +The functionality was moved to the Enterprise edition in later versions. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To use this module, you need to: + +* Go to *Point of Sale > Configuration > Loyalty Programs* and define a new loyalty program with specific rules and rewards. +* Assign the loyalty program to the desired Point of Sale. + +Usage +===== + +The Loyalty Program defines rules for acquiring points and rewards on which they can be spent. + +Rules can be defined globally for all products (fields on loyalty.program) and / or rules that are applied only on specific product or PoS category (loyalty.rule records) on a *points per product sold* or *points per currency spent* basis. The specific rules (loyalty.rule) can be defined as cumulative, which means that they will be aggregated with other matching rules (loyalty.rule records and loyalty.program fields). In the case of non-cumulative rules only the points from that one matching rule are used. Additionally, *fixed points per order* can be added which are applied regardless of whether or not cumulative or non-cumulative rules were applied also. + +Rewards can be of three types: + +* *Gift* - give a single unit of product for free +* *Discount* - give a discount to the whole order. It should be added at the end of the order so that the correct total price is used. +* *Resale* - allow for customer to sell back his earned points. These are calculated by setting the price on the Resale product (*resale_product.list_price* * *customer.loyalty_points*) + +All rewards can define how many points they cost (point_cost) and how many are needed so that the customer can become eligable for the reward (minimum_points). for Gift and Discount rewards minimum_points are considered only if they are greater then the point_cost for that reward (minimum_points > point_cost). For Resale products only minimum_points can be used. + +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 +~~~~~~~ + +* OpenERP SA +* RGB Consulting SL +* Lambda IS + +Contributors +~~~~~~~~~~~~ + +* RGB Consulting SL (http://www.rgbconsulting.com) +* Forward-port from Odoo SA saas-6 branch +* Kiril Vangelovski + +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/pos `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/pos_loyalty/__init__.py b/pos_loyalty/__init__.py new file mode 100644 index 00000000..69f7babd --- /dev/null +++ b/pos_loyalty/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/pos_loyalty/__manifest__.py b/pos_loyalty/__manifest__.py new file mode 100644 index 00000000..b7e7f518 --- /dev/null +++ b/pos_loyalty/__manifest__.py @@ -0,0 +1,36 @@ +# Copyright 2004-2010 OpenERP SA +# Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) +# Copyright 2018 Lambda IS DOOEL +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Loyalty Program', + 'version': '12.0.1.0.0', + 'category': 'Point of Sale', + 'license': 'AGPL-3', + 'author': "OpenERP SA, " + "RGB Consulting SL, " + "Lambda IS, " + "Odoo Community Association (OCA)", + 'website': "https://odoo-community.org/", + 'depends': ['point_of_sale'], + 'demo': [ + 'demo/templates.xml', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/templates.xml', + 'views/loyalty_program_view.xml', + 'views/loyalty_reward_view.xml', + 'views/loyalty_rule_view.xml', + 'views/pos_config_view.xml', + 'views/pos_order_view.xml', + 'views/res_partner_view.xml', + ], + + 'qweb': [ + 'static/src/xml/pos.xml', + ], + + 'installable': True, +} diff --git a/pos_loyalty/demo/templates.xml b/pos_loyalty/demo/templates.xml new file mode 100644 index 00000000..81f834eb --- /dev/null +++ b/pos_loyalty/demo/templates.xml @@ -0,0 +1,8 @@ + + + + diff --git a/pos_loyalty/i18n/es.po b/pos_loyalty/i18n/es.po new file mode 100644 index 00000000..01f984fe --- /dev/null +++ b/pos_loyalty/i18n/es.po @@ -0,0 +1,523 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +# Translators: +# OCA Transbot , 2017 +# enjolras , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-01 02:01+0000\n" +"PO-Revision-Date: 2018-03-01 02:01+0000\n" +"Last-Translator: enjolras , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_order +msgid "" +"Amount of loyalty points given to the customer for each point of sale order" +msgstr "" +"Cantidad de puntos de fidelidad añadidos al cliente por cada pedido del " +"punto de venta" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_product +msgid "Amount of loyalty points given to the customer per product sold" +msgstr "" +"Cantidad de puntos de fidelidad añadidos al cliente por producto vendido" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_currency +msgid "Amount of loyalty points given to the customer per sold currency" +msgstr "Cantidad de puntos de fidelidad añadidos al cliente por moneda vendida" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Amount of points earned per currency" +msgstr "Cantidad de puntos ganados por moneda" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_product +msgid "Amount of points earned per product" +msgstr "Cantidad de puntos ganados por producto" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Category" +msgstr "Categoría" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "Click create to define a Loyalty Program." +msgstr "Haga clic en crear para definir un Programa de Fidelización" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Contact" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_cost +msgid "Cost of the reward per monetary unit discounted" +msgstr "Coste de la recompensa por unidad monetaria descontada" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_date +msgid "Created on" +msgstr "Creado el" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_cumulative +msgid "Cumulative" +msgstr "Acumulativo" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount +#: selection:loyalty.reward,type:0 +msgid "Discount" +msgstr "Descuento" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "Discount Product" +msgstr "Producto de descuento" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_max +msgid "Discount limit" +msgstr "Límite de descuento" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 +#, python-format +msgid "Discount product field is mandatory for discount rewards" +msgstr "" +"El campo Producto de descuento es obligatorio para las recompensas de tipo " +"descuento." + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_display_name +msgid "Display Name" +msgstr "Nombre a mostrar" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Gift" +msgstr "Regalo" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "Gift Product" +msgstr "Producto de regalo" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 +#, python-format +msgid "Gift product field is mandatory for gift rewards" +msgstr "" +"El campo Producto de regalo es obligatorio para las recompensas de tipo " +"regalo" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_id +msgid "ID" +msgstr "ID" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule___last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order_line +#, fuzzy +msgid "Lines of Point of Sale Orders" +msgstr "Pedidos del TPV" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_order_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_users_loyalty_points +msgid "Loyalty Points" +msgstr "Puntos de fidelidad" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_config_loyalty_id +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Loyalty Program" +msgstr "Programa de fidelización" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +#, fuzzy +msgid "Loyalty Program (OCA)" +msgstr "Programa de fidelización" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_name +msgid "Loyalty Program Name" +msgstr "Nombre programa de fidelización" + +#. module: pos_loyalty +#: model:ir.actions.act_window,name:pos_loyalty.loyalty_program_action +#: model:ir.ui.menu,name:pos_loyalty.loyalty_program_menu +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_tree_view +#: model:ir.ui.view,arch_db:pos_loyalty.partner_property_form_view +#: model:ir.ui.view,arch_db:pos_loyalty.pos_order_form_view +msgid "Loyalty Programs" +msgstr "Programas de fidelización" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "" +"Loyalty Programs allow you customers to earn points\n" +" and rewards when purchasing from your shops." +msgstr "" +"Los programas de fidelización le permiten a los clientes ganar puntos\n" +" y recompensas al comprar en tus tiendas." + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_reward_form_view +msgid "Loyalty Reward" +msgstr "Recompensa de fidelización" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_rule_form_view +msgid "Loyalty Rule" +msgstr "Regla de fidelización" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_rounding +msgid "Loyalty point amounts will be rounded to multiples of this value" +msgstr "Los puntos de fidelidad se redondearán a múltiplos de este valor" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +#, fuzzy +msgid "Loyalty program that will be available in this PoS" +msgstr "El programa de fidelización al que pertenece esta regla" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed forthis discount reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_minimum_points +msgid "Minimum Points" +msgstr "Puntos mínimos" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_minimum_points +msgid "" +"Minimum amount of points the customer must have to qualify for this reward" +msgstr "Cantidad mínima de puntos de cliente para acceder a esta recompensa" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:379 +#, python-format +msgid "No Rewards Available" +msgstr "No hay recompensas disponibles" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:393 +#, python-format +msgid "Please select a reward" +msgstr "Selecciona una recompensa" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_cost +msgid "Point Cost" +msgstr "Coste Puntos" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Point Product" +msgstr "Producto Punto" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order +msgid "Point of Sale Orders" +msgstr "Pedidos del TPV" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 +#, python-format +msgid "Point product field is mandatory for point resale rewards" +msgstr "" +"El campo Producto Punto es obligatorio para recompensas de reventa de puntos" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:6 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:71 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:81 +#, python-format +msgid "Points" +msgstr "Puntos" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rounding +msgid "Points Rounding" +msgstr "Redondeo Puntos" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:57 +#, python-format +msgid "Points Spent" +msgstr "Puntos Gastados" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:54 +#, python-format +msgid "Points Won" +msgstr "Puntos Ganados" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_currency +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Points per currency" +msgstr "Puntos por moneda" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_order +msgid "Points per order" +msgstr "Puntos por venta" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_product +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_product +msgid "Points per product" +msgstr "Puntos por producto" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Product" +msgstr "Producto" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Product that represents a point that is sold by the customer" +msgstr "Producto que representa un punto vendido por el cliente" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Resale" +msgstr "Reventa" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_name +msgid "Reward Name" +msgstr "Nombre recompensa" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Reward the customer with gifts or discounts for loyalty points" +msgstr "" +"Recompensar al cliente con regalos o descuentos por puntos de fidelidad" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:25 +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_reward_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +#, python-format +msgid "Rewards" +msgstr "Recompensas" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_name +msgid "Rule Name" +msgstr "Nombre de regla" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rule_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Rules" +msgstr "Reglas" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "" +"Rules define how loyalty points are earned for specific products or " +"categories" +msgstr "" +"Las reglas definen cómo se obtienen puntos de fidelidad para productos o " +"categorías específicos" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_category_id +msgid "Target Category" +msgstr "Categoría afectada" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_product_id +msgid "Target Product" +msgstr "Producto afectado" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_loyalty_program_id +msgid "The Loyalty Program this reward belongs to" +msgstr "El programa de fidelización al que pertenece esta recompensa" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_loyalty_program_id +msgid "The Loyalty Program this rule belongs to" +msgstr "El programa de fidelización al que pertenece esta regla" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_order_loyalty_points +msgid "The amount of Loyalty points awarded to the customer with this order" +msgstr "" +"La cantidad de puntos de fidelidad que el cliente obtiene con este pedido" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_category_id +msgid "The category affected by this rule" +msgstr "La categoría afectada por esta regla" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_type +msgid "The concept this rule applies to" +msgstr "El concepto al que aplica esta regla" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount +msgid "The discount percentage" +msgstr "El porcentaje de descuento" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,help:pos_loyalty.field_res_users_loyalty_points +msgid "The loyalty points the user won as part of a Loyalty Program" +msgstr "" +"Los puntos de fidelidad que el usuario ganó como parte de un Programa de " +"Fidelización" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_config_loyalty_id +msgid "The loyalty program used by this Point of Sale" +msgstr "El programa de fidelización utilizado en este Punto de Venta" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_cumulative +msgid "" +"The points from this rule will be added to points won from other rules with " +"the same concept" +msgstr "" +"Los puntos de esta regla se añadirán a los puntos ganados en otras reglas " +"con el mismo concepto" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_product_id +msgid "The product affected by this rule" +msgstr "El producto afectado por esta regla" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "The product given as a reward" +msgstr "El producto utilizado como recompensa" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "The product used to apply discounts" +msgstr "El producto utilizado para aplicar descuentos" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:380 +#, python-format +msgid "" +"There are no rewards available for this customer as part of the loyalty " +"program" +msgstr "" +"No hay recompensas disponibles para este cliente como parte de este programa " +"de fidelización" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:60 +#, python-format +msgid "Total Points" +msgstr "Total Puntos" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_type +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_type +msgid "Type" +msgstr "Tipo" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_type +msgid "Type of the reward" +msgstr "Tipo de recompensa" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "abc" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_program +msgid "loyalty.program" +msgstr "loyalty.program" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_reward +msgid "loyalty.reward" +msgstr "loyalty.reward" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_rule +msgid "loyalty.rule" +msgstr "loyalty.rule" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_config +msgid "pos.config" +msgstr "pos.config" + +#~ msgid "Partner" +#~ msgstr "Empresa" diff --git a/pos_loyalty/i18n/fr.po b/pos_loyalty/i18n/fr.po new file mode 100644 index 00000000..40565741 --- /dev/null +++ b/pos_loyalty/i18n/fr.po @@ -0,0 +1,504 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +# Translators: +# leemannd , 2017 +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-01 02:01+0000\n" +"PO-Revision-Date: 2018-03-01 02:01+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\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" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_order +msgid "" +"Amount of loyalty points given to the customer for each point of sale order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_product +msgid "Amount of loyalty points given to the customer per product sold" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_currency +msgid "Amount of loyalty points given to the customer per sold currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Amount of points earned per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_product +msgid "Amount of points earned per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Category" +msgstr "Catégorie" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "Click create to define a Loyalty Program." +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Contact" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_cost +msgid "Cost of the reward per monetary unit discounted" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_date +msgid "Created on" +msgstr "Créé le" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_cumulative +msgid "Cumulative" +msgstr "Cumulatif" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount +#: selection:loyalty.reward,type:0 +msgid "Discount" +msgstr "Rabaias" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "Discount Product" +msgstr "Produit Soldé" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_max +msgid "Discount limit" +msgstr "Limite de Rabais" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 +#, python-format +msgid "Discount product field is mandatory for discount rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_display_name +msgid "Display Name" +msgstr "Nom Affiché" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Gift" +msgstr "Cadeau" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "Gift Product" +msgstr "Produit Cadeau" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 +#, python-format +msgid "Gift product field is mandatory for gift rewards" +msgstr "" +"Le champs 'produit cadeau' est nécessaire pour les cadeau de récompense" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_id +msgid "ID" +msgstr "ID" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule___last_update +msgid "Last Modified on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_date +msgid "Last Updated on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order_line +msgid "Lines of Point of Sale Orders" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_order_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_users_loyalty_points +msgid "Loyalty Points" +msgstr "Points de fidélité" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_config_loyalty_id +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Loyalty Program" +msgstr "Programme de Fidélité" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +#, fuzzy +msgid "Loyalty Program (OCA)" +msgstr "Programme de Fidélité" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_name +msgid "Loyalty Program Name" +msgstr "Nom du Programme de Fidélité" + +#. module: pos_loyalty +#: model:ir.actions.act_window,name:pos_loyalty.loyalty_program_action +#: model:ir.ui.menu,name:pos_loyalty.loyalty_program_menu +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_tree_view +#: model:ir.ui.view,arch_db:pos_loyalty.partner_property_form_view +#: model:ir.ui.view,arch_db:pos_loyalty.pos_order_form_view +msgid "Loyalty Programs" +msgstr "Progammes de Fidélité" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "" +"Loyalty Programs allow you customers to earn points\n" +" and rewards when purchasing from your shops." +msgstr "" +"Les programmes de fidélité permettent aux clients de gagner des points\n" +"et des cadeaux lors de leurs achats sur vos sites internet." + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_reward_form_view +msgid "Loyalty Reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_rule_form_view +msgid "Loyalty Rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_rounding +msgid "Loyalty point amounts will be rounded to multiples of this value" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty program that will be available in this PoS" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed forthis discount reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_minimum_points +msgid "Minimum Points" +msgstr "Points Minimum" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_minimum_points +msgid "" +"Minimum amount of points the customer must have to qualify for this reward" +msgstr "Le minimum de points requis pour avoir le droit à cette récompense" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:379 +#, python-format +msgid "No Rewards Available" +msgstr "Pas de récompenses disponible" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:393 +#, python-format +msgid "Please select a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_cost +msgid "Point Cost" +msgstr "Coût en points" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Point Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order +msgid "Point of Sale Orders" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 +#, python-format +msgid "Point product field is mandatory for point resale rewards" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:6 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:71 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:81 +#, python-format +msgid "Points" +msgstr "Points" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rounding +msgid "Points Rounding" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:57 +#, python-format +msgid "Points Spent" +msgstr "Points dépensés" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:54 +#, python-format +msgid "Points Won" +msgstr "Points Gagnés" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_currency +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Points per currency" +msgstr "Points par devise" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_order +msgid "Points per order" +msgstr "Points par commande" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_product +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_product +msgid "Points per product" +msgstr "Points par produit" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Product" +msgstr "Produit" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Product that represents a point that is sold by the customer" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Resale" +msgstr "Revente" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_name +msgid "Reward Name" +msgstr "Nom de Récompense" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Reward the customer with gifts or discounts for loyalty points" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:25 +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_reward_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +#, python-format +msgid "Rewards" +msgstr "Récompenses" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_name +msgid "Rule Name" +msgstr "Nom de Règle" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rule_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Rules" +msgstr "Règles" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "" +"Rules define how loyalty points are earned for specific products or " +"categories" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_category_id +msgid "Target Category" +msgstr "Catégorie cible" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_product_id +msgid "Target Product" +msgstr "Produit Cible" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_loyalty_program_id +msgid "The Loyalty Program this reward belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_loyalty_program_id +msgid "The Loyalty Program this rule belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_order_loyalty_points +msgid "The amount of Loyalty points awarded to the customer with this order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_category_id +msgid "The category affected by this rule" +msgstr "La catégorie affectée par la règle" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_type +msgid "The concept this rule applies to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount +msgid "The discount percentage" +msgstr "Le pourcentage de rabais" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,help:pos_loyalty.field_res_users_loyalty_points +msgid "The loyalty points the user won as part of a Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_config_loyalty_id +msgid "The loyalty program used by this Point of Sale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_cumulative +msgid "" +"The points from this rule will be added to points won from other rules with " +"the same concept" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_product_id +msgid "The product affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "The product given as a reward" +msgstr "Le produit est donné en guise de récompense" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "The product used to apply discounts" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:380 +#, python-format +msgid "" +"There are no rewards available for this customer as part of the loyalty " +"program" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:60 +#, python-format +msgid "Total Points" +msgstr "Points Totaux" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_type +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_type +msgid "Type" +msgstr "Type" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_type +msgid "Type of the reward" +msgstr "Type de récompense" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "abc" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_program +msgid "loyalty.program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_reward +msgid "loyalty.reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_rule +msgid "loyalty.rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_config +msgid "pos.config" +msgstr "pos.config" + +#~ msgid "Partner" +#~ msgstr "Partner" diff --git a/pos_loyalty/i18n/hr_HR.po b/pos_loyalty/i18n/hr_HR.po new file mode 100644 index 00000000..145b5dec --- /dev/null +++ b/pos_loyalty/i18n/hr_HR.po @@ -0,0 +1,498 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-12 02:44+0000\n" +"PO-Revision-Date: 2017-07-12 02:44+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_HR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_order +msgid "" +"Amount of loyalty points given to the customer for each point of sale order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_product +msgid "Amount of loyalty points given to the customer per product sold" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_currency +msgid "Amount of loyalty points given to the customer per sold currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Amount of points earned per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_product +msgid "Amount of points earned per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "Click create to define a Loyalty Program." +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Contact" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_cost +msgid "Cost of the reward per monetary unit discounted" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_uid +msgid "Created by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_date +msgid "Created on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_cumulative +msgid "Cumulative" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount +#: selection:loyalty.reward,type:0 +msgid "Discount" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "Discount Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_max +msgid "Discount limit" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 +#, python-format +msgid "Discount product field is mandatory for discount rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_display_name +msgid "Display Name" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Gift" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "Gift Product" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 +#, python-format +msgid "Gift product field is mandatory for gift rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_id +msgid "ID" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule___last_update +msgid "Last Modified on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_date +msgid "Last Updated on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order_line +msgid "Lines of Point of Sale Orders" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_order_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_users_loyalty_points +msgid "Loyalty Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_config_loyalty_id +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty Program (OCA)" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_name +msgid "Loyalty Program Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,name:pos_loyalty.loyalty_program_action +#: model:ir.ui.menu,name:pos_loyalty.loyalty_program_menu +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_tree_view +#: model:ir.ui.view,arch_db:pos_loyalty.partner_property_form_view +#: model:ir.ui.view,arch_db:pos_loyalty.pos_order_form_view +msgid "Loyalty Programs" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "" +"Loyalty Programs allow you customers to earn points\n" +" and rewards when purchasing from your shops." +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_reward_form_view +msgid "Loyalty Reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_rule_form_view +msgid "Loyalty Rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_rounding +msgid "Loyalty point amounts will be rounded to multiples of this value" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty program that will be available in this PoS" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed forthis discount reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_minimum_points +msgid "Minimum Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_minimum_points +msgid "" +"Minimum amount of points the customer must have to qualify for this reward" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:379 +#, python-format +msgid "No Rewards Available" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:393 +#, python-format +msgid "Please select a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_cost +msgid "Point Cost" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Point Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order +msgid "Point of Sale Orders" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 +#, python-format +msgid "Point product field is mandatory for point resale rewards" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:6 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:71 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:81 +#, python-format +msgid "Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rounding +msgid "Points Rounding" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:57 +#, python-format +msgid "Points Spent" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:54 +#, python-format +msgid "Points Won" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_currency +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Points per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_order +msgid "Points per order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_product +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_product +msgid "Points per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Product that represents a point that is sold by the customer" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Resale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_name +msgid "Reward Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Reward the customer with gifts or discounts for loyalty points" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:25 +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_reward_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +#, python-format +msgid "Rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_name +msgid "Rule Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rule_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Rules" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "" +"Rules define how loyalty points are earned for specific products or " +"categories" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_category_id +msgid "Target Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_product_id +msgid "Target Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_loyalty_program_id +msgid "The Loyalty Program this reward belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_loyalty_program_id +msgid "The Loyalty Program this rule belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_order_loyalty_points +msgid "The amount of Loyalty points awarded to the customer with this order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_category_id +msgid "The category affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_type +msgid "The concept this rule applies to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount +msgid "The discount percentage" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,help:pos_loyalty.field_res_users_loyalty_points +msgid "The loyalty points the user won as part of a Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_config_loyalty_id +msgid "The loyalty program used by this Point of Sale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_cumulative +msgid "" +"The points from this rule will be added to points won from other rules with " +"the same concept" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_product_id +msgid "The product affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "The product given as a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "The product used to apply discounts" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:380 +#, python-format +msgid "" +"There are no rewards available for this customer as part of the loyalty " +"program" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:60 +#, python-format +msgid "Total Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_type +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_type +msgid "Type" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_type +msgid "Type of the reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "abc" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_program +msgid "loyalty.program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_reward +msgid "loyalty.reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_rule +msgid "loyalty.rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_config +msgid "pos.config" +msgstr "pos.config" diff --git a/pos_loyalty/i18n/it.po b/pos_loyalty/i18n/it.po new file mode 100644 index 00000000..62929dfc --- /dev/null +++ b/pos_loyalty/i18n/it.po @@ -0,0 +1,497 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +# Translators: +# Francesco Fresta , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-01 02:01+0000\n" +"PO-Revision-Date: 2018-03-01 02:01+0000\n" +"Last-Translator: Francesco Fresta , 2018\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_order +msgid "" +"Amount of loyalty points given to the customer for each point of sale order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_product +msgid "Amount of loyalty points given to the customer per product sold" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_currency +msgid "Amount of loyalty points given to the customer per sold currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Amount of points earned per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_product +msgid "Amount of points earned per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "Click create to define a Loyalty Program." +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Contact" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_cost +msgid "Cost of the reward per monetary unit discounted" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_uid +msgid "Created by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_date +msgid "Created on" +msgstr "Creato il" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_cumulative +msgid "Cumulative" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount +#: selection:loyalty.reward,type:0 +msgid "Discount" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "Discount Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_max +msgid "Discount limit" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 +#, python-format +msgid "Discount product field is mandatory for discount rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_display_name +msgid "Display Name" +msgstr "Mostra il nome" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Gift" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "Gift Product" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 +#, python-format +msgid "Gift product field is mandatory for gift rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_id +msgid "ID" +msgstr "ID" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule___last_update +msgid "Last Modified on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order_line +#, fuzzy +msgid "Lines of Point of Sale Orders" +msgstr "Punto di riordino" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_order_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_users_loyalty_points +msgid "Loyalty Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_config_loyalty_id +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty Program (OCA)" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_name +msgid "Loyalty Program Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,name:pos_loyalty.loyalty_program_action +#: model:ir.ui.menu,name:pos_loyalty.loyalty_program_menu +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_tree_view +#: model:ir.ui.view,arch_db:pos_loyalty.partner_property_form_view +#: model:ir.ui.view,arch_db:pos_loyalty.pos_order_form_view +msgid "Loyalty Programs" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "" +"Loyalty Programs allow you customers to earn points\n" +" and rewards when purchasing from your shops." +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_reward_form_view +msgid "Loyalty Reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_rule_form_view +msgid "Loyalty Rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_rounding +msgid "Loyalty point amounts will be rounded to multiples of this value" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty program that will be available in this PoS" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed forthis discount reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_minimum_points +msgid "Minimum Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_minimum_points +msgid "" +"Minimum amount of points the customer must have to qualify for this reward" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:379 +#, python-format +msgid "No Rewards Available" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:393 +#, python-format +msgid "Please select a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_cost +msgid "Point Cost" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Point Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order +msgid "Point of Sale Orders" +msgstr "Punto di riordino" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 +#, python-format +msgid "Point product field is mandatory for point resale rewards" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:6 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:71 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:81 +#, python-format +msgid "Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rounding +msgid "Points Rounding" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:57 +#, python-format +msgid "Points Spent" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:54 +#, python-format +msgid "Points Won" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_currency +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Points per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_order +msgid "Points per order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_product +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_product +msgid "Points per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Product that represents a point that is sold by the customer" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Resale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_name +msgid "Reward Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Reward the customer with gifts or discounts for loyalty points" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:25 +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_reward_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +#, python-format +msgid "Rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_name +msgid "Rule Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rule_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Rules" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "" +"Rules define how loyalty points are earned for specific products or " +"categories" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_category_id +msgid "Target Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_product_id +msgid "Target Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_loyalty_program_id +msgid "The Loyalty Program this reward belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_loyalty_program_id +msgid "The Loyalty Program this rule belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_order_loyalty_points +msgid "The amount of Loyalty points awarded to the customer with this order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_category_id +msgid "The category affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_type +msgid "The concept this rule applies to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount +msgid "The discount percentage" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,help:pos_loyalty.field_res_users_loyalty_points +msgid "The loyalty points the user won as part of a Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_config_loyalty_id +msgid "The loyalty program used by this Point of Sale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_cumulative +msgid "" +"The points from this rule will be added to points won from other rules with " +"the same concept" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_product_id +msgid "The product affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "The product given as a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "The product used to apply discounts" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:380 +#, python-format +msgid "" +"There are no rewards available for this customer as part of the loyalty " +"program" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:60 +#, python-format +msgid "Total Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_type +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_type +msgid "Type" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_type +msgid "Type of the reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "abc" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_program +msgid "loyalty.program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_reward +msgid "loyalty.reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_rule +msgid "loyalty.rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_config +msgid "pos.config" +msgstr "pos.config" diff --git a/pos_loyalty/i18n/nl_NL.po b/pos_loyalty/i18n/nl_NL.po new file mode 100644 index 00000000..f63a6572 --- /dev/null +++ b/pos_loyalty/i18n/nl_NL.po @@ -0,0 +1,498 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-12 02:44+0000\n" +"PO-Revision-Date: 2017-07-12 02:44+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_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" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_order +msgid "" +"Amount of loyalty points given to the customer for each point of sale order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_product +msgid "Amount of loyalty points given to the customer per product sold" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_currency +msgid "Amount of loyalty points given to the customer per sold currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Amount of points earned per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_product +msgid "Amount of points earned per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "Click create to define a Loyalty Program." +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Contact" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_cost +msgid "Cost of the reward per monetary unit discounted" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_uid +msgid "Created by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_date +msgid "Created on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_cumulative +msgid "Cumulative" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount +#: selection:loyalty.reward,type:0 +msgid "Discount" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "Discount Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_max +msgid "Discount limit" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 +#, python-format +msgid "Discount product field is mandatory for discount rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_display_name +msgid "Display Name" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Gift" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "Gift Product" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 +#, python-format +msgid "Gift product field is mandatory for gift rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_id +msgid "ID" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule___last_update +msgid "Last Modified on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_date +msgid "Last Updated on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order_line +#, fuzzy +msgid "Lines of Point of Sale Orders" +msgstr "Kassaorders" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_order_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_users_loyalty_points +msgid "Loyalty Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_config_loyalty_id +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty Program (OCA)" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_name +msgid "Loyalty Program Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,name:pos_loyalty.loyalty_program_action +#: model:ir.ui.menu,name:pos_loyalty.loyalty_program_menu +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_tree_view +#: model:ir.ui.view,arch_db:pos_loyalty.partner_property_form_view +#: model:ir.ui.view,arch_db:pos_loyalty.pos_order_form_view +msgid "Loyalty Programs" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "" +"Loyalty Programs allow you customers to earn points\n" +" and rewards when purchasing from your shops." +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_reward_form_view +msgid "Loyalty Reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_rule_form_view +msgid "Loyalty Rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_rounding +msgid "Loyalty point amounts will be rounded to multiples of this value" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty program that will be available in this PoS" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed forthis discount reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_minimum_points +msgid "Minimum Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_minimum_points +msgid "" +"Minimum amount of points the customer must have to qualify for this reward" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:379 +#, python-format +msgid "No Rewards Available" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:393 +#, python-format +msgid "Please select a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_cost +msgid "Point Cost" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Point Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order +msgid "Point of Sale Orders" +msgstr "Kassaorders" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 +#, python-format +msgid "Point product field is mandatory for point resale rewards" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:6 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:71 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:81 +#, python-format +msgid "Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rounding +msgid "Points Rounding" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:57 +#, python-format +msgid "Points Spent" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:54 +#, python-format +msgid "Points Won" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_currency +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Points per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_order +msgid "Points per order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_product +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_product +msgid "Points per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Product that represents a point that is sold by the customer" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Resale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_name +msgid "Reward Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Reward the customer with gifts or discounts for loyalty points" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:25 +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_reward_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +#, python-format +msgid "Rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_name +msgid "Rule Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rule_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Rules" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "" +"Rules define how loyalty points are earned for specific products or " +"categories" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_category_id +msgid "Target Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_product_id +msgid "Target Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_loyalty_program_id +msgid "The Loyalty Program this reward belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_loyalty_program_id +msgid "The Loyalty Program this rule belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_order_loyalty_points +msgid "The amount of Loyalty points awarded to the customer with this order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_category_id +msgid "The category affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_type +msgid "The concept this rule applies to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount +msgid "The discount percentage" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,help:pos_loyalty.field_res_users_loyalty_points +msgid "The loyalty points the user won as part of a Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_config_loyalty_id +msgid "The loyalty program used by this Point of Sale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_cumulative +msgid "" +"The points from this rule will be added to points won from other rules with " +"the same concept" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_product_id +msgid "The product affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "The product given as a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "The product used to apply discounts" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:380 +#, python-format +msgid "" +"There are no rewards available for this customer as part of the loyalty " +"program" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:60 +#, python-format +msgid "Total Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_type +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_type +msgid "Type" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_type +msgid "Type of the reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "abc" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_program +msgid "loyalty.program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_reward +msgid "loyalty.reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_rule +msgid "loyalty.rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_config +msgid "pos.config" +msgstr "pos.config" diff --git a/pos_loyalty/i18n/pos_loyalty.pot b/pos_loyalty/i18n/pos_loyalty.pot new file mode 100644 index 00000000..ae7a17b4 --- /dev/null +++ b/pos_loyalty/i18n/pos_loyalty.pot @@ -0,0 +1,483 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_order +msgid "Amount of loyalty points given to the customer for each point of sale order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_product +msgid "Amount of loyalty points given to the customer per product sold" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_pp_currency +msgid "Amount of loyalty points given to the customer per sold currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Amount of points earned per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_pp_product +msgid "Amount of points earned per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "Click create to define a Loyalty Program." +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Contact" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_cost +msgid "Cost of the reward per monetary unit discounted" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_uid +msgid "Created by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_create_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_create_date +msgid "Created on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_cumulative +msgid "Cumulative" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount +#: selection:loyalty.reward,type:0 +msgid "Discount" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "Discount Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount_max +msgid "Discount limit" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 +#, python-format +msgid "Discount product field is mandatory for discount rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_display_name +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_display_name +msgid "Display Name" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Gift" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "Gift Product" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 +#, python-format +msgid "Gift product field is mandatory for gift rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_id +msgid "ID" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward___last_update +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule___last_update +msgid "Last Modified on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_uid +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_write_date +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_write_date +msgid "Last Updated on" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order_line +msgid "Lines of Point of Sale Orders" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_order_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,field_description:pos_loyalty.field_res_users_loyalty_points +msgid "Loyalty Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_loyalty_program_id +#: model:ir.model.fields,field_description:pos_loyalty.field_pos_config_loyalty_id +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty Program (OCA)" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_name +msgid "Loyalty Program Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,name:pos_loyalty.loyalty_program_action +#: model:ir.ui.menu,name:pos_loyalty.loyalty_program_menu +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_tree_view +#: model:ir.ui.view,arch_db:pos_loyalty.partner_property_form_view +#: model:ir.ui.view,arch_db:pos_loyalty.pos_order_form_view +msgid "Loyalty Programs" +msgstr "" + +#. module: pos_loyalty +#: model:ir.actions.act_window,help:pos_loyalty.loyalty_program_action +msgid "Loyalty Programs allow you customers to earn points\n" +" and rewards when purchasing from your shops." +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_reward_form_view +msgid "Loyalty Reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_rule_form_view +msgid "Loyalty Rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_program_rounding +msgid "Loyalty point amounts will be rounded to multiples of this value" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "Loyalty program that will be available in this PoS" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed forthis discount reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_minimum_points +msgid "Minimum Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_minimum_points +msgid "Minimum amount of points the customer must have to qualify for this reward" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:379 +#, python-format +msgid "No Rewards Available" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:393 +#, python-format +msgid "Please select a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_cost +msgid "Point Cost" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Point Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_order +msgid "Point of Sale Orders" +msgstr "" + +#. module: pos_loyalty +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 +#, python-format +msgid "Point product field is mandatory for point resale rewards" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:6 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:71 +#: code:addons/pos_loyalty/static/src/xml/pos.xml:81 +#, python-format +msgid "Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rounding +msgid "Points Rounding" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:57 +#, python-format +msgid "Points Spent" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:54 +#, python-format +msgid "Points Won" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_currency +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_currency +msgid "Points per currency" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_order +msgid "Points per order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_product +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_pp_product +msgid "Points per product" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.rule,type:0 +msgid "Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_point_product_id +msgid "Product that represents a point that is sold by the customer" +msgstr "" + +#. module: pos_loyalty +#: selection:loyalty.reward,type:0 +msgid "Resale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_name +msgid "Reward Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Reward the customer with gifts or discounts for loyalty points" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:25 +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_reward_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +#, python-format +msgid "Rewards" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_name +msgid "Rule Name" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_rule_ids +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Rules" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.loyalty_program_form_view +msgid "Rules define how loyalty points are earned for specific products or categories" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_category_id +msgid "Target Category" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_product_id +msgid "Target Product" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_loyalty_program_id +msgid "The Loyalty Program this reward belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_loyalty_program_id +msgid "The Loyalty Program this rule belongs to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_order_loyalty_points +msgid "The amount of Loyalty points awarded to the customer with this order" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_category_id +msgid "The category affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_type +msgid "The concept this rule applies to" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount +msgid "The discount percentage" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_res_partner_loyalty_points +#: model:ir.model.fields,help:pos_loyalty.field_res_users_loyalty_points +msgid "The loyalty points the user won as part of a Loyalty Program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_pos_config_loyalty_id +msgid "The loyalty program used by this Point of Sale" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_cumulative +msgid "The points from this rule will be added to points won from other rules with the same concept" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_rule_product_id +msgid "The product affected by this rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_gift_product_id +msgid "The product given as a reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_product_id +msgid "The product used to apply discounts" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:380 +#, python-format +msgid "There are no rewards available for this customer as part of the loyalty program" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/xml/pos.xml:60 +#, python-format +msgid "Total Points" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_type +#: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_type +msgid "Type" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_type +msgid "Type of the reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_view_form +msgid "abc" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_program +msgid "loyalty.program" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_reward +msgid "loyalty.reward" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_loyalty_rule +msgid "loyalty.rule" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_pos_config +msgid "pos.config" +msgstr "" + diff --git a/pos_loyalty/models/__init__.py b/pos_loyalty/models/__init__.py new file mode 100644 index 00000000..d6885ec8 --- /dev/null +++ b/pos_loyalty/models/__init__.py @@ -0,0 +1,9 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import loyalty_program +from . import loyalty_reward +from . import loyalty_rule +from . import pos_config +from . import pos_order +from . import pos_order_line +from . import res_partner diff --git a/pos_loyalty/models/loyalty_program.py b/pos_loyalty/models/loyalty_program.py new file mode 100644 index 00000000..a3493beb --- /dev/null +++ b/pos_loyalty/models/loyalty_program.py @@ -0,0 +1,30 @@ +# Copyright 2004-2010 OpenERP SA +# Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class LoyaltyProgram(models.Model): + _name = 'loyalty.program' + + name = fields.Char(string='Loyalty Program Name', size=32, index=True, + required=True) + pp_currency = fields.Float(string='Points per currency', + help='Amount of loyalty points given to the ' + 'customer per sold currency') + pp_product = fields.Float(string='Points per product', + help='Amount of loyalty points given to the ' + 'customer per product sold') + pp_order = fields.Float(string='Points per order', + help='Amount of loyalty points given to the ' + 'customer for each point of sale order') + rounding = fields.Float(string='Points Rounding', default=1, + help='Loyalty point amounts will be rounded to ' + 'multiples of this value') + rule_ids = fields.One2many(comodel_name='loyalty.rule', + inverse_name='loyalty_program_id', + string='Rules') + reward_ids = fields.One2many(comodel_name='loyalty.reward', + inverse_name='loyalty_program_id', + string='Rewards') diff --git a/pos_loyalty/models/loyalty_reward.py b/pos_loyalty/models/loyalty_reward.py new file mode 100644 index 00000000..ac3d97eb --- /dev/null +++ b/pos_loyalty/models/loyalty_reward.py @@ -0,0 +1,73 @@ +# Copyright 2004-2010 OpenERP SA +# Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) +# Copyright 2018 Lambda IS DOOEL +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models, api, _ +from odoo.exceptions import ValidationError + + +class LoyaltyReward(models.Model): + _name = 'loyalty.reward' + + name = fields.Char(string='Reward Name', size=32, index=True, + required=True) + type = fields.Selection(selection=[('gift', 'Gift'), + ('discount', 'Discount'), + ('resale', 'Resale')], + string='Type', required=True, + help='Type of the reward') + minimum_points = fields.Float(string='Minimum Points', + help='Minimum amount of points the customer' + ' must have to qualify for this reward') + point_cost = fields.Float(string='Point Cost', + help='Cost of the reward per monetary unit ' + 'discounted') + discount = fields.Float(help='The discount percentage') + discount_max = fields.Float(string='Discount limit', + help='Maximum discounted amount allowed for' + 'this discount reward') + loyalty_program_id = fields.Many2one(comodel_name='loyalty.program', + string='Loyalty Program', + help='The Loyalty Program this reward' + ' belongs to') + gift_product_id = fields.Many2one(comodel_name='product.product', + domain=[('available_in_pos', '=', True)], + string='Gift Product', + help='The product given as a reward') + discount_product_id = fields.Many2one(comodel_name='product.product', + domain=[ + ('available_in_pos', '=', True)], + string='Discount Product', + help='The product used to apply ' + 'discounts') + point_product_id = fields.Many2one(comodel_name='product.product', + domain=[ + ('available_in_pos', '=', True)], + string='Point Product', + help='Product that represents a point ' + 'that is sold by the customer') + + @api.multi + @api.constrains('type', 'gift_product_id') + def _check_gift_product(self): + for reward in self: + if reward.type == 'gift' and not reward.gift_product_id: + raise ValidationError( + _('Gift product field is mandatory for gift rewards')) + + @api.multi + @api.constrains('type', 'discount_product_id') + def _check_discount_product(self): + for reward in self: + if reward.type == 'discount' and not reward.discount_product_id: + raise ValidationError(_('Discount product field is ' + 'mandatory for discount rewards')) + + @api.multi + @api.constrains('type', 'point_product_id') + def _check_point_product(self): + for reward in self: + if reward.type == 'resale' and not reward.point_product_id: + raise ValidationError(_('Point product field is ' + 'mandatory for point resale rewards')) diff --git a/pos_loyalty/models/loyalty_rule.py b/pos_loyalty/models/loyalty_rule.py new file mode 100644 index 00000000..85caafe6 --- /dev/null +++ b/pos_loyalty/models/loyalty_rule.py @@ -0,0 +1,34 @@ +# Copyright 2004-2010 OpenERP SA +# Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) +# Copyright 2018 Lambda IS DOOEL +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class LoyaltyRule(models.Model): + _name = 'loyalty.rule' + + name = fields.Char(string='Rule Name', size=32, index=True, required=True) + type = fields.Selection(selection=[('product', 'Product'), + ('category', 'Category')], + string='Type', required=True, default='product', + help='The concept this rule applies to') + cumulative = fields.Boolean(help='The points from this rule will be added ' + 'to points won from other rules with ' + 'the same concept') + pp_product = fields.Float(string='Points per product', + help='Amount of points earned per product') + pp_currency = fields.Float(string='Points per currency', + help='Amount of points earned per currency') + loyalty_program_id = fields.Many2one(comodel_name='loyalty.program', + string='Loyalty Program', + help='The Loyalty Program this rule ' + 'belongs to') + product_id = fields.Many2one(comodel_name='product.product', + domain=[('available_in_pos', '=', True)], + string='Target Product', + help='The product affected by this rule') + category_id = fields.Many2one(comodel_name='pos.category', + string='Target Category', + help='The category affected by this rule') diff --git a/pos_loyalty/models/pos_config.py b/pos_loyalty/models/pos_config.py new file mode 100644 index 00000000..b39e549d --- /dev/null +++ b/pos_loyalty/models/pos_config.py @@ -0,0 +1,14 @@ +# Copyright 2004-2010 OpenERP SA +# Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class PosConfig(models.Model): + _inherit = 'pos.config' + + loyalty_id = fields.Many2one(comodel_name='loyalty.program', + string='Loyalty Program', + help='The loyalty program used by this ' + 'Point of Sale') diff --git a/pos_loyalty/models/pos_order.py b/pos_loyalty/models/pos_order.py new file mode 100644 index 00000000..bc644065 --- /dev/null +++ b/pos_loyalty/models/pos_order.py @@ -0,0 +1,30 @@ +# Copyright 2004-2010 OpenERP SA +# Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models, api + + +class PosOrder(models.Model): + _inherit = 'pos.order' + + loyalty_points = fields.Float(string='Loyalty Points', + help='The amount of Loyalty points awarded ' + 'to the customer with this order') + + @api.model + def _order_fields(self, ui_order): + res = super(PosOrder, self)._order_fields(ui_order) + res['loyalty_points'] = ui_order.get('loyalty_points', 0) + return res + + @api.model + def create_from_ui(self, orders): + res = super(PosOrder, self).create_from_ui(orders) + for order in orders: + order_partner = order['data']['partner_id'] + order_points = order['data'].get('loyalty_points', 0) + if order_points != 0 and order_partner: + partner = self.env['res.partner'].browse(order_partner) + partner.loyalty_points += order_points + return res diff --git a/pos_loyalty/models/pos_order_line.py b/pos_loyalty/models/pos_order_line.py new file mode 100644 index 00000000..fe9182f5 --- /dev/null +++ b/pos_loyalty/models/pos_order_line.py @@ -0,0 +1,20 @@ +# Copyright 2018 Lambda IS DOOEL +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, models + + +class PosOrderLine(models.Model): + _inherit = 'pos.order.line' + + @api.model + def _order_line_fields(self, line, session_id=None): + line = super(PosOrderLine, self)._order_line_fields( + line, session_id=session_id) + if line and 'reward_id' in line[2]: + # Delete the key since field doesn't exist + # and raises a warning in the logs. + # TODO: add field and remove this if data will be + # used on server, example in report / widget. + del line[2]['reward_id'] + return line diff --git a/pos_loyalty/models/res_partner.py b/pos_loyalty/models/res_partner.py new file mode 100644 index 00000000..60350f04 --- /dev/null +++ b/pos_loyalty/models/res_partner.py @@ -0,0 +1,13 @@ +# Copyright 2004-2010 OpenERP SA +# Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + loyalty_points = fields.Float(string='Loyalty Points', + help='The loyalty points the user won as ' + 'part of a Loyalty Program') diff --git a/pos_loyalty/readme/CONFIGURE.rst b/pos_loyalty/readme/CONFIGURE.rst new file mode 100644 index 00000000..7c7dac48 --- /dev/null +++ b/pos_loyalty/readme/CONFIGURE.rst @@ -0,0 +1,4 @@ +To use this module, you need to: + +* Go to *Point of Sale > Configuration > Loyalty Programs* and define a new loyalty program with specific rules and rewards. +* Assign the loyalty program to the desired Point of Sale. diff --git a/pos_loyalty/readme/CONTRIBUTORS.rst b/pos_loyalty/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..4ec3dbcc --- /dev/null +++ b/pos_loyalty/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* RGB Consulting SL (http://www.rgbconsulting.com) +* Forward-port from Odoo SA saas-6 branch +* Kiril Vangelovski diff --git a/pos_loyalty/readme/DESCRIPTION.rst b/pos_loyalty/readme/DESCRIPTION.rst new file mode 100644 index 00000000..66ab8c12 --- /dev/null +++ b/pos_loyalty/readme/DESCRIPTION.rst @@ -0,0 +1,6 @@ +This module allows you to define a loyalty program in the point of sale, +where the customers earn loyalty points and get rewards. + +This module is a forward-port to v12 of the pos_loyalty module from Odoo's +saas-6 branch. +The functionality was moved to the Enterprise edition in later versions. diff --git a/pos_loyalty/readme/USAGE.rst b/pos_loyalty/readme/USAGE.rst new file mode 100644 index 00000000..741eecfc --- /dev/null +++ b/pos_loyalty/readme/USAGE.rst @@ -0,0 +1,11 @@ +The Loyalty Program defines rules for acquiring points and rewards on which they can be spent. + +Rules can be defined globally for all products (fields on loyalty.program) and / or rules that are applied only on specific product or PoS category (loyalty.rule records) on a *points per product sold* or *points per currency spent* basis. The specific rules (loyalty.rule) can be defined as cumulative, which means that they will be aggregated with other matching rules (loyalty.rule records and loyalty.program fields). In the case of non-cumulative rules only the points from that one matching rule are used. Additionally, *fixed points per order* can be added which are applied regardless of whether or not cumulative or non-cumulative rules were applied also. + +Rewards can be of three types: + +* *Gift* - give a single unit of product for free +* *Discount* - give a discount to the whole order. It should be added at the end of the order so that the correct total price is used. +* *Resale* - allow for customer to sell back his earned points. These are calculated by setting the price on the Resale product (*resale_product.list_price* * *customer.loyalty_points*) + +All rewards can define how many points they cost (point_cost) and how many are needed so that the customer can become eligable for the reward (minimum_points). for Gift and Discount rewards minimum_points are considered only if they are greater then the point_cost for that reward (minimum_points > point_cost). For Resale products only minimum_points can be used. diff --git a/pos_loyalty/security/ir.model.access.csv b/pos_loyalty/security/ir.model.access.csv new file mode 100644 index 00000000..8c13e017 --- /dev/null +++ b/pos_loyalty/security/ir.model.access.csv @@ -0,0 +1,7 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_loyalty_program,loyalty.program.user,model_loyalty_program,point_of_sale.group_pos_user,1,0,0,0 +access_loyalty_program_manager,loyalty.program.manager,model_loyalty_program,point_of_sale.group_pos_manager,1,1,1,1 +access_loyalty_rule,loyalty.rule.user,model_loyalty_rule,point_of_sale.group_pos_user,1,0,0,0 +access_loyalty_rule_manager,loyalty.rule.manager,model_loyalty_rule,point_of_sale.group_pos_manager,1,1,1,1 +access_loyalty_reward,loyalty.reward.user,model_loyalty_reward,point_of_sale.group_pos_user,1,0,0,0 +access_loyalty_reward_manager,loyalty.reward.manager,model_loyalty_reward,point_of_sale.group_pos_manager,1,1,1,1 diff --git a/pos_loyalty/static/description/icon.png b/pos_loyalty/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/pos_loyalty/static/description/icon.png differ diff --git a/pos_loyalty/static/description/index.html b/pos_loyalty/static/description/index.html new file mode 100644 index 00000000..55bd7ebb --- /dev/null +++ b/pos_loyalty/static/description/index.html @@ -0,0 +1,449 @@ + + + + + + +Loyalty Program + + + +
+

Loyalty Program

+ + +

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

+

This module allows you to define a loyalty program in the point of sale, +where the customers earn loyalty points and get rewards.

+

This module is a forward-port to v10 of the pos_loyalty module from Odoo’s +saas-6 branch. +The functionality was moved to the Enterprise edition in later versions.

+

Table of contents

+ +
+

Configuration

+

To use this module, you need to:

+
    +
  • Go to Point of Sale > Configuration > Loyalty Programs and define a new loyalty program with specific rules and rewards.
  • +
  • Assign the loyalty program to the desired Point of Sale.
  • +
+
+
+

Usage

+

The Loyalty Program defines rules for acquiring points and rewards on which they can be spent.

+

Rules can be defined globally for all products (fields on loyalty.program) and / or rules that are applied only on specific product or PoS category (loyalty.rule records) on a points per product sold or points per currency spent basis. The specific rules (loyalty.rule) can be defined as cumulative, which means that they will be aggregated with other matching rules (loyalty.rule records and loyalty.program fields). In the case of non-cumulative rules only the points from that one matching rule are used. Additionally, fixed points per order can be added which are applied regardless of whether or not cumulative or non-cumulative rules were applied also.

+

Rewards can be of three types:

+
    +
  • Gift - give a single unit of product for free
  • +
  • Discount - give a discount to the whole order. It should be added at the end of the order so that the correct total price is used.
  • +
  • Resale - allow for customer to sell back his earned points. These are calculated by setting the price on the Resale product (resale_product.list_price * customer.loyalty_points)
  • +
+

All rewards can define how many points they cost (point_cost) and how many are needed so that the customer can become eligable for the reward (minimum_points). for Gift and Discount rewards minimum_points are considered only if they are greater then the point_cost for that reward (minimum_points > point_cost). For Resale products only minimum_points can be used.

+
+
+

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

+
    +
  • OpenERP SA
  • +
  • RGB Consulting SL
  • +
  • Lambda IS
  • +
+
+
+

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

+

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

+
+
+
+ + diff --git a/pos_loyalty/static/src/css/pos.css b/pos_loyalty/static/src/css/pos.css new file mode 100644 index 00000000..4d141918 --- /dev/null +++ b/pos_loyalty/static/src/css/pos.css @@ -0,0 +1,21 @@ + +.pos .order .summary .loyalty-points{ + margin-left: 20px; + float: left; + padding: 10px; + max-width: 216px; + text-align: left; + color: #6EC89B; + background: rgba(110, 200, 155, 0.17); + border-radius: 3px; +} +.pos .order .summary .loyalty-points.negative{ + color: #C86E6E; + background: rgba(200, 110, 110, 0.17); +} +.pos .order .summary .loyalty-points-total { + border-top: solid 2px; + text-align: center; + padding-top: 4px; + margin-top: 4px; +} diff --git a/pos_loyalty/static/src/js/pos.js b/pos_loyalty/static/src/js/pos.js new file mode 100644 index 00000000..91f07f86 --- /dev/null +++ b/pos_loyalty/static/src/js/pos.js @@ -0,0 +1,477 @@ +/* Copyright 2004-2010 OpenERP SA + * Copyright 2017 RGB Consulting S.L. (https://www.rgbconsulting.com) + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ + +odoo.define('pos_loyalty.loyalty_program', function(require) { + "use strict" + + var models = require('point_of_sale.models'); + var screens = require('point_of_sale.screens'); + + var utils = require('web.utils'); + var round_pr = utils.round_precision; + + var core = require('web.core'); + var QWeb = core.qweb; + var _t = core._t; + + models.load_fields('res.partner', 'loyalty_points'); + + models.load_models([{ + model: 'loyalty.program', + condition: function(self) { + return !!self.config.loyalty_id[0]; + }, + fields: ['name', 'pp_currency', 'pp_product', 'pp_order', 'rounding'], + domain: function(self) { + return [ + ['id', '=', self.config.loyalty_id[0]] + ]; + }, + loaded: function(self, loyalties) { + self.loyalty = loyalties[0]; + }, + }, { + model: 'loyalty.rule', + condition: function(self) { + return !!self.loyalty; + }, + fields: ['name', 'type', 'product_id', 'category_id', 'cumulative', 'pp_product', 'pp_currency'], + domain: function(self) { + return [ + ['loyalty_program_id', '=', self.loyalty.id] + ]; + }, + loaded: function(self, rules) { + + self.loyalty.rules = rules; + self.loyalty.rules_by_product_id = {}; + self.loyalty.rules_by_category_id = {}; + + function update_rules(rules, rule, id) { + if (!rules[id]) { + rules[id] = [rule]; + } else if (rule.cumulative) { + rules[id].unshift(rule); + } else { + rules[id].push(rule); + } + } + + _.each(rules, function(rule) { + if (rule.type === 'product') + update_rules(self.loyalty.rules_by_product_id, rule, rule.product_id[0]) + else if (rule.type === 'category') + update_rules(self.loyalty.rules_by_category_id, rule, rule.category_id[0]); + }); + }, + }, { + model: 'loyalty.reward', + condition: function(self) { + return !!self.loyalty; + }, + fields: ['name', 'type', 'minimum_points', 'gift_product_id', 'point_cost', 'discount_product_id', 'discount', 'discount_max', 'point_product_id'], + domain: function(self) { + return [ + ['loyalty_program_id', '=', self.loyalty.id] + ]; + }, + loaded: function(self, rewards) { + self.loyalty.rewards = rewards; + self.loyalty.rewards_by_id = {}; + for (var i = 0; i < rewards.length; i++) { + self.loyalty.rewards_by_id[rewards[i].id] = rewards[i]; + } + }, + }, ], { + 'after': 'product.product' + }); + + var _orderline_super = models.Orderline.prototype; + models.Orderline = models.Orderline.extend({ + get_reward: function() { + return this.pos.loyalty.rewards_by_id[this.reward_id]; + }, + set_reward: function(reward) { + this.reward_id = reward.id; + }, + export_as_JSON: function() { + var json = _orderline_super.export_as_JSON.apply(this, arguments); + json.reward_id = this.reward_id; + return json; + }, + init_from_JSON: function(json) { + _orderline_super.init_from_JSON.apply(this, arguments); + this.reward_id = json.reward_id; + }, + }); + + var _order_super = models.Order.prototype; + models.Order = models.Order.extend({ + + /* The total of points won, excluding the points spent on rewards */ + get_won_points: function() { + if (!this.pos.loyalty || !this.get_client()) { + return 0; + } + + var orderLines = this.get_orderlines(); + var rounding = this.pos.loyalty.rounding; + + var product_sold = 0; + var total_sold = 0; + var total_points = 0; + + for (var i = 0; i < orderLines.length; i++) { + var line = orderLines[i]; + var product = line.get_product(); + var rules = this.pos.loyalty.rules_by_product_id[product.id] || []; + var overriden = false; + + if (line.get_reward()) { // Reward products are ignored + continue; + } + + for (var j = 0; j < rules.length; j++) { + var rule = rules[j]; + total_points += round_pr(line.get_quantity() * rule.pp_product, rounding); + total_points += round_pr(line.get_price_with_tax() * rule.pp_currency, rounding); + // if affected by a non cumulative rule, skip the others. (non cumulative rules are put + // at the beginning of the list when they are loaded ) + if (!rule.cumulative) { + overriden = true; + break; + } + } + + // Test the category rules + if (product.pos_categ_id) { + var category = this.pos.db.get_category_by_id(product.pos_categ_id[0]); + while (category && !overriden) { + var rules = this.pos.loyalty.rules_by_category_id[category.id] || []; + for (var j = 0; j < rules.length; j++) { + var rule = rules[j]; + total_points += round_pr(line.get_quantity() * rule.pp_product, rounding); + total_points += round_pr(line.get_price_with_tax() * rule.pp_currency, rounding); + if (!rule.cumulative) { + overriden = true; + break; + } + } + var _category = category; + category = this.pos.db.get_category_by_id(this.pos.db.get_category_parent_id(category.id)); + if (_category === category) { + break; + } + } + } + + if (!overriden) { + product_sold += line.get_quantity(); + total_sold += line.get_price_with_tax(); + } + } + + total_points += round_pr(total_sold * this.pos.loyalty.pp_currency, rounding); + total_points += round_pr(product_sold * this.pos.loyalty.pp_product, rounding); + total_points += round_pr(this.pos.loyalty.pp_order, rounding); + + return total_points; + }, + + /* The total number of points spent on rewards */ + get_spent_points: function() { + if (!this.pos.loyalty || !this.get_client()) { + return 0; + } else { + var lines = this.get_orderlines(); + var rounding = this.pos.loyalty.rounding; + var points = 0; + + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var reward = line.get_reward(); + if (reward) { + if (reward.type === 'gift') { + points += round_pr(line.get_quantity() * reward.point_cost, rounding); + } else if (reward.type === 'discount') { + points += reward.point_cost; + } else if (reward.type === 'resale') { + points += (-line.get_quantity()); + } + } + } + + return points; + } + }, + + /* The total number of points lost or won after the order is validated */ + get_new_points: function() { + if (!this.pos.loyalty || !this.get_client()) { + return 0; + } else { + return round_pr(this.get_won_points() - this.get_spent_points(), this.pos.loyalty.rounding); + } + }, + + /* The total number of points that the customer will have after this order is validated */ + get_new_total_points: function() { + if (!this.pos.loyalty || !this.get_client()) { + return 0; + } else { + return round_pr(this.get_client().loyalty_points + this.get_new_points(), this.pos.loyalty.rounding); + } + }, + + /* The number of loyalty points currently owned by the customer */ + get_current_points: function() { + return this.get_client() ? this.get_client().loyalty_points : 0; + }, + + /* The total number of points spendable on rewards */ + get_spendable_points: function() { + if (!this.pos.loyalty || !this.get_client()) { + return 0; + } else { + return round_pr(this.get_client().loyalty_points - this.get_spent_points(), this.pos.loyalty.rounding); + } + }, + + has_discount_reward: function() { + var res = false; + var lines = this.get_orderlines(); + + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var reward = line.get_reward(); + if (reward && reward.type === 'discount') { + res = true; + break; + } + } + return res; + }, + + /* The list of rewards that the current customer can get */ + get_available_rewards: function() { + var client = this.get_client(); + if (!client) { + return []; + } + var rewards = []; + var discount_reward_set = this.has_discount_reward(); + for (var i = 0; i < this.pos.loyalty.rewards.length; i++) { + var reward = this.pos.loyalty.rewards[i]; + + if (reward.minimum_points > this.get_spendable_points()) { + continue; + } else if (reward.type === 'gift' && + reward.point_cost > this.get_spendable_points()) { + continue; + } else if (reward.type === 'discount' && + (discount_reward_set || reward.point_cost > this.get_spendable_points())) { + continue; + } + rewards.push(reward); + } + return rewards; + }, + + apply_reward: function(reward) { + var client = this.get_client(); + if (!client) { + return; + } else if (reward.type === 'gift') { + var product = this.pos.db.get_product_by_id(reward.gift_product_id[0]); + + if (!product) { + return; + } + + this.add_product(product, { + price: 0, + quantity: 1, + merge: false, + extras: { + reward_id: reward.id + }, + }); + + } else if (reward.type === 'discount') { + + var crounding = this.pos.currency.rounding; + var order_total = this.get_total_with_tax(); + var discount = round_pr(order_total * reward.discount, crounding); + var discount_max = reward.discount_max + + if (discount_max && discount > discount_max) { + discount = discount_max; + } + + var product = this.pos.db.get_product_by_id(reward.discount_product_id[0]); + + if (!product) { + return; + } + + this.add_product(product, { + price: -discount, + quantity: 1, + merge: false, + extras: { + reward_id: reward.id + }, + }); + + } else if (reward.type === 'resale') { + + var lrounding = this.pos.loyalty.rounding; + var crounding = this.pos.currency.rounding; + var spendable = this.get_spendable_points(); + + var order_total = this.get_total_with_tax(); + var product = this.pos.db.get_product_by_id(reward.point_product_id[0]); + + if (!product) { + return; + } + + if (round_pr(spendable * product.price, crounding) > order_total) { + spendable = round_pr(Math.floor(order_total / product.price), lrounding); + } + + if (spendable < 0.00001) { + return; + } + + this.add_product(product, { + quantity: -spendable, + merge: false, + extras: { + reward_id: reward.id + }, + }); + } + }, + + finalize: function() { + var client = this.get_client(); + if (client) { + client.loyalty_points = this.get_new_total_points(); + this.pos.gui.screen_instances.clientlist.partner_cache.clear_node(client.id); + } + _order_super.finalize.apply(this, arguments); + }, + + export_for_printing: function() { + var json = _order_super.export_for_printing.apply(this, arguments); + if (this.pos.loyalty && this.get_client()) { + json.loyalty = { + rounding: this.pos.loyalty.rounding || 1, + name: this.pos.loyalty.name, + client: this.get_client().name, + points_won: this.get_won_points(), + points_spent: this.get_spent_points(), + points_total: this.get_new_total_points(), + }; + } + return json; + }, + + export_as_JSON: function() { + var json = _order_super.export_as_JSON.apply(this, arguments); + json.loyalty_points = this.get_new_points(); + return json; + }, + }); + + var LoyaltyButton = screens.ActionButtonWidget.extend({ + template: 'LoyaltyButton', + button_click: function() { + var self = this; + var order = this.pos.get_order(); + var client = order.get_client(); + if (!client) { + this.gui.show_screen('clientlist'); + return; + } + + var rewards = order.get_available_rewards(); + if (rewards.length === 0) { + this.gui.show_popup('error', { + 'title': _t('No Rewards Available'), + 'body': _t('There are no rewards available for this customer as part of the loyalty program'), + }); + } else if (rewards.length === 1 && this.pos.loyalty.rewards.length === 1) { + order.apply_reward(rewards[0]); + } else { + var list = []; + for (var i = 0; i < rewards.length; i++) { + list.push({ + label: rewards[i].name, + item: rewards[i], + }); + } + this.gui.show_popup('selection', { + 'title': _t('Please select a reward'), + 'list': list, + 'confirm': function(reward) { + order.apply_reward(reward); + }, + }); + } + }, + }); + + screens.define_action_button({ + 'name': 'loyalty', + 'widget': LoyaltyButton, + 'condition': function() { + return this.pos.loyalty && this.pos.loyalty.rewards.length; + }, + }); + + screens.OrderWidget.include({ + update_summary: function() { + this._super(); + + var order = this.pos.get_order(); + + var $loypoints = $(this.el).find('.summary .loyalty-points'); + + if (this.pos.loyalty && order.get_client()) { + var points_won = order.get_won_points(); + var points_spent = order.get_spent_points(); + var points_total = order.get_new_total_points(); + $loypoints.replaceWith($(QWeb.render('LoyaltyPoints', { + widget: this, + rounding: this.pos.loyalty.rounding, + points_won: points_won, + points_spent: points_spent, + points_total: points_total, + }))); + $loypoints = $(this.el).find('.summary .loyalty-points'); + $loypoints.removeClass('oe_hidden'); + + if (points_total < 0) { + $loypoints.addClass('negative'); + } else { + $loypoints.removeClass('negative'); + } + } else { + $loypoints.empty(); + $loypoints.addClass('oe_hidden'); + } + + if (this.pos.loyalty && + order.get_client() && + this.getParent().action_buttons && + this.getParent().action_buttons.loyalty) { + + var rewards = order.get_available_rewards(); + this.getParent().action_buttons.loyalty.highlight(!!rewards.length); + } + }, + }); +}); \ No newline at end of file diff --git a/pos_loyalty/static/src/js/tests.js b/pos_loyalty/static/src/js/tests.js new file mode 100644 index 00000000..eff9f481 --- /dev/null +++ b/pos_loyalty/static/src/js/tests.js @@ -0,0 +1,170 @@ +// Copyright 2004-2018 Odoo SA +// Copyright 2018 Lambda IS DOOEL +// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +odoo.define('pos_loyalty.tour.test_pos_loyalty', function(require) { + "use strict"; + + // Some of the steps are taken from the pos_basic_order tour in point_of_sale. + // Added additional ones necessary for testing the rewards. + + var Tour = require("web_tour.tour"); + + function add_customer(customer_name) { + return [{ + content: 'open customer screen', + trigger: '.button.set-customer', + }, { + content: 'choose customer ' + customer_name, + trigger: 'table.client-list tbody.client-list-contents tr.client-line td:contains("' + customer_name + '")', + }, { + content: 'select customer ' + customer_name, + trigger: '.button.next:contains("Set Customer")', + }, { + content: 'Check if customer ' + customer_name + ' is added', + trigger: '.button.set-customer:contains("' + customer_name + '")', + run: function() {}, // it's a check + }]; + } + + function add_reward(reward_name) { + return [{ + content: 'open rewards screen', + trigger: '.control-button:contains("Rewards")', + }, { + content: 'choose reward', + trigger: '.selection-item:contains("' + reward_name + '")', + }] + } + + function add_product_to_order(product_name) { + return [{ + content: 'buy ' + product_name, + trigger: '.product-list .product-name:contains("' + product_name + '")', + }, { + content: 'the ' + product_name + ' have been added to the order', + trigger: '.order .product-name:contains("' + product_name + '")', + run: function() {}, // it's a check + }]; + } + + function verify_order_product(product_name) { + return [{ + content: 'check if ' + product_name + ' is in order', + trigger: '.orderline .product-name:contains("' + product_name + '")', + run: function() {}, // it's a check + }] + } + + function generate_keypad_steps(amount_str, keypad_selector) { + var i, steps = [], + current_char; + for (i = 0; i < amount_str.length; ++i) { + current_char = amount_str[i]; + steps.push({ + content: 'press ' + current_char + ' on payment keypad', + trigger: keypad_selector + ' .input-button:contains("' + current_char + '"):visible' + }); + } + + return steps; + } + + function generate_payment_screen_keypad_steps(amount_str) { + return generate_keypad_steps(amount_str, '.payment-numpad'); + } + + function generate_product_screen_keypad_steps(amount_str) { + return generate_keypad_steps(amount_str, '.numpad'); + } + + function verify_order_total(total_str) { + return [{ + content: 'order total contains ' + total_str, + trigger: '.order .total .value:contains("' + total_str + '")', + run: function() {}, // it's a check + }]; + } + + function goto_payment_screen_and_select_payment_method() { + return [{ + content: "go to payment screen", + trigger: '.button.pay', + }, { + content: "pay with cash", + trigger: '.paymentmethod:contains("Cash")', + }]; + } + + function finish_order() { + return [{ + content: "validate the order", + trigger: '.button.next:visible', + }, { + content: "verify that the order is being sent to the backend", + trigger: ".js_connecting:visible", + run: function() {}, // it's a check + }, { + content: "verify that the order has been succesfully sent to the backend", + trigger: ".js_connected:visible", + run: function() {}, // it's a check + }, { + content: "next order", + trigger: '.button.next:visible', + }]; + } + + var steps = [{ + content: 'waiting for loading to finish', + trigger: '.o_main_content:has(.loader:hidden)', + run: function() {}, // it's a check + }]; + + steps = steps.concat(add_customer('Agrolait')); + steps = steps.concat(add_product_to_order('Peaches')); + steps = steps.concat(verify_order_total('5.10')); + + steps = steps.concat(add_product_to_order('Peaches')); // buy another kg of peaches + steps = steps.concat(verify_order_total('10.20')); + steps = steps.concat(goto_payment_screen_and_select_payment_method()); + steps = steps.concat(generate_payment_screen_keypad_steps("12.20")); + + steps = steps.concat([{ + content: "verify tendered", + trigger: '.col-tendered:contains("12.20")', + run: function() {}, // it's a check + }, { + content: "verify change", + trigger: '.col-change:contains("2.00")', + run: function() {}, // it's a check + }]); + + steps = steps.concat(finish_order()); + + Tour.register('test_pos_loyalty_acquire_points', { + test: true, + url: '/pos/web' + }, steps); + + steps = [{ + content: 'waiting for loading to finish', + trigger: '.o_main_content:has(.loader:hidden)', + run: function() {}, // it's a check + }]; + steps = steps.concat(add_customer('Agrolait')); + steps = steps.concat(add_reward('Free Peaches')); + steps = steps.concat(verify_order_product('Peaches')); + steps = steps.concat(verify_order_total('0.00')); + steps = steps.concat(goto_payment_screen_and_select_payment_method()); + steps = steps.concat([{ + content: "verify tendered", + trigger: '.col-tendered:contains("0.00")', + run: function() {}, // it's a check + }]); + steps = steps.concat(finish_order()); + + Tour.register('test_pos_loyalty_spend_points', { + test: true, + url: '/pos/web' + }, steps); +}) \ No newline at end of file diff --git a/pos_loyalty/static/src/xml/pos.xml b/pos_loyalty/static/src/xml/pos.xml new file mode 100644 index 00000000..988096db --- /dev/null +++ b/pos_loyalty/static/src/xml/pos.xml @@ -0,0 +1,85 @@ + + + + +
+
Points
+ +
+ + +
+
+ +
+ - +
+
+
+ +
+
+
+ + +
+ Rewards +
+
+ + + +
.
+
+
+ + + + + + + + + + + + +
+
--------------------------------
+
+
+
+
+
+ + Points Won + + + Points Spent + + + Total Points + +
+
+
+
+
+ + + +
+ Points + + + +
+
+
+ + + + Points + + + +
diff --git a/pos_loyalty/tests/__init__.py b/pos_loyalty/tests/__init__.py new file mode 100644 index 00000000..09e18a01 --- /dev/null +++ b/pos_loyalty/tests/__init__.py @@ -0,0 +1,2 @@ + +from . import test_pos_loyalty diff --git a/pos_loyalty/tests/test_pos_loyalty.py b/pos_loyalty/tests/test_pos_loyalty.py new file mode 100644 index 00000000..0cd3ef38 --- /dev/null +++ b/pos_loyalty/tests/test_pos_loyalty.py @@ -0,0 +1,68 @@ +# Copyright 2004-2018 Odoo SA +# Copyright 2018 Lambda IS DOOEL +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests import HttpCase + + +class TestPOSLoyalty(HttpCase): + + def test_pos_loyalty(self): + main_pos_config = self.env.ref('point_of_sale.pos_config_main') + target_product = self.env.ref('point_of_sale.letter_tray') + free_product = self.env.ref('point_of_sale.desk_organizer') + customer = self.env.ref('base.res_partner_2') + loyalty_program = self.env['loyalty.program'].create({ + 'name': 'foo', + 'rule_ids': [(0, 0, { + 'name': 'Peaches', + 'type': 'product', + 'product_id': target_product.id, + 'pp_product': 10, + })], + 'reward_ids': [(0, 0, { + 'name': 'Free Peaches', + 'type': 'gift', + 'gift_product_id': target_product.id, + 'point_cost': 20, + 'minimum_points': 20, + }), (0, 0, { + 'name': 'Free Onions', + 'type': 'gift', + 'gift_product_id': free_product.id, + 'point_cost': 20, + 'minimum_points': 20, + })] + }) + main_pos_config.write({'loyalty_id': loyalty_program.id}) + main_pos_config.open_session_cb() + + # needed because tests are run before the module is marked as + # installed. In js web will only load qweb coming from modules + # that are returned by the backend in module_boot. Without + # this you end up with js, css but no qweb. + self.env['ir.module.module'].search( + [('name', '=', 'pos_loyalty')], limit=1).state = 'installed' + + # Process an order with 2kg of Peaches which should + # add 20 loyalty points + self.phantom_js("/pos/web", + "odoo.__DEBUG__.services['web_tour.tour'].run(" + "'test_pos_loyalty_acquire_points')", + "odoo.__DEBUG__.services['web_tour.tour'].tours" + ".test_pos_loyalty_acquire_points.ready", + login="admin") + + self.assertEqual(customer.loyalty_points, 20) + + # Spend 20 loyalty points on "Free Peaches" reward + self.phantom_js("/pos/web", + "odoo.__DEBUG__.services['web_tour.tour'].run(" + "'test_pos_loyalty_spend_points')", + "odoo.__DEBUG__.services['web_tour.tour'].tours" + ".test_pos_loyalty_spend_points.ready", + login="admin") + + customer_points = customer.read( + ['loyalty_points'])[0]['loyalty_points'] + self.assertEqual(customer_points, 0) diff --git a/pos_loyalty/views/loyalty_program_view.xml b/pos_loyalty/views/loyalty_program_view.xml new file mode 100644 index 00000000..65f3d247 --- /dev/null +++ b/pos_loyalty/views/loyalty_program_view.xml @@ -0,0 +1,83 @@ + + + + loyalty.program.form + loyalty.program + +
+ +
+
+ + + + + + + + + + + + + +

Rules define how loyalty points are earned for specific products or categories

+ + + + + + + + + + +

Reward the customer with gifts or discounts for loyalty points

+ + + + + + +
+
+
+
+ + + loyalty.program.tree + loyalty.program + + + + + + + + + Loyalty Programs + ir.actions.act_window + loyalty.program + form + tree,form + +

+ Click create to define a Loyalty Program. +

+

+ Loyalty Programs allow you customers to earn points + and rewards when purchasing from your shops. +

+
+
+ + +
diff --git a/pos_loyalty/views/loyalty_reward_view.xml b/pos_loyalty/views/loyalty_reward_view.xml new file mode 100644 index 00000000..f194ccac --- /dev/null +++ b/pos_loyalty/views/loyalty_reward_view.xml @@ -0,0 +1,37 @@ + + + + loyalty.reward.form + loyalty.reward + +
+
+
+ + + + + + + + + + + + + + +
+
+
+
diff --git a/pos_loyalty/views/loyalty_rule_view.xml b/pos_loyalty/views/loyalty_rule_view.xml new file mode 100644 index 00000000..bf1152d9 --- /dev/null +++ b/pos_loyalty/views/loyalty_rule_view.xml @@ -0,0 +1,31 @@ + + + + loyalty.rule.form + loyalty.rule + +
+
+
+ + + + + + + + + + + + + + +
+
+
+
diff --git a/pos_loyalty/views/pos_config_view.xml b/pos_loyalty/views/pos_config_view.xml new file mode 100644 index 00000000..8988a056 --- /dev/null +++ b/pos_loyalty/views/pos_config_view.xml @@ -0,0 +1,23 @@ + + + + pos.config.form + pos.config + + + +
+
+
+
+
+
+
+
diff --git a/pos_loyalty/views/pos_order_view.xml b/pos_loyalty/views/pos_order_view.xml new file mode 100644 index 00000000..225f610a --- /dev/null +++ b/pos_loyalty/views/pos_order_view.xml @@ -0,0 +1,15 @@ + + + + pos.order.form + pos.order + + + + + + + + + + diff --git a/pos_loyalty/views/res_partner_view.xml b/pos_loyalty/views/res_partner_view.xml new file mode 100644 index 00000000..c183f50d --- /dev/null +++ b/pos_loyalty/views/res_partner_view.xml @@ -0,0 +1,18 @@ + + + + partner.property.form + res.partner + + + + + + + diff --git a/pos_loyalty/views/templates.xml b/pos_loyalty/views/templates.xml new file mode 100644 index 00000000..d05d64a8 --- /dev/null +++ b/pos_loyalty/views/templates.xml @@ -0,0 +1,9 @@ + + + +