From 80c009b1d01532d3f6be4fec4cd9b8530c4f346f Mon Sep 17 00:00:00 2001 From: Gelu Date: Tue, 11 Jul 2017 12:36:13 +0200 Subject: [PATCH 01/12] [ADD] pos_loyalty: loyalty programs for POS (#185) * [ADD] pos_loyalty: loyalty programs for POS * [FIX] Limit to one discount reward per order * [FIX] Remove unused variables and returns * [IMP] Refactoring rules loading --- pos_loyalty/README.rst | 58 +++ pos_loyalty/__init__.py | 4 + pos_loyalty/__manifest__.py | 33 ++ pos_loyalty/i18n/es.po | 467 +++++++++++++++++++++ pos_loyalty/i18n/pos_loyalty.pot | 466 ++++++++++++++++++++ pos_loyalty/models/__init__.py | 9 + pos_loyalty/models/loyalty_program.py | 31 ++ pos_loyalty/models/loyalty_reward.py | 68 +++ pos_loyalty/models/loyalty_rule.py | 33 ++ pos_loyalty/models/pos_config.py | 15 + pos_loyalty/models/pos_order.py | 31 ++ pos_loyalty/models/res_partner.py | 14 + pos_loyalty/security/ir.model.access.csv | 7 + pos_loyalty/static/src/css/pos.css | 21 + pos_loyalty/static/src/js/pos.js | 453 ++++++++++++++++++++ pos_loyalty/static/src/xml/pos.xml | 85 ++++ pos_loyalty/views/loyalty_program_view.xml | 83 ++++ pos_loyalty/views/loyalty_reward_view.xml | 37 ++ pos_loyalty/views/loyalty_rule_view.xml | 31 ++ pos_loyalty/views/pos_config_view.xml | 15 + pos_loyalty/views/pos_order_view.xml | 15 + pos_loyalty/views/res_partner_view.xml | 15 + pos_loyalty/views/templates.xml | 9 + 23 files changed, 2000 insertions(+) create mode 100644 pos_loyalty/README.rst create mode 100644 pos_loyalty/__init__.py create mode 100644 pos_loyalty/__manifest__.py create mode 100644 pos_loyalty/i18n/es.po create mode 100644 pos_loyalty/i18n/pos_loyalty.pot create mode 100644 pos_loyalty/models/__init__.py create mode 100644 pos_loyalty/models/loyalty_program.py create mode 100644 pos_loyalty/models/loyalty_reward.py create mode 100644 pos_loyalty/models/loyalty_rule.py create mode 100644 pos_loyalty/models/pos_config.py create mode 100644 pos_loyalty/models/pos_order.py create mode 100644 pos_loyalty/models/res_partner.py create mode 100644 pos_loyalty/security/ir.model.access.csv create mode 100644 pos_loyalty/static/src/css/pos.css create mode 100644 pos_loyalty/static/src/js/pos.js create mode 100644 pos_loyalty/static/src/xml/pos.xml create mode 100644 pos_loyalty/views/loyalty_program_view.xml create mode 100644 pos_loyalty/views/loyalty_reward_view.xml create mode 100644 pos_loyalty/views/loyalty_rule_view.xml create mode 100644 pos_loyalty/views/pos_config_view.xml create mode 100644 pos_loyalty/views/pos_order_view.xml create mode 100644 pos_loyalty/views/res_partner_view.xml create mode 100644 pos_loyalty/views/templates.xml diff --git a/pos_loyalty/README.rst b/pos_loyalty/README.rst new file mode 100644 index 00000000..ed9c1c7c --- /dev/null +++ b/pos_loyalty/README.rst @@ -0,0 +1,58 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=============== +Loyalty Program +=============== + +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. + +Usage +===== + +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 gifts. +* Assign the loyalty program to the desired Point of Sale. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch} + +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 smash it by providing detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ + +* RGB Consulting SL (http://www.rgbconsulting.com) +* Forward-port from Odoo SA saas-6 branch + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. \ No newline at end of file diff --git a/pos_loyalty/__init__.py b/pos_loyalty/__init__.py new file mode 100644 index 00000000..ec50cfc0 --- /dev/null +++ b/pos_loyalty/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# 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..ee631c48 --- /dev/null +++ b/pos_loyalty/__manifest__.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# 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). + +{ + 'name': 'Loyalty Program', + 'version': '10.0.1.0.0', + 'category': 'Point of Sale', + 'license': 'AGPL-3', + 'author': "OpenERP SA, " + "RGB Consulting SL, " + "Odoo Community Association (OCA)", + 'website': "https://odoo-community.org/", + 'depends': ['point_of_sale'], + + '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/i18n/es.po b/pos_loyalty/i18n/es.po new file mode 100644 index 00000000..9dc900a6 --- /dev/null +++ b/pos_loyalty/i18n/es.po @@ -0,0 +1,467 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-23 06:36+0000\n" +"PO-Revision-Date: 2017-06-23 06:36+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: 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.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 "Cumulativo" + +#. 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:59 +#, 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:52 +#, 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 en" + +#. 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.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 +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view +msgid "Loyalty Program" +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.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed for this discount reward" +msgstr "Importe máximo de descuento permitido para este descuento" + +#. 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:365 +#, python-format +msgid "No Rewards Available" +msgstr "No hay recompensas disponibles" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Partner" +msgstr "Empresa" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:381 +#, 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:67 +#, 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 "Points per order" + +#. 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:366 +#, 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.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 "Configuración del TPV" + diff --git a/pos_loyalty/i18n/pos_loyalty.pot b/pos_loyalty/i18n/pos_loyalty.pot new file mode 100644 index 00000000..b4a67959 --- /dev/null +++ b/pos_loyalty/i18n/pos_loyalty.pot @@ -0,0 +1,466 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-23 06:35+0000\n" +"PO-Revision-Date: 2017-06-23 06:35+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: 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.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:59 +#, 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:52 +#, 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.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 +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view +msgid "Loyalty Program" +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.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max +msgid "Maximum discounted amount allowed for this 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 customermust have to qualify for this reward" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:365 +#, python-format +msgid "No Rewards Available" +msgstr "" + +#. module: pos_loyalty +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Partner" +msgstr "" + +#. module: pos_loyalty +#. openerp-web +#: code:addons/pos_loyalty/static/src/js/pos.js:381 +#, 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:67 +#, 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:366 +#, 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.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..849d26de --- /dev/null +++ b/pos_loyalty/models/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# 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 res_partner diff --git a/pos_loyalty/models/loyalty_program.py b/pos_loyalty/models/loyalty_program.py new file mode 100644 index 00000000..5817f6d3 --- /dev/null +++ b/pos_loyalty/models/loyalty_program.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# 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..d0897171 --- /dev/null +++ b/pos_loyalty/models/loyalty_reward.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +# 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, _ +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', + string='Gift Product', + help='The product given as a reward') + discount_product_id = fields.Many2one(comodel_name='product.product', + string='Discount Product', + help='The product used to apply ' + 'discounts') + point_product_id = fields.Many2one(comodel_name='product.product', + 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..9f3b43bb --- /dev/null +++ b/pos_loyalty/models/loyalty_rule.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# 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 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', + 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..bf91f5e5 --- /dev/null +++ b/pos_loyalty/models/pos_config.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# 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..f8eed30e --- /dev/null +++ b/pos_loyalty/models/pos_order.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# 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']['loyalty_points'] + 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/res_partner.py b/pos_loyalty/models/res_partner.py new file mode 100644 index 00000000..d678db55 --- /dev/null +++ b/pos_loyalty/models/res_partner.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# 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/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/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..9a6a8936 --- /dev/null +++ b/pos_loyalty/static/src/js/pos.js @@ -0,0 +1,453 @@ +/* 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); + } + }, + }); +}); 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/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..525f19f2 --- /dev/null +++ b/pos_loyalty/views/pos_config_view.xml @@ -0,0 +1,15 @@ + + + + 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..a768ead9 --- /dev/null +++ b/pos_loyalty/views/res_partner_view.xml @@ -0,0 +1,15 @@ + + + + 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 @@ + + + + From a0193e1bfa8ca8b6e825e7fdf491f28b81421e1b Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 15 Jul 2017 07:34:25 +0200 Subject: [PATCH 02/12] OCA Transbot updated translations from Transifex --- pos_loyalty/i18n/es.po | 104 ++++++--- pos_loyalty/i18n/fr.po | 481 ++++++++++++++++++++++++++++++++++++++ pos_loyalty/i18n/hr_HR.po | 477 +++++++++++++++++++++++++++++++++++++ pos_loyalty/i18n/it.po | 477 +++++++++++++++++++++++++++++++++++++ pos_loyalty/i18n/nl_NL.po | 477 +++++++++++++++++++++++++++++++++++++ 5 files changed, 1980 insertions(+), 36 deletions(-) create mode 100644 pos_loyalty/i18n/fr.po create mode 100644 pos_loyalty/i18n/hr_HR.po create mode 100644 pos_loyalty/i18n/it.po create mode 100644 pos_loyalty/i18n/nl_NL.po diff --git a/pos_loyalty/i18n/es.po b/pos_loyalty/i18n/es.po index 9dc900a6..2e907679 100644 --- a/pos_loyalty/i18n/es.po +++ b/pos_loyalty/i18n/es.po @@ -1,34 +1,43 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * pos_loyalty -# +# * 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: 2017-06-23 06:36+0000\n" -"PO-Revision-Date: 2017-06-23 06:36+0000\n" -"Last-Translator: <>\n" -"Language-Team: \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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Language: es\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" +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" +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" +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 @@ -72,7 +81,7 @@ msgstr "Creado el" #. module: pos_loyalty #: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_rule_cumulative msgid "Cumulative" -msgstr "Cumulativo" +msgstr "Acumulativo" #. module: pos_loyalty #: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_reward_discount @@ -94,7 +103,9 @@ msgstr "Límite de descuento" #: code:addons/pos_loyalty/models/loyalty_reward.py:59 #, 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." +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 @@ -117,7 +128,9 @@ msgstr "Producto de regalo" #: code:addons/pos_loyalty/models/loyalty_reward.py:52 #, 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" +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 @@ -131,7 +144,7 @@ msgstr "ID" #: 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 en" +msgstr "Última modificación el" #. module: pos_loyalty #: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_write_uid @@ -179,9 +192,11 @@ 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" +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" +msgstr "" +"Los programas de fidelización le permiten a los clientes ganar puntos\n" " y recompensas al comprar en tus tiendas." #. module: pos_loyalty @@ -201,8 +216,8 @@ msgstr "Los puntos de fidelidad se redondearán a múltiplos de este valor" #. module: pos_loyalty #: model:ir.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max -msgid "Maximum discounted amount allowed for this discount reward" -msgstr "Importe máximo de descuento permitido para este descuento" +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 @@ -211,12 +226,13 @@ 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" +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:365 +#: code:addons/pos_loyalty/static/src/js/pos.js:379 #, python-format msgid "No Rewards Available" msgstr "No hay recompensas disponibles" @@ -228,7 +244,7 @@ msgstr "Empresa" #. module: pos_loyalty #. openerp-web -#: code:addons/pos_loyalty/static/src/js/pos.js:381 +#: code:addons/pos_loyalty/static/src/js/pos.js:393 #, python-format msgid "Please select a reward" msgstr "Selecciona una recompensa" @@ -252,7 +268,8 @@ msgstr "Pedidos del TPV" #: code:addons/pos_loyalty/models/loyalty_reward.py:67 #, 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" +msgstr "" +"El campo Producto Punto es obligatorio para recompensas de reventa de puntos" #. module: pos_loyalty #. openerp-web @@ -291,7 +308,7 @@ 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 "Points per order" +msgstr "Puntos por venta" #. module: pos_loyalty #: model:ir.model.fields,field_description:pos_loyalty.field_loyalty_program_pp_product @@ -322,7 +339,8 @@ 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" +msgstr "" +"Recompensar al cliente con regalos o descuentos por puntos de fidelidad" #. module: pos_loyalty #. openerp-web @@ -346,8 +364,12 @@ 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" +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 @@ -372,7 +394,8 @@ 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" +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 @@ -393,7 +416,9 @@ msgstr "El porcentaje de descuento" #: 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" +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 @@ -402,8 +427,12 @@ 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" +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 @@ -422,10 +451,14 @@ msgstr "El producto utilizado para aplicar descuentos" #. module: pos_loyalty #. openerp-web -#: code:addons/pos_loyalty/static/src/js/pos.js:366 +#: 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" +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 @@ -463,5 +496,4 @@ msgstr "loyalty.rule" #. module: pos_loyalty #: model:ir.model,name:pos_loyalty.model_pos_config msgid "pos.config" -msgstr "Configuración del TPV" - +msgstr "pos.config" diff --git a/pos_loyalty/i18n/fr.po b/pos_loyalty/i18n/fr.po new file mode 100644 index 00000000..23329650 --- /dev/null +++ b/pos_loyalty/i18n/fr.po @@ -0,0 +1,481 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\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.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:59 +#, 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:52 +#, 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.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 +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view +msgid "Loyalty Program" +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.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 +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Partner" +msgstr "Partner" + +#. 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:67 +#, 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.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/hr_HR.po b/pos_loyalty/i18n/hr_HR.po new file mode 100644 index 00000000..01778694 --- /dev/null +++ b/pos_loyalty/i18n/hr_HR.po @@ -0,0 +1,477 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr_HR\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.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:59 +#, 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:52 +#, 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.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 +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view +msgid "Loyalty Program" +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.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 +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Partner" +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:67 +#, 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.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..e30e399f --- /dev/null +++ b/pos_loyalty/i18n/it.po @@ -0,0 +1,477 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\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.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:59 +#, 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:52 +#, 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.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 +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view +msgid "Loyalty Program" +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.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 +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Partner" +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:67 +#, 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.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..76182a80 --- /dev/null +++ b/pos_loyalty/i18n/nl_NL.po @@ -0,0 +1,477 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\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.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:59 +#, 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:52 +#, 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.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 +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view +msgid "Loyalty Program" +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.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 +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Partner" +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:67 +#, 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.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" From 4ba3a477b447aff4bcc51c1e913478816b87ac8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Fri, 15 Jun 2018 23:33:59 +0200 Subject: [PATCH 03/12] remove obsolete .pot files [ci skip] --- pos_loyalty/i18n/pos_loyalty.pot | 466 ------------------------------- 1 file changed, 466 deletions(-) delete mode 100644 pos_loyalty/i18n/pos_loyalty.pot diff --git a/pos_loyalty/i18n/pos_loyalty.pot b/pos_loyalty/i18n/pos_loyalty.pot deleted file mode 100644 index b4a67959..00000000 --- a/pos_loyalty/i18n/pos_loyalty.pot +++ /dev/null @@ -1,466 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * pos_loyalty -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-23 06:35+0000\n" -"PO-Revision-Date: 2017-06-23 06:35+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: 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.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:59 -#, 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:52 -#, 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.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 -#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view -msgid "Loyalty Program" -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.model.fields,help:pos_loyalty.field_loyalty_reward_discount_max -msgid "Maximum discounted amount allowed for this 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 customermust have to qualify for this reward" -msgstr "" - -#. module: pos_loyalty -#. openerp-web -#: code:addons/pos_loyalty/static/src/js/pos.js:365 -#, python-format -msgid "No Rewards Available" -msgstr "" - -#. module: pos_loyalty -#: model:ir.model,name:pos_loyalty.model_res_partner -msgid "Partner" -msgstr "" - -#. module: pos_loyalty -#. openerp-web -#: code:addons/pos_loyalty/static/src/js/pos.js:381 -#, 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:67 -#, 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:366 -#, 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.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 "" - From c852e3334d5670d30502099b7508f863a1faa7cc Mon Sep 17 00:00:00 2001 From: oca-travis Date: Fri, 22 Jun 2018 16:06:00 +0000 Subject: [PATCH 04/12] [UPD] Update pos_loyalty.pot --- pos_loyalty/i18n/es.po | 11 +- pos_loyalty/i18n/fr.po | 4 +- pos_loyalty/i18n/hr_HR.po | 10 +- pos_loyalty/i18n/it.po | 4 +- pos_loyalty/i18n/nl_NL.po | 7 +- pos_loyalty/i18n/pos_loyalty.pot | 464 +++++++++++++++++++++++++++++++ 6 files changed, 483 insertions(+), 17 deletions(-) create mode 100644 pos_loyalty/i18n/pos_loyalty.pot diff --git a/pos_loyalty/i18n/es.po b/pos_loyalty/i18n/es.po index 2e907679..b831fa9e 100644 --- a/pos_loyalty/i18n/es.po +++ b/pos_loyalty/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * pos_loyalty -# +# # Translators: # OCA Transbot , 2017 # enjolras , 2017 @@ -13,10 +13,10 @@ msgstr "" "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" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: pos_loyalty @@ -36,8 +36,7 @@ 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 "" -"Cantidad de puntos de fidelidad añadidos al cliente por moneda vendida" +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 @@ -457,8 +456,8 @@ 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" +"No hay recompensas disponibles para este cliente como parte de este programa " +"de fidelización" #. module: pos_loyalty #. openerp-web diff --git a/pos_loyalty/i18n/fr.po b/pos_loyalty/i18n/fr.po index 23329650..09eb8448 100644 --- a/pos_loyalty/i18n/fr.po +++ b/pos_loyalty/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * pos_loyalty -# +# # Translators: # leemannd , 2017 # OCA Transbot , 2018 @@ -13,10 +13,10 @@ msgstr "" "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" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: pos_loyalty diff --git a/pos_loyalty/i18n/hr_HR.po b/pos_loyalty/i18n/hr_HR.po index 01778694..4065b31b 100644 --- a/pos_loyalty/i18n/hr_HR.po +++ b/pos_loyalty/i18n/hr_HR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * pos_loyalty -# +# # Translators: # Bole , 2017 msgid "" @@ -11,12 +11,14 @@ msgstr "" "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-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" -"Language: hr_HR\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" +"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 diff --git a/pos_loyalty/i18n/it.po b/pos_loyalty/i18n/it.po index e30e399f..efa1ff4d 100644 --- a/pos_loyalty/i18n/it.po +++ b/pos_loyalty/i18n/it.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * pos_loyalty -# +# # Translators: # Francesco Fresta , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: pos_loyalty diff --git a/pos_loyalty/i18n/nl_NL.po b/pos_loyalty/i18n/nl_NL.po index 76182a80..686b8076 100644 --- a/pos_loyalty/i18n/nl_NL.po +++ b/pos_loyalty/i18n/nl_NL.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * pos_loyalty -# +# # Translators: # Peter Hageman , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: nl_NL\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: pos_loyalty diff --git a/pos_loyalty/i18n/pos_loyalty.pot b/pos_loyalty/i18n/pos_loyalty.pot new file mode 100644 index 00000000..eb4ed381 --- /dev/null +++ b/pos_loyalty/i18n/pos_loyalty.pot @@ -0,0 +1,464 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_loyalty +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.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.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:59 +#, 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:52 +#, 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.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 +#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_form_view +msgid "Loyalty Program" +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.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 +#: model:ir.model,name:pos_loyalty.model_res_partner +msgid "Partner" +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:67 +#, 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.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 "" + From cae6c9686510ad659e1bbec4001bc70d16833e50 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Fri, 28 Sep 2018 11:53:41 +0200 Subject: [PATCH 05/12] [FIX] Travis is failing when test are creating orders via create_from_ui when pos_loyalty is installed --- pos_loyalty/models/pos_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos_loyalty/models/pos_order.py b/pos_loyalty/models/pos_order.py index f8eed30e..9645c789 100644 --- a/pos_loyalty/models/pos_order.py +++ b/pos_loyalty/models/pos_order.py @@ -24,7 +24,7 @@ class PosOrder(models.Model): res = super(PosOrder, self).create_from_ui(orders) for order in orders: order_partner = order['data']['partner_id'] - order_points = order['data']['loyalty_points'] + 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 From 4df4accbac185d168cfa13aee6de727d0cbbeb4a Mon Sep 17 00:00:00 2001 From: Kiril Vangelovski Date: Fri, 28 Sep 2018 21:39:06 +0200 Subject: [PATCH 06/12] [MIG] pos_loyalty: Migration to 11.0 --- pos_loyalty/README.rst | 87 ++++- pos_loyalty/__init__.py | 1 - pos_loyalty/__manifest__.py | 9 +- pos_loyalty/demo/templates.xml | 8 + pos_loyalty/models/__init__.py | 2 +- pos_loyalty/models/loyalty_program.py | 1 - pos_loyalty/models/loyalty_reward.py | 7 +- pos_loyalty/models/loyalty_rule.py | 3 +- pos_loyalty/models/pos_config.py | 1 - pos_loyalty/models/pos_order.py | 1 - pos_loyalty/models/pos_order_line.py | 20 + pos_loyalty/models/res_partner.py | 1 - pos_loyalty/readme/CONFIGURE.rst | 4 + pos_loyalty/readme/CONTRIBUTORS.rst | 3 + pos_loyalty/readme/DESCRIPTION.rst | 6 + pos_loyalty/readme/USAGE.rst | 11 + pos_loyalty/static/description/index.html | 449 ++++++++++++++++++++++ pos_loyalty/static/src/js/tests.js | 163 ++++++++ pos_loyalty/tests/__init__.py | 2 + pos_loyalty/tests/test_pos_loyalty.py | 74 ++++ pos_loyalty/views/pos_config_view.xml | 20 +- 21 files changed, 836 insertions(+), 37 deletions(-) create mode 100644 pos_loyalty/demo/templates.xml create mode 100644 pos_loyalty/models/pos_order_line.py create mode 100644 pos_loyalty/readme/CONFIGURE.rst create mode 100644 pos_loyalty/readme/CONTRIBUTORS.rst create mode 100644 pos_loyalty/readme/DESCRIPTION.rst create mode 100644 pos_loyalty/readme/USAGE.rst create mode 100644 pos_loyalty/static/description/index.html create mode 100644 pos_loyalty/static/src/js/tests.js create mode 100644 pos_loyalty/tests/__init__.py create mode 100644 pos_loyalty/tests/test_pos_loyalty.py diff --git a/pos_loyalty/README.rst b/pos_loyalty/README.rst index ed9c1c7c..f3441df6 100644 --- a/pos_loyalty/README.rst +++ b/pos_loyalty/README.rst @@ -1,11 +1,30 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - =============== 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. @@ -13,46 +32,74 @@ 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. -Usage -===== +**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 gifts. +* 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. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch} +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 smash it by providing detailed and welcomed feedback. +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 -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit https://odoo-community.org. \ No newline at end of file +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 index ec50cfc0..69f7babd 100644 --- a/pos_loyalty/__init__.py +++ b/pos_loyalty/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # 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 index ee631c48..8bd95be8 100644 --- a/pos_loyalty/__manifest__.py +++ b/pos_loyalty/__manifest__.py @@ -1,19 +1,22 @@ -# -*- coding: utf-8 -*- # 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': '10.0.1.0.0', + 'version': '11.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', 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/models/__init__.py b/pos_loyalty/models/__init__.py index 849d26de..d6885ec8 100644 --- a/pos_loyalty/models/__init__.py +++ b/pos_loyalty/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import loyalty_program @@ -6,4 +5,5 @@ 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 index 5817f6d3..a3493beb 100644 --- a/pos_loyalty/models/loyalty_program.py +++ b/pos_loyalty/models/loyalty_program.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # 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). diff --git a/pos_loyalty/models/loyalty_reward.py b/pos_loyalty/models/loyalty_reward.py index d0897171..ac3d97eb 100644 --- a/pos_loyalty/models/loyalty_reward.py +++ b/pos_loyalty/models/loyalty_reward.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- # 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, _ @@ -32,13 +32,18 @@ class LoyaltyReward(models.Model): 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') diff --git a/pos_loyalty/models/loyalty_rule.py b/pos_loyalty/models/loyalty_rule.py index 9f3b43bb..85caafe6 100644 --- a/pos_loyalty/models/loyalty_rule.py +++ b/pos_loyalty/models/loyalty_rule.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- # 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 @@ -26,6 +26,7 @@ class LoyaltyRule(models.Model): 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', diff --git a/pos_loyalty/models/pos_config.py b/pos_loyalty/models/pos_config.py index bf91f5e5..b39e549d 100644 --- a/pos_loyalty/models/pos_config.py +++ b/pos_loyalty/models/pos_config.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # 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). diff --git a/pos_loyalty/models/pos_order.py b/pos_loyalty/models/pos_order.py index 9645c789..bc644065 100644 --- a/pos_loyalty/models/pos_order.py +++ b/pos_loyalty/models/pos_order.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # 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). 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 index d678db55..60350f04 100644 --- a/pos_loyalty/models/res_partner.py +++ b/pos_loyalty/models/res_partner.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # 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). 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..8bb9f2af --- /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 v10 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/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/js/tests.js b/pos_loyalty/static/src/js/tests.js new file mode 100644 index 00000000..3e5514a0 --- /dev/null +++ b/pos_loyalty/static/src/js/tests.js @@ -0,0 +1,163 @@ +// 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); +}) 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..1a50dd1b --- /dev/null +++ b/pos_loyalty/tests/test_pos_loyalty.py @@ -0,0 +1,74 @@ +# Copyright 2004-2018 Odoo SA +# Copyright 2018 Lambda IS DOOEL +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.api import Environment +from odoo.tests import HttpCase + + +class TestPOSLoyalty(HttpCase): + + def test_pos_loyalty(self): + cr = self.registry.cursor() + assert cr == self.registry.test_cr + env = Environment(cr, self.uid, {}) + main_pos_config = env.ref('point_of_sale.pos_config_main') + target_product = env.ref('point_of_sale.peche') + free_product = env.ref('point_of_sale.Onions') + customer = env.ref('base.res_partner_2') + loyalty_program = 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. + env['ir.module.module'].search( + [('name', '=', 'pos_loyalty')], limit=1).state = 'installed' + + cr.release() + + # 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/pos_config_view.xml b/pos_loyalty/views/pos_config_view.xml index 525f19f2..8988a056 100644 --- a/pos_loyalty/views/pos_config_view.xml +++ b/pos_loyalty/views/pos_config_view.xml @@ -1,14 +1,22 @@ - + pos.config.form pos.config - + - - - - + +
+
+
+
From 5a8f80b4ae8a6f65e2859dca7e6c2a66335bd392 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Wed, 14 Nov 2018 14:04:30 +0000 Subject: [PATCH 07/12] [UPD] Update pos_loyalty.pot --- pos_loyalty/i18n/pos_loyalty.pot | 39 ++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/pos_loyalty/i18n/pos_loyalty.pot b/pos_loyalty/i18n/pos_loyalty.pot index eb4ed381..ae7a17b4 100644 --- a/pos_loyalty/i18n/pos_loyalty.pot +++ b/pos_loyalty/i18n/pos_loyalty.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -48,6 +48,11 @@ msgstr "" 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" @@ -89,7 +94,7 @@ msgid "Discount limit" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:59 +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 #, python-format msgid "Discount product field is mandatory for discount rewards" msgstr "" @@ -112,7 +117,7 @@ msgid "Gift Product" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:52 +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 #, python-format msgid "Gift product field is mandatory for gift rewards" msgstr "" @@ -145,6 +150,11 @@ msgstr "" 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 @@ -157,10 +167,14 @@ msgstr "" #: 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 -#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_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" @@ -196,6 +210,11 @@ msgstr "" 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" @@ -218,11 +237,6 @@ msgstr "" msgid "No Rewards Available" msgstr "" -#. module: pos_loyalty -#: model:ir.model,name:pos_loyalty.model_res_partner -msgid "Partner" -msgstr "" - #. module: pos_loyalty #. openerp-web #: code:addons/pos_loyalty/static/src/js/pos.js:393 @@ -246,7 +260,7 @@ msgid "Point of Sale Orders" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:67 +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 #, python-format msgid "Point product field is mandatory for point resale rewards" msgstr "" @@ -442,6 +456,11 @@ msgstr "" 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" From 2bee05475076fd638de06bdd5989224062d35868 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sun, 9 Dec 2018 12:41:19 +0000 Subject: [PATCH 08/12] Update translation files Updated by Update PO files to match POT (msgmerge) hook in Weblate. --- pos_loyalty/i18n/es.po | 43 +++++++++++++++++++++++++++++++-------- pos_loyalty/i18n/fr.po | 41 +++++++++++++++++++++++++++++-------- pos_loyalty/i18n/hr_HR.po | 37 +++++++++++++++++++++++++-------- pos_loyalty/i18n/it.po | 38 ++++++++++++++++++++++++++-------- pos_loyalty/i18n/nl_NL.po | 38 ++++++++++++++++++++++++++-------- 5 files changed, 152 insertions(+), 45 deletions(-) diff --git a/pos_loyalty/i18n/es.po b/pos_loyalty/i18n/es.po index b831fa9e..01f984fe 100644 --- a/pos_loyalty/i18n/es.po +++ b/pos_loyalty/i18n/es.po @@ -58,6 +58,11 @@ msgstr "Categoría" 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" @@ -99,7 +104,7 @@ msgid "Discount limit" msgstr "Límite de descuento" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:59 +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 #, python-format msgid "Discount product field is mandatory for discount rewards" msgstr "" @@ -124,7 +129,7 @@ msgid "Gift Product" msgstr "Producto de regalo" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:52 +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 #, python-format msgid "Gift product field is mandatory for gift rewards" msgstr "" @@ -159,6 +164,12 @@ msgstr "Última actualización por" 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 @@ -171,10 +182,15 @@ msgstr "Puntos de fidelidad" #: 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 -#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_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" @@ -213,6 +229,12 @@ msgstr "Regla de fidelización" 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" @@ -236,11 +258,6 @@ msgstr "Cantidad mínima de puntos de cliente para acceder a esta recompensa" msgid "No Rewards Available" msgstr "No hay recompensas disponibles" -#. module: pos_loyalty -#: model:ir.model,name:pos_loyalty.model_res_partner -msgid "Partner" -msgstr "Empresa" - #. module: pos_loyalty #. openerp-web #: code:addons/pos_loyalty/static/src/js/pos.js:393 @@ -264,7 +281,7 @@ msgid "Point of Sale Orders" msgstr "Pedidos del TPV" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:67 +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 #, python-format msgid "Point product field is mandatory for point resale rewards" msgstr "" @@ -477,6 +494,11 @@ msgstr "Tipo" 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" @@ -496,3 +518,6 @@ msgstr "loyalty.rule" #: 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 index 09eb8448..40565741 100644 --- a/pos_loyalty/i18n/fr.po +++ b/pos_loyalty/i18n/fr.po @@ -55,6 +55,11 @@ msgstr "Catégorie" 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" @@ -96,7 +101,7 @@ msgid "Discount limit" msgstr "Limite de Rabais" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:59 +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 #, python-format msgid "Discount product field is mandatory for discount rewards" msgstr "" @@ -119,7 +124,7 @@ msgid "Gift Product" msgstr "Produit Cadeau" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:52 +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 #, python-format msgid "Gift product field is mandatory for gift rewards" msgstr "" @@ -153,6 +158,11 @@ msgstr "" 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 @@ -165,10 +175,15 @@ msgstr "Points de fidélité" #: 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 -#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_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" @@ -207,6 +222,11 @@ msgstr "" 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" @@ -230,11 +250,6 @@ msgstr "Le minimum de points requis pour avoir le droit à cette récompense" msgid "No Rewards Available" msgstr "Pas de récompenses disponible" -#. module: pos_loyalty -#: model:ir.model,name:pos_loyalty.model_res_partner -msgid "Partner" -msgstr "Partner" - #. module: pos_loyalty #. openerp-web #: code:addons/pos_loyalty/static/src/js/pos.js:393 @@ -258,7 +273,7 @@ msgid "Point of Sale Orders" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:67 +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 #, python-format msgid "Point product field is mandatory for point resale rewards" msgstr "" @@ -460,6 +475,11 @@ msgstr "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" @@ -479,3 +499,6 @@ msgstr "" #: 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 index 4065b31b..145b5dec 100644 --- a/pos_loyalty/i18n/hr_HR.po +++ b/pos_loyalty/i18n/hr_HR.po @@ -56,6 +56,11 @@ msgstr "" 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" @@ -97,7 +102,7 @@ msgid "Discount limit" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:59 +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 #, python-format msgid "Discount product field is mandatory for discount rewards" msgstr "" @@ -120,7 +125,7 @@ msgid "Gift Product" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:52 +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 #, python-format msgid "Gift product field is mandatory for gift rewards" msgstr "" @@ -153,6 +158,11 @@ msgstr "" 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 @@ -165,10 +175,14 @@ msgstr "" #: 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 -#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_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" @@ -205,6 +219,11 @@ msgstr "" 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" @@ -228,11 +247,6 @@ msgstr "" msgid "No Rewards Available" msgstr "" -#. module: pos_loyalty -#: model:ir.model,name:pos_loyalty.model_res_partner -msgid "Partner" -msgstr "" - #. module: pos_loyalty #. openerp-web #: code:addons/pos_loyalty/static/src/js/pos.js:393 @@ -256,7 +270,7 @@ msgid "Point of Sale Orders" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:67 +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 #, python-format msgid "Point product field is mandatory for point resale rewards" msgstr "" @@ -458,6 +472,11 @@ msgstr "" 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" diff --git a/pos_loyalty/i18n/it.po b/pos_loyalty/i18n/it.po index efa1ff4d..62929dfc 100644 --- a/pos_loyalty/i18n/it.po +++ b/pos_loyalty/i18n/it.po @@ -54,6 +54,11 @@ msgstr "" 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" @@ -95,7 +100,7 @@ msgid "Discount limit" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:59 +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 #, python-format msgid "Discount product field is mandatory for discount rewards" msgstr "" @@ -118,7 +123,7 @@ msgid "Gift Product" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:52 +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 #, python-format msgid "Gift product field is mandatory for gift rewards" msgstr "" @@ -151,6 +156,12 @@ msgstr "" 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 @@ -163,10 +174,14 @@ msgstr "" #: 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 -#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_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" @@ -203,6 +218,11 @@ msgstr "" 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" @@ -226,11 +246,6 @@ msgstr "" msgid "No Rewards Available" msgstr "" -#. module: pos_loyalty -#: model:ir.model,name:pos_loyalty.model_res_partner -msgid "Partner" -msgstr "" - #. module: pos_loyalty #. openerp-web #: code:addons/pos_loyalty/static/src/js/pos.js:393 @@ -254,7 +269,7 @@ msgid "Point of Sale Orders" msgstr "Punto di riordino" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:67 +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 #, python-format msgid "Point product field is mandatory for point resale rewards" msgstr "" @@ -456,6 +471,11 @@ msgstr "" 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" diff --git a/pos_loyalty/i18n/nl_NL.po b/pos_loyalty/i18n/nl_NL.po index 686b8076..f63a6572 100644 --- a/pos_loyalty/i18n/nl_NL.po +++ b/pos_loyalty/i18n/nl_NL.po @@ -55,6 +55,11 @@ msgstr "" 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" @@ -96,7 +101,7 @@ msgid "Discount limit" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:59 +#: code:addons/pos_loyalty/models/loyalty_reward.py:64 #, python-format msgid "Discount product field is mandatory for discount rewards" msgstr "" @@ -119,7 +124,7 @@ msgid "Gift Product" msgstr "" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:52 +#: code:addons/pos_loyalty/models/loyalty_reward.py:57 #, python-format msgid "Gift product field is mandatory for gift rewards" msgstr "" @@ -152,6 +157,12 @@ msgstr "" 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 @@ -164,10 +175,14 @@ msgstr "" #: 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 -#: model:ir.ui.view,arch_db:pos_loyalty.pos_config_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" @@ -204,6 +219,11 @@ msgstr "" 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" @@ -227,11 +247,6 @@ msgstr "" msgid "No Rewards Available" msgstr "" -#. module: pos_loyalty -#: model:ir.model,name:pos_loyalty.model_res_partner -msgid "Partner" -msgstr "" - #. module: pos_loyalty #. openerp-web #: code:addons/pos_loyalty/static/src/js/pos.js:393 @@ -255,7 +270,7 @@ msgid "Point of Sale Orders" msgstr "Kassaorders" #. module: pos_loyalty -#: code:addons/pos_loyalty/models/loyalty_reward.py:67 +#: code:addons/pos_loyalty/models/loyalty_reward.py:72 #, python-format msgid "Point product field is mandatory for point resale rewards" msgstr "" @@ -457,6 +472,11 @@ msgstr "" 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" From 78e54d0fa48e823a9aa6b8d1421cdf3c1b2b7c1b Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 3 Apr 2019 03:12:32 +0000 Subject: [PATCH 09/12] [ADD] icon.png --- pos_loyalty/static/description/icon.png | Bin 0 -> 9455 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pos_loyalty/static/description/icon.png diff --git a/pos_loyalty/static/description/icon.png b/pos_loyalty/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From 8f7155cfad2363e622f49669dfb35949cc079b6a Mon Sep 17 00:00:00 2001 From: Pierrick Brun Date: Tue, 7 May 2019 15:40:14 +0200 Subject: [PATCH 10/12] [MIG] pos_loyalty to 12.0 --- pos_loyalty/__manifest__.py | 2 +- pos_loyalty/readme/DESCRIPTION.rst | 2 +- pos_loyalty/views/res_partner_view.xml | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pos_loyalty/__manifest__.py b/pos_loyalty/__manifest__.py index 8bd95be8..b7e7f518 100644 --- a/pos_loyalty/__manifest__.py +++ b/pos_loyalty/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Loyalty Program', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Point of Sale', 'license': 'AGPL-3', 'author': "OpenERP SA, " diff --git a/pos_loyalty/readme/DESCRIPTION.rst b/pos_loyalty/readme/DESCRIPTION.rst index 8bb9f2af..66ab8c12 100644 --- a/pos_loyalty/readme/DESCRIPTION.rst +++ b/pos_loyalty/readme/DESCRIPTION.rst @@ -1,6 +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 v10 of the pos_loyalty module from Odoo's +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/views/res_partner_view.xml b/pos_loyalty/views/res_partner_view.xml index a768ead9..c183f50d 100644 --- a/pos_loyalty/views/res_partner_view.xml +++ b/pos_loyalty/views/res_partner_view.xml @@ -5,11 +5,14 @@ res.partner - - - - - + +
From 32df971e2cc4adda8295e2caae4bf35527774944 Mon Sep 17 00:00:00 2001 From: Pierrick Brun Date: Wed, 15 May 2019 10:30:08 +0200 Subject: [PATCH 11/12] [FIX] linting --- pos_loyalty/static/src/js/pos.js | 246 ++++++++++++++++------------- pos_loyalty/static/src/js/tests.js | 45 +++--- 2 files changed, 161 insertions(+), 130 deletions(-) diff --git a/pos_loyalty/static/src/js/pos.js b/pos_loyalty/static/src/js/pos.js index 9a6a8936..91f07f86 100644 --- a/pos_loyalty/static/src/js/pos.js +++ b/pos_loyalty/static/src/js/pos.js @@ -2,8 +2,8 @@ * 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" +odoo.define('pos_loyalty.loyalty_program', function(require) { + "use strict" var models = require('point_of_sale.models'); var screens = require('point_of_sale.screens'); @@ -15,74 +15,92 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ 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); - } - } + models.load_fields('res.partner', 'loyalty_points'); - _.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]; + 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]); + }); }, - ],{'after': 'product.product'}); + }, { + 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(){ + get_reward: function() { return this.pos.loyalty.rewards_by_id[this.reward_id]; }, - set_reward: function(reward){ + set_reward: function(reward) { this.reward_id = reward.id; }, - export_as_JSON: function(){ + 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){ + init_from_JSON: function(json) { _orderline_super.init_from_JSON.apply(this, arguments); this.reward_id = json.reward_id; }, @@ -92,25 +110,25 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ models.Order = models.Order.extend({ /* The total of points won, excluding the points spent on rewards */ - get_won_points: function(){ + 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 rounding = this.pos.loyalty.rounding; var product_sold = 0; - var total_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 rules = this.pos.loyalty.rules_by_product_id[product.id] || []; var overriden = false; - if (line.get_reward()) { // Reward products are ignored + if (line.get_reward()) { // Reward products are ignored continue; } @@ -127,7 +145,7 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ } // Test the category rules - if ( product.pos_categ_id ) { + 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] || []; @@ -150,13 +168,13 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ if (!overriden) { product_sold += line.get_quantity(); - total_sold += line.get_price_with_tax(); + 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 ); + 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; }, @@ -166,9 +184,9 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ if (!this.pos.loyalty || !this.get_client()) { return 0; } else { - var lines = this.get_orderlines(); + var lines = this.get_orderlines(); var rounding = this.pos.loyalty.rounding; - var points = 0; + var points = 0; for (var i = 0; i < lines.length; i++) { var line = lines[i]; @@ -207,12 +225,12 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ }, /* The number of loyalty points currently owned by the customer */ - get_current_points: function(){ + 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(){ + get_spendable_points: function() { if (!this.pos.loyalty || !this.get_client()) { return 0; } else { @@ -220,7 +238,7 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ } }, - has_discount_reward: function(){ + has_discount_reward: function() { var res = false; var lines = this.get_orderlines(); @@ -236,7 +254,7 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ }, /* The list of rewards that the current customer can get */ - get_available_rewards: function(){ + get_available_rewards: function() { var client = this.get_client(); if (!client) { return []; @@ -248,11 +266,11 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ if (reward.minimum_points > this.get_spendable_points()) { continue; - } else if(reward.type === 'gift' && - reward.point_cost > this.get_spendable_points()) { + } 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())){ + } else if (reward.type === 'discount' && + (discount_reward_set || reward.point_cost > this.get_spendable_points())) { continue; } rewards.push(reward); @@ -260,7 +278,7 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ return rewards; }, - apply_reward: function(reward){ + apply_reward: function(reward) { var client = this.get_client(); if (!client) { return; @@ -275,17 +293,19 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ price: 0, quantity: 1, merge: false, - extras: { reward_id: reward.id }, + 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 = round_pr(order_total * reward.discount, crounding); var discount_max = reward.discount_max - if (discount_max && discount > discount_max ) { + if (discount_max && discount > discount_max) { discount = discount_max; } @@ -299,7 +319,9 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ price: -discount, quantity: 1, merge: false, - extras: { reward_id: reward.id }, + extras: { + reward_id: reward.id + }, }); } else if (reward.type === 'resale') { @@ -315,39 +337,41 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ return; } - if ( round_pr( spendable * product.price, crounding ) > order_total ) { - spendable = round_pr( Math.floor(order_total / product.price), lrounding); + if (round_pr(spendable * product.price, crounding) > order_total) { + spendable = round_pr(Math.floor(order_total / product.price), lrounding); } - if ( spendable < 0.00001 ) { + if (spendable < 0.00001) { return; } this.add_product(product, { quantity: -spendable, merge: false, - extras: { reward_id: reward.id }, + extras: { + reward_id: reward.id + }, }); } }, - finalize: function(){ + finalize: function() { var client = this.get_client(); - if ( 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(){ + 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(), + 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(), }; @@ -355,7 +379,7 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ return json; }, - export_as_JSON: function(){ + export_as_JSON: function() { var json = _order_super.export_as_JSON.apply(this, arguments); json.loyalty_points = this.get_new_points(); return json; @@ -364,9 +388,9 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ var LoyaltyButton = screens.ActionButtonWidget.extend({ template: 'LoyaltyButton', - button_click: function(){ + button_click: function() { var self = this; - var order = this.pos.get_order(); + var order = this.pos.get_order(); var client = order.get_client(); if (!client) { this.gui.show_screen('clientlist'); @@ -375,9 +399,9 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ var rewards = order.get_available_rewards(); if (rewards.length === 0) { - this.gui.show_popup('error',{ + 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'), + '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]); @@ -386,13 +410,13 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ for (var i = 0; i < rewards.length; i++) { list.push({ label: rewards[i].name, - item: rewards[i], + item: rewards[i], }); } - this.gui.show_popup('selection',{ + this.gui.show_popup('selection', { 'title': _t('Please select a reward'), 'list': list, - 'confirm': function(reward){ + 'confirm': function(reward) { order.apply_reward(reward); }, }); @@ -403,24 +427,24 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ screens.define_action_button({ 'name': 'loyalty', 'widget': LoyaltyButton, - 'condition': function(){ + 'condition': function() { return this.pos.loyalty && this.pos.loyalty.rewards.length; }, }); screens.OrderWidget.include({ - update_summary: function(){ + 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',{ + 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, @@ -430,12 +454,12 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ $loypoints = $(this.el).find('.summary .loyalty-points'); $loypoints.removeClass('oe_hidden'); - if(points_total < 0){ + if (points_total < 0) { $loypoints.addClass('negative'); - }else{ + } else { $loypoints.removeClass('negative'); } - }else{ + } else { $loypoints.empty(); $loypoints.addClass('oe_hidden'); } @@ -450,4 +474,4 @@ odoo.define('pos_loyalty.loyalty_program', function (require){ } }, }); -}); +}); \ No newline at end of file diff --git a/pos_loyalty/static/src/js/tests.js b/pos_loyalty/static/src/js/tests.js index 3e5514a0..eff9f481 100644 --- a/pos_loyalty/static/src/js/tests.js +++ b/pos_loyalty/static/src/js/tests.js @@ -2,7 +2,7 @@ // 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) { +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. @@ -23,7 +23,7 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { }, { content: 'Check if customer ' + customer_name + ' is added', trigger: '.button.set-customer:contains("' + customer_name + '")', - run: function () {}, // it's a check + run: function() {}, // it's a check }]; } @@ -44,7 +44,7 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { }, { content: 'the ' + product_name + ' have been added to the order', trigger: '.order .product-name:contains("' + product_name + '")', - run: function () {}, // it's a check + run: function() {}, // it's a check }]; } @@ -52,12 +52,13 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { return [{ content: 'check if ' + product_name + ' is in order', trigger: '.orderline .product-name:contains("' + product_name + '")', - run: function () {}, // it's a check + run: function() {}, // it's a check }] } function generate_keypad_steps(amount_str, keypad_selector) { - var i, steps = [], current_char; + var i, steps = [], + current_char; for (i = 0; i < amount_str.length; ++i) { current_char = amount_str[i]; steps.push({ @@ -81,7 +82,7 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { return [{ content: 'order total contains ' + total_str, trigger: '.order .total .value:contains("' + total_str + '")', - run: function () {}, // it's a check + run: function() {}, // it's a check }]; } @@ -102,11 +103,11 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { }, { content: "verify that the order is being sent to the backend", trigger: ".js_connecting:visible", - run: function () {}, // it's a check + 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 + run: function() {}, // it's a check }, { content: "next order", trigger: '.button.next:visible', @@ -114,10 +115,10 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { } var steps = [{ - content: 'waiting for loading to finish', - trigger: '.o_main_content:has(.loader:hidden)', - run: function () {}, // it's a check - }]; + 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')); @@ -131,21 +132,24 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { steps = steps.concat([{ content: "verify tendered", trigger: '.col-tendered:contains("12.20")', - run: function () {}, // it's a check + run: function() {}, // it's a check }, { content: "verify change", trigger: '.col-change:contains("2.00")', - run: function () {}, // it's a check + run: function() {}, // it's a check }]); steps = steps.concat(finish_order()); - Tour.register('test_pos_loyalty_acquire_points', { test: true, url: '/pos/web' }, steps); + 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 + run: function() {}, // it's a check }]; steps = steps.concat(add_customer('Agrolait')); steps = steps.concat(add_reward('Free Peaches')); @@ -155,9 +159,12 @@ odoo.define('pos_loyalty.tour.test_pos_loyalty', function (require) { steps = steps.concat([{ content: "verify tendered", trigger: '.col-tendered:contains("0.00")', - run: function () {}, // it's a check + run: function() {}, // it's a check }]); steps = steps.concat(finish_order()); - Tour.register('test_pos_loyalty_spend_points', { test: true, url: '/pos/web' }, steps); -}) + Tour.register('test_pos_loyalty_spend_points', { + test: true, + url: '/pos/web' + }, steps); +}) \ No newline at end of file From aeccf311e4f45e91c3a9be3afcd355f372f612fc Mon Sep 17 00:00:00 2001 From: Wolfgang Pichler Date: Wed, 20 Nov 2019 08:12:30 +0100 Subject: [PATCH 12/12] [FIX] Fixed unit tests --- pos_loyalty/tests/test_pos_loyalty.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/pos_loyalty/tests/test_pos_loyalty.py b/pos_loyalty/tests/test_pos_loyalty.py index 1a50dd1b..0cd3ef38 100644 --- a/pos_loyalty/tests/test_pos_loyalty.py +++ b/pos_loyalty/tests/test_pos_loyalty.py @@ -2,21 +2,17 @@ # Copyright 2018 Lambda IS DOOEL # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo.api import Environment from odoo.tests import HttpCase class TestPOSLoyalty(HttpCase): def test_pos_loyalty(self): - cr = self.registry.cursor() - assert cr == self.registry.test_cr - env = Environment(cr, self.uid, {}) - main_pos_config = env.ref('point_of_sale.pos_config_main') - target_product = env.ref('point_of_sale.peche') - free_product = env.ref('point_of_sale.Onions') - customer = env.ref('base.res_partner_2') - loyalty_program = env['loyalty.program'].create({ + 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', @@ -45,11 +41,9 @@ class TestPOSLoyalty(HttpCase): # 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. - env['ir.module.module'].search( + self.env['ir.module.module'].search( [('name', '=', 'pos_loyalty')], limit=1).state = 'installed' - cr.release() - # Process an order with 2kg of Peaches which should # add 20 loyalty points self.phantom_js("/pos/web",