diff --git a/pos_access_right/README.rst b/pos_access_right/README.rst new file mode 100644 index 0000000000..7ac893085e --- /dev/null +++ b/pos_access_right/README.rst @@ -0,0 +1,94 @@ +================================== +Point of Sale - Extra Access Right +================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/16.0/pos_access_right + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-14-0/pos-14-0-pos_access_right + :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/16.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends Odoo Point Of Sale features, restricting possibility to cashier to make some actions in the Point of Sale. This module will add the following groups to Odoo: + +* **PoS - Negative Quantity**: The cashier can sell negative quantity in Point Of Sale (ie, can return products); +* **PoS - Discount**: The cashier can set Discount in Point Of Sale; +* **PoS - Change Unit Price**: The cashier can change the unit price of a product in Point Of Sale; +* **PoS - Many Orders**: The cashier can many orders at the same time; +* **PoS - Delete Order**: The cashier can not delete a full order; + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Once installed, you have to give correct access right to your cashiers. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/184/9.0 + +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 +~~~~~~~ + +* La Louve +* GRAP + +Contributors +~~~~~~~~~~~~ + +* Sylvain LE GAL +* Ammmar Officewala +* Helly kapatel + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/pos `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/pos_access_right/__init__.py b/pos_access_right/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/pos_access_right/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/pos_access_right/__manifest__.py b/pos_access_right/__manifest__.py new file mode 100644 index 0000000000..384b5e6d85 --- /dev/null +++ b/pos_access_right/__manifest__.py @@ -0,0 +1,29 @@ +# Copyright (C) 2016-Today: La Louve () +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Point of Sale - Extra Access Right", + "version": "16.0.1.0.0", + "category": "Point Of Sale", + "summary": "Point of Sale - Extra Access Right for certain actions", + "author": "La Louve, GRAP, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": ["pos_hr"], + "demo": ["demo/res_groups.xml"], + "data": [ + "security/res_groups.xml", + ], + "assets": { + "point_of_sale.assets": [ + "pos_access_right/static/src/css/*", + "pos_access_right/static/src/js/*.js", + "pos_access_right/static/src/xml/*.xml", + ] + }, + "qweb": [ + "static/src/xml/*.xml", + ], + "installable": True, +} diff --git a/pos_access_right/demo/res_groups.xml b/pos_access_right/demo/res_groups.xml new file mode 100644 index 0000000000..bed5a2ffc4 --- /dev/null +++ b/pos_access_right/demo/res_groups.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_access_right/i18n/ar.po b/pos_access_right/i18n/ar.po new file mode 100644 index 0000000000..5e5eb6ffc7 --- /dev/null +++ b/pos_access_right/i18n/ar.po @@ -0,0 +1,155 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-10-21 18:32+0000\n" +"Last-Translator: Osoul \n" +"Language-Team: none\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" +"X-Generator: Weblate 3.8\n" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:142 +#, python-format +msgid "Change Unit Price - Unauthorized function" +msgstr "تغيير سعر البيع - ليس لديك صلاحية" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:87 +#, python-format +msgid "Delete Order - Unauthorized function" +msgstr "حذف أمر مبيعات - ليس لديك صلاحية" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:135 +#, python-format +msgid "Discount - Unauthorized function" +msgstr "تخفيض - ليس لديك صلاحية" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:70 +#, python-format +msgid "Many Orders - Unauthorized function" +msgstr "تعدد أوامر مبيعات - ليس لديك صلاحية" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:115 +#, python-format +msgid "Negative Quantity - Unauthorized function" +msgstr "كمية بالسالب - ليس لديك صلاحية" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:166 +#, python-format +msgid "Payment - Unauthorized function" +msgstr "الدفع - ليس لديك صلاحية" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:71 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:88 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:116 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:136 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:143 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:167 +#, python-format +msgid "Please ask your manager to do it." +msgstr "قم بطلب مساعدة من المشرف." + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "نقاط البيع - السماح بالتخفيض" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "نقاط البيع - السماح بالكمية بالسالب" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "نقاط البيع - السماح بتغير سعر البيع" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "نقاط البيع - السماح بحذف أمر مبيعات" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "نقاط البيع - التخفيض" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "نقاط البيع - تعدد أوامر المبيعات" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "نقاط البيع - الكمية بالسالب" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "نقاط البيع - الدفع" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "نقاط البيع - تغيير سعر البيع" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "إعدادات نقاط البيع" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "This field is there to pass the id of the 'PoS - Allow Discount' Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "This field is there to pass the id of the 'PoS - Allow Negative Quantity' Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "This field is there to pass the id of the 'PoS - Allow Unit Price Change' Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "This field is there to pass the id of the 'PoS - Delete Order' Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "This field is there to pass the id of the 'PoS - Many Orders Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "This field is there to pass the id of the 'PoS - Payment' Group to the Point of Sale Frontend." +msgstr "" diff --git a/pos_access_right/i18n/ca.po b/pos_access_right/i18n/ca.po new file mode 100644 index 0000000000..6aa71eba18 --- /dev/null +++ b/pos_access_right/i18n/ca.po @@ -0,0 +1,184 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +# Translators: +# Marc Tormo i Bochaca , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-28 05:50+0000\n" +"PO-Revision-Date: 2022-03-23 12:17+0000\n" +"Last-Translator: Noel estudillo \n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:142 +#, python-format +msgid "Change Unit Price - Unauthorized function" +msgstr "Canviar preu unitari - Funció no autoritzada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:87 +#, python-format +msgid "Delete Order - Unauthorized function" +msgstr "Esborrar comanda - Funció no autoritzada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:135 +#, python-format +msgid "Discount - Unauthorized function" +msgstr "Descomptes - Funció no autoritzada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:70 +#, python-format +msgid "Many Orders - Unauthorized function" +msgstr "Múltiples Comandes - Funció no autoritzada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:115 +#, python-format +msgid "Negative Quantity - Unauthorized function" +msgstr "Quantitat Negativa - Funció no autoritzada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:166 +#, python-format +msgid "Payment - Unauthorized function" +msgstr "Descomptes - Funció no autoritzada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:71 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:88 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:116 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:136 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:143 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:167 +#, python-format +msgid "Please ask your manager to do it." +msgstr "Si us plau, pregunti al seu administrador per fer-ho." + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Punt de Venda - Permetre Descomptes" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Punt de Venda - Permetre quantitats negatives" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Punt de Venda - Permetre canviar el preu de venda" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Punt de Venda - Esborrar comandes" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Punt de Venda - Descomptes" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Punt de Venda - Múltiples Comandes" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Punt de Venda - Quantitats negatives" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Punt de Venda - Descomptes" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Punt de Venda - Canviar preu unitari" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Punt de Venda - Descomptes" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Permetre Descomptes' " +"cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Permetre Quantitats " +"Negatives' cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Canviar Preu Unitari' " +"cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Esborrar Comanda' cap " +"a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" +"Aquest camp està aquí per passar el ID del grup 'TPV - Múltiples Comandes' " +"cap a la pantalla del Punt de Venda." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" +"Aquest camp està allà per passar l'identificador del grup \"PoS - Pagament\" " +"al Frontend del punt de venda." + +#~ msgid "pos.config" +#~ msgstr "pos.config" diff --git a/pos_access_right/i18n/es.po b/pos_access_right/i18n/es.po new file mode 100644 index 0000000000..230c85662f --- /dev/null +++ b/pos_access_right/i18n/es.po @@ -0,0 +1,166 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-07-27 11:19+0000\n" +"Last-Translator: Daniel Martinez Vila \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:142 +#, python-format +msgid "Change Unit Price - Unauthorized function" +msgstr "Cambiar precio unitario - Función no autorizada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:87 +#, python-format +msgid "Delete Order - Unauthorized function" +msgstr "Eliminar orden - Función no autorizada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:135 +#, python-format +msgid "Discount - Unauthorized function" +msgstr "Descuento - Función no autorizada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:70 +#, python-format +msgid "Many Orders - Unauthorized function" +msgstr "Muchas órdenes - Función no autorizada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:115 +#, python-format +msgid "Negative Quantity - Unauthorized function" +msgstr "Cantidad negativa- Función no autorizada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:166 +#, python-format +msgid "Payment - Unauthorized function" +msgstr "Pago - Función no autorizada" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:71 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:88 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:116 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:136 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:143 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:167 +#, python-format +msgid "Please ask your manager to do it." +msgstr "Pídale a su gerente que lo haga." + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Punto de venta - Permitir descuento" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Punto de venta - Permitir cantidad negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Punto de venta - Permitir cambio de precio unitario" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Punto de venta - Eliminar pedido" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Punto de Venta - Descuento" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Punto de venta - Muchos pedidos" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Punto de venta - Cantidad negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Punto de Venta - Pago" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Punto de venta - Cambio de precio unitario" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configuración del punto de venta" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "This field is there to pass the id of the 'PoS - Allow Discount' Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Permitir " +"descuento' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "This field is there to pass the id of the 'PoS - Allow Negative Quantity' Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Permitir " +"cantidad negativa' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "This field is there to pass the id of the 'PoS - Allow Unit Price Change' Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Permitir " +"cambio de precio unitario' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "This field is there to pass the id of the 'PoS - Delete Order' Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Eliminar " +"pedido' al Frontend del punto de venta." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "This field is there to pass the id of the 'PoS - Many Orders Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Muchos " +"pedidos' al punto de venta frontend." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "This field is there to pass the id of the 'PoS - Payment' Group to the Point of Sale Frontend." +msgstr "" +"Este campo está allí para pasar la identificación del grupo 'PdV - Pago' al " +"Frontend del punto de venta." diff --git a/pos_access_right/i18n/fr.po b/pos_access_right/i18n/fr.po new file mode 100644 index 0000000000..1a880cd7e1 --- /dev/null +++ b/pos_access_right/i18n/fr.po @@ -0,0 +1,182 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-02 11:49+0000\n" +"PO-Revision-Date: 2022-02-16 18:32+0000\n" +"Last-Translator: Khalid Hazam \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:142 +#, python-format +msgid "Change Unit Price - Unauthorized function" +msgstr "Changer le prix unitaire - Fonctionnalité non autorisée" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:87 +#, python-format +msgid "Delete Order - Unauthorized function" +msgstr "Supprimer une commande de vente - Fonctionnalité non autorisée" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:135 +#, python-format +msgid "Discount - Unauthorized function" +msgstr "Remise - Fonctionnalité non autorisée" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:70 +#, python-format +msgid "Many Orders - Unauthorized function" +msgstr "Plusieurs Commandes simultanées - Fonctionnalité non autorisée" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:115 +#, python-format +msgid "Negative Quantity - Unauthorized function" +msgstr "Quantité négative - Fonctionnalité non autorisée" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:166 +#, python-format +msgid "Payment - Unauthorized function" +msgstr "Paiement - Fonctionnalité non autorisée" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:71 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:88 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:116 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:136 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:143 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:167 +#, python-format +msgid "Please ask your manager to do it." +msgstr "Veuillez vous rapprocher d'un responsable" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Point de vente - Autoriser les remises" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Point de vente - Autoriser les quantités négatives" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Point de vente - Autoriser le changement de prix unitaire" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Point de Vente - Supprimer une commande" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Point de Vente - Remise" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Point de Vente - Plusieurs commandes simultanées" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Point de Vente - Quantité négative" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Point de Vente - Paiement" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Point de Vente - Changer de prix" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Point de Vente - Configuration" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Autoriser les remises' au " +"sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Autoriser les quantités " +"négatives' au sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Autoriser les changements " +"de prix unitaires' au sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Supprimer une commande' " +"au sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Plusieurs commandes' au " +"sein du point de vente tactile." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" +"Ce champs existe pour passer l'ID du groupe 'PdV - Paiement' au sein du " +"point de vente tactile." + +#~ msgid "pos.config" +#~ msgstr "pos.config" diff --git a/pos_access_right/i18n/it.po b/pos_access_right/i18n/it.po new file mode 100644 index 0000000000..633b8d225c --- /dev/null +++ b/pos_access_right/i18n/it.po @@ -0,0 +1,181 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-03-09 22:22+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/NumpadWidget.xml:0 +#, python-format +msgid "!hasMinusControlRights" +msgstr "!hasMinusControlRights" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/TicketScreen.xml:0 +#, python-format +msgid "!hasNewOrdersControlRights" +msgstr "!hasNewOrdersControlRights" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/ActionpadWidget.xml:0 +#, python-format +msgid "!hasPaymentControlRights" +msgstr "!hasPaymentControlRights" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__id +msgid "ID" +msgstr "ID" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Punto vendita - Consenti sconto" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Punto vendita - Consenti quantità negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Punto vendita - Consenti modifica prezzo unitario" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Punto vendita - Cancella ordine" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Punto vendita - Sconto" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Punto vendita - Molti ordini" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Punto vendita - Quantità negativa" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "Punto vendita - Pagamento" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Punto vendita - Modifica prezzo unitario" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configurazione punto vendita" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Consenti sconto' " +"al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Consenti quantità " +"negativa' al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Consenti modifica " +"prezzo unitario' al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Cancella ordine' " +"al frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Molti ordini' al " +"frontend punto vendita." + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point" +" of Sale Frontend." +msgstr "" +"Questo campo è definito per passare l'ID del gruppo 'PoS - Pagamento' al " +"frontend punto vendita." + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/NumpadWidget.xml:0 +#, python-format +msgid "{'disabled-mode': !hasMinusControlRights}" +msgstr "{'disabled-mode': !hasMinusControlRights}" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/TicketScreen.xml:0 +#, python-format +msgid "{'disabled-mode': !hasNewOrdersControlRights}" +msgstr "{'disabled-mode': !hasNewOrdersControlRights}" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/ActionpadWidget.xml:0 +#, python-format +msgid "{'disabled-mode': !hasPaymentControlRights}" +msgstr "{'disabled-mode': !hasPaymentControlRights}" diff --git a/pos_access_right/i18n/pos_access_right.pot b/pos_access_right/i18n/pos_access_right.pot new file mode 100644 index 0000000000..3e15e881e2 --- /dev/null +++ b/pos_access_right/i18n/pos_access_right.pot @@ -0,0 +1,166 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/NumpadWidget.xml:0 +#, python-format +msgid "!hasMinusControlRights" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/TicketScreen.xml:0 +#, python-format +msgid "!hasNewOrdersControlRights" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/ActionpadWidget.xml:0 +#, python-format +msgid "!hasPaymentControlRights" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__display_name +msgid "Display Name" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__id +msgid "ID" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config____last_update +msgid "Last Modified on" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +msgid "Point of Sale - Payment" +msgstr "" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point" +" of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/NumpadWidget.xml:0 +#, python-format +msgid "{'disabled-mode': !hasMinusControlRights}" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/TicketScreen.xml:0 +#, python-format +msgid "{'disabled-mode': !hasNewOrdersControlRights}" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/xml/ActionpadWidget.xml:0 +#, python-format +msgid "{'disabled-mode': !hasPaymentControlRights}" +msgstr "" diff --git a/pos_access_right/i18n/ru.po b/pos_access_right/i18n/ru.po new file mode 100644 index 0000000000..7c8ff5ad73 --- /dev/null +++ b/pos_access_right/i18n/ru.po @@ -0,0 +1,169 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_access_right +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-05-30 11:19+0000\n" +"Last-Translator: Ivan Yelizariev \n" +"Language-Team: none\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 3.6.1\n" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:142 +#, python-format +msgid "Change Unit Price - Unauthorized function" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:87 +#, python-format +msgid "Delete Order - Unauthorized function" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:135 +#, python-format +msgid "Discount - Unauthorized function" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:70 +#, python-format +msgid "Many Orders - Unauthorized function" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:115 +#, python-format +msgid "Negative Quantity - Unauthorized function" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:166 +#, python-format +msgid "Payment - Unauthorized function" +msgstr "" + +#. module: pos_access_right +#. openerp-web +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:71 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:88 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:116 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:136 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:143 +#: code:addons/pos_access_right/static/src/js/pos_access_right.js:167 +#, python-format +msgid "Please ask your manager to do it." +msgstr "Попросите менеджера выполнить это действие." + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_discount_id +msgid "Point of Sale - Allow Discount" +msgstr "Точка продаж - Разрешить Скидки" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_negative_qty_id +msgid "Point of Sale - Allow Negative Quantity" +msgstr "Точка продаж - Разрешить отрицательное количество" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "Point of Sale - Allow Unit Price Change" +msgstr "Точка продаж - Разрешить изменение цены за штуку" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_delete_order_id +#: model:res.groups,name:pos_access_right.group_delete_order +msgid "Point of Sale - Delete Order" +msgstr "Точка продаж - Удаление заказа" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_discount +msgid "Point of Sale - Discount" +msgstr "Точка продаж - Скидки" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_multi_order_id +#: model:res.groups,name:pos_access_right.group_multi_order +msgid "Point of Sale - Many Orders" +msgstr "Точка продаж - Более одного заказа" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_negative_qty +msgid "Point of Sale - Negative Quantity" +msgstr "Точка продаж - Отрицательное количество" + +#. module: pos_access_right +#: model:ir.model.fields,field_description:pos_access_right.field_pos_config__group_payment_id +#: model:res.groups,name:pos_access_right.group_payment +#, fuzzy +#| msgid "Point of Sale - Discount" +msgid "Point of Sale - Payment" +msgstr "Точка продаж - Скидки" + +#. module: pos_access_right +#: model:res.groups,name:pos_access_right.group_change_unit_price +msgid "Point of Sale - Unit Price Change" +msgstr "Точка продаж - Изменение цены за штуку" + +#. module: pos_access_right +#: model:ir.model,name:pos_access_right.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Настройки Точки продаж" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_discount_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Discount' Group to " +"the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_negative_qty_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Negative Quantity' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_change_unit_price_id +msgid "" +"This field is there to pass the id of the 'PoS - Allow Unit Price Change' " +"Group to the Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_delete_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Delete Order' Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_multi_order_id +msgid "" +"This field is there to pass the id of the 'PoS - Many Orders Group to the " +"Point of Sale Frontend." +msgstr "" + +#. module: pos_access_right +#: model:ir.model.fields,help:pos_access_right.field_pos_config__group_payment_id +msgid "" +"This field is there to pass the id of the 'PoS - Payment' Group to the Point " +"of Sale Frontend." +msgstr "" diff --git a/pos_access_right/models/__init__.py b/pos_access_right/models/__init__.py new file mode 100644 index 0000000000..20c47743d3 --- /dev/null +++ b/pos_access_right/models/__init__.py @@ -0,0 +1,2 @@ +from . import pos_config +from . import pos_session diff --git a/pos_access_right/models/pos_config.py b/pos_access_right/models/pos_config.py new file mode 100644 index 0000000000..ec91c0f88e --- /dev/null +++ b/pos_access_right/models/pos_config.py @@ -0,0 +1,106 @@ +from odoo import fields, models + + +class PosConfig(models.Model): + _inherit = "pos.config" + + group_negative_qty_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Allow Negative Quantity", + help="This field is there to pass the id of the 'PoS - Allow Negative" + " Quantity' Group to the Point of Sale Frontend.", + ) + + group_discount_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Allow Discount", + help="This field is there to pass the id of the 'PoS - Allow Discount'" + " Group to the Point of Sale Frontend.", + ) + + group_change_unit_price_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Allow Unit Price Change", + help="This field is there to pass the id of the 'PoS - Allow Unit" + " Price Change' Group to the Point of Sale Frontend.", + ) + + group_multi_order_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Many Orders", + help="This field is there to pass the id of the 'PoS - Many Orders" + " Group to the Point of Sale Frontend.", + ) + + group_delete_order_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Delete Order", + help="This field is there to pass the id of the 'PoS - Delete Order'" + " Group to the Point of Sale Frontend.", + ) + + group_delete_order_line_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Delete Order Line", + help="This field is there to pass the id of the 'PoS - Delete Order Line'" + " Group to the Point of Sale Frontend.", + ) + + group_payment_id = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Payment", + help="This field is there to pass the id of the 'PoS - Payment'" + " Group to the Point of Sale Frontend.", + ) + + group_refund_action = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Refund", + help="This field is to enable Refund Button only for Accounting/Pos Manager" + " Group to the Point of Sale Frontend.", + ) + + group_cashinout_action = fields.Many2one( + comodel_name="res.groups", + compute="_compute_groups", + string="Point of Sale - Cash In/Out", + help="This field is to enable Cash In/Out Button only for Accounting/Pos Manager" + " Group to the Point of Sale Frontend.", + ) + + def _compute_groups(self): + self.update( + { + "group_negative_qty_id": self.env.ref( + "pos_access_right.group_negative_qty" + ).id, + "group_discount_id": self.env.ref("pos_access_right.group_discount").id, + "group_change_unit_price_id": self.env.ref( + "pos_access_right.group_change_unit_price" + ).id, + "group_multi_order_id": self.env.ref( + "pos_access_right.group_multi_order" + ).id, + "group_delete_order_id": self.env.ref( + "pos_access_right.group_delete_order" + ).id, + "group_delete_order_line_id": self.env.ref( + "pos_access_right.group_delete_order_line" + ).id, + "group_payment_id": self.env.ref("pos_access_right.group_payment").id, + "group_refund_action": self.env.ref( + "pos_access_right.group_refund_action" + ).id, + "group_cashinout_action": self.env.ref( + "pos_access_right.group_cashinout_action" + ).id, + } + ) diff --git a/pos_access_right/models/pos_session.py b/pos_access_right/models/pos_session.py new file mode 100644 index 0000000000..ecea7cca3b --- /dev/null +++ b/pos_access_right/models/pos_session.py @@ -0,0 +1,70 @@ +from odoo import models + + +class PosSession(models.Model): + _inherit = "pos.session" + + def _get_pos_ui_res_users(self, params): + user_vals = super()._get_pos_ui_res_users(params) + user_id = user_vals.get("id") + if user_id: + user = self.env["res.users"].browse(user_id) + groups = user.groups_id + config = self.config_id + user_vals.update( + hasGroupPayment=config.group_payment_id in groups, + hasGroupDiscount=config.group_discount_id in groups, + hasGroupNegativeQty=config.group_negative_qty_id in groups, + hasGroupPriceControl=config.group_change_unit_price_id in groups, + hasGroupMultiOrder=config.group_multi_order_id in groups, + hasGroupDeleteOrder=config.group_delete_order_id in groups, + hasGroupDeleteOrderLine=config.group_delete_order_line_id in groups, + hasGroupRefundAction=config.group_refund_action in groups, + hasGroupCashinoutAction=config.group_cashinout_action in groups, + ) + return user_vals + + def _get_pos_ui_hr_employee(self, params): + employees = super()._get_pos_ui_hr_employee(params) + for employee in employees: + user = self.env["res.users"].browse(employee["user_id"]) + if user: + groups = user.groups_id + config = self.config_id + employee["hasGroupPayment"] = ( + True if config.group_payment_id in groups else False + ) + + employee["hasGroupDiscount"] = ( + True if config.group_discount_id in groups else False + ) + + employee["hasGroupNegativeQty"] = ( + True if config.group_negative_qty_id in groups else False + ) + + employee["hasGroupPriceControl"] = ( + True if config.group_change_unit_price_id in groups else False + ) + + employee["hasGroupMultiOrder"] = ( + True if config.group_multi_order_id in groups else False + ) + + employee["hasGroupDeleteOrder"] = ( + True if config.group_delete_order_id in groups else False + ) + + employee["hasGroupDeleteOrderLine"] = ( + True if config.group_delete_order_line_id in groups else False + ) + + employee["hasGroupRefundAction"] = ( + True if config.group_refund_action in groups else False + ) + + employee["hasGroupCashinoutAction"] = ( + True if config.group_cashinout_action in groups else False + ) + + return employees diff --git a/pos_access_right/readme/CONFIGURE.rst b/pos_access_right/readme/CONFIGURE.rst new file mode 100644 index 0000000000..ee6194f2d9 --- /dev/null +++ b/pos_access_right/readme/CONFIGURE.rst @@ -0,0 +1 @@ +Once installed, you have to give correct access right to your cashiers. diff --git a/pos_access_right/readme/CONTRIBUTORS.rst b/pos_access_right/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..452a4d13d5 --- /dev/null +++ b/pos_access_right/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Sylvain LE GAL +* Ammmar Officewala +* Helly kapatel +* Jumeldi diff --git a/pos_access_right/readme/DESCRIPTION.rst b/pos_access_right/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..dc508c9fbf --- /dev/null +++ b/pos_access_right/readme/DESCRIPTION.rst @@ -0,0 +1,10 @@ +This module extends Odoo Point Of Sale features, restricting possibility to cashier to make some actions in the Point of Sale. This module will add the following groups to Odoo: + +* **PoS - Negative Quantity**: The cashier can sell negative quantity in Point Of Sale (ie, can return products); +* **PoS - Discount**: The cashier can set Discount in Point Of Sale; +* **PoS - Change Unit Price**: The cashier can change the unit price of a product in Point Of Sale; +* **PoS - Many Orders**: The cashier can many orders at the same time; +* **PoS - Delete Order**: The cashier can not delete a full order; +* **PoS - Delete Order Line**: The cashier can not delete an order line; +* **Pos - Refund Order**: The cashier can not do refund of an order; +* **Pos - Cash In/Out**: The cashier can not open Cash In/Out Popup; diff --git a/pos_access_right/readme/USAGE.rst b/pos_access_right/readme/USAGE.rst new file mode 100644 index 0000000000..8471f7f9e6 --- /dev/null +++ b/pos_access_right/readme/USAGE.rst @@ -0,0 +1,3 @@ +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/184/9.0 diff --git a/pos_access_right/security/res_groups.xml b/pos_access_right/security/res_groups.xml new file mode 100644 index 0000000000..71c7d2dd3f --- /dev/null +++ b/pos_access_right/security/res_groups.xml @@ -0,0 +1,54 @@ + + + + + + Point of Sale - Negative Quantity + + + + + Point of Sale - Discount + + + + + Point of Sale - Unit Price Change + + + + + Point of Sale - Many Orders + + + + + Point of Sale - Delete Order + + + + + Point of Sale - Delete Order Line + + + + + Point of Sale - Payment + + + + + Point of Sale - Refund + + + + + Point of Sale - Cash In/Out + + + + diff --git a/pos_access_right/static/description/admin_numpad.png b/pos_access_right/static/description/admin_numpad.png new file mode 100644 index 0000000000..08c889c2a9 Binary files /dev/null and b/pos_access_right/static/description/admin_numpad.png differ diff --git a/pos_access_right/static/description/demo_error.png b/pos_access_right/static/description/demo_error.png new file mode 100644 index 0000000000..7c86cea2ac Binary files /dev/null and b/pos_access_right/static/description/demo_error.png differ diff --git a/pos_access_right/static/description/demo_numpad.png b/pos_access_right/static/description/demo_numpad.png new file mode 100644 index 0000000000..448dc2fb37 Binary files /dev/null and b/pos_access_right/static/description/demo_numpad.png differ diff --git a/pos_access_right/static/description/icon.png b/pos_access_right/static/description/icon.png new file mode 100644 index 0000000000..2c83d7101b Binary files /dev/null and b/pos_access_right/static/description/icon.png differ diff --git a/pos_access_right/static/description/index.html b/pos_access_right/static/description/index.html new file mode 100644 index 0000000000..75b7b2aef8 --- /dev/null +++ b/pos_access_right/static/description/index.html @@ -0,0 +1,439 @@ + + + + + + +Point of Sale - Extra Access Right + + + +
+

Point of Sale - Extra Access Right

+ + +

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

+

This module extends Odoo Point Of Sale features, restricting possibility to cashier to make some actions in the Point of Sale. This module will add the following groups to Odoo:

+
    +
  • PoS - Negative Quantity: The cashier can sell negative quantity in Point Of Sale (ie, can return products);
  • +
  • PoS - Discount: The cashier can set Discount in Point Of Sale;
  • +
  • PoS - Change Unit Price: The cashier can change the unit price of a product in Point Of Sale;
  • +
  • PoS - Many Orders: The cashier can many orders at the same time;
  • +
  • PoS - Delete Order: The cashier can not delete a full order;
  • +
+

Table of contents

+ +
+

Configuration

+

Once installed, you have to give correct access right to your cashiers.

+
+
+

Usage

+Try me on Runbot +
+
+

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

+
    +
  • La Louve
  • +
  • GRAP
  • +
+
+ +
+

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_access_right/static/description/new_groups.png b/pos_access_right/static/description/new_groups.png new file mode 100644 index 0000000000..86ca2191a9 Binary files /dev/null and b/pos_access_right/static/description/new_groups.png differ diff --git a/pos_access_right/static/src/css/pos.css b/pos_access_right/static/src/css/pos.css new file mode 100644 index 0000000000..414ece60ab --- /dev/null +++ b/pos_access_right/static/src/css/pos.css @@ -0,0 +1,17 @@ +.pos .actionpad .button.pay.disabled-mode, +.pos .actionpad .button.pay.disabled-mode:hover { + background: #c7c7c7; + color: #a5a1a1; + cursor: not-allowed; +} + +.pos .ticket-screen .controls button.highlight.disabled-mode:hover { + background: #c7c7c7; + border: solid 1px rgb(220, 220, 220); + color: #a5a1a1; + cursor: not-allowed; +} + +.pos .ticket-screen .pointer.disabled-mode:hover { + cursor: not-allowed; +} diff --git a/pos_access_right/static/src/js/ActionpadWidget.js b/pos_access_right/static/src/js/ActionpadWidget.js new file mode 100644 index 0000000000..c4c056b087 --- /dev/null +++ b/pos_access_right/static/src/js/ActionpadWidget.js @@ -0,0 +1,19 @@ +odoo.define("pos_access_right.ActionpadWidget", function (require) { + "use strict"; + + const Registries = require("point_of_sale.Registries"); + const ActionpadWidget = require("point_of_sale.ActionpadWidget"); + + const PosActionpadWidget = (ActionpadWidget) => + class extends ActionpadWidget { + get hasPaymentControlRights() { + if (this.env.pos.config.module_pos_hr) + return this.env.pos.get_cashier().hasGroupPayment; + return this.env.pos.user.hasGroupPayment; + } + }; + + Registries.Component.extend(ActionpadWidget, PosActionpadWidget); + + return ActionpadWidget; +}); diff --git a/pos_access_right/static/src/js/Chrome.js b/pos_access_right/static/src/js/Chrome.js new file mode 100644 index 0000000000..fe8fe47f71 --- /dev/null +++ b/pos_access_right/static/src/js/Chrome.js @@ -0,0 +1,25 @@ +odoo.define("pos_access_right.chrome", function (require) { + "use strict"; + + const Chrome = require("pos_hr.chrome"); + const Registries = require("point_of_sale.Registries"); + + const PosAccessRightChrome = (Chrome) => + class extends Chrome { + showCashMoveButton() { + if ( + this.env.pos.cashier && + this.env.pos.cashier.hasGroupCashinoutAction + ) + return ( + super.showCashMoveButton() || + this.env.pos.cashier.hasGroupCashinoutAction + ); + return super.showCashMoveButton(); + } + }; + + Registries.Component.extend(Chrome, PosAccessRightChrome); + + return Chrome; +}); diff --git a/pos_access_right/static/src/js/NumpadWidget.js b/pos_access_right/static/src/js/NumpadWidget.js new file mode 100644 index 0000000000..d476d30bb9 --- /dev/null +++ b/pos_access_right/static/src/js/NumpadWidget.js @@ -0,0 +1,43 @@ +odoo.define("pos_access_right.NumpadWidget", function (require) { + "use strict"; + + const Registries = require("point_of_sale.Registries"); + const NumpadWidget = require("point_of_sale.NumpadWidget"); + + const PosNumpadWidget = (NumpadWidget) => + class extends NumpadWidget { + get hasManualDiscount() { + const res = super.hasManualDiscount; + if (res) { + if (this.env.pos.config.module_pos_hr) + return this.env.pos.get_cashier().hasGroupDiscount; + return this.env.pos.user.hasGroupDiscount; + } + return res; + } + get hasMinusControlRights() { + if (this.env.pos.config.module_pos_hr) + return this.env.pos.get_cashier().hasGroupNegativeQty; + return this.env.pos.user.hasGroupNegativeQty; + } + get hasPriceControlRights() { + const res = super.hasPriceControlRights; + if (res) { + if (this.env.pos.config.module_pos_hr) + return this.env.pos.get_cashier().hasGroupPriceControl; + return this.env.pos.user.hasGroupPriceControl; + } + return res; + } + + get hasDeleteOrderLineRights() { + if (this.env.pos.config.module_pos_hr) + return this.env.pos.get_cashier().hasGroupDeleteOrderLine; + return this.env.pos.user.hasGroupDeleteOrderLine; + } + }; + + Registries.Component.extend(NumpadWidget, PosNumpadWidget); + + return NumpadWidget; +}); diff --git a/pos_access_right/static/src/js/RefundButton.js b/pos_access_right/static/src/js/RefundButton.js new file mode 100644 index 0000000000..9e9a36ca9a --- /dev/null +++ b/pos_access_right/static/src/js/RefundButton.js @@ -0,0 +1,22 @@ +odoo.define("pos_access_right.RefundButton", function (require) { + "use strict"; + const Registries = require("point_of_sale.Registries"); + const RefundButton = require("point_of_sale.RefundButton"); + + const PosRefundButton = (RefundButton) => + class extends RefundButton { + _onClick() { + if (this.env.pos.config.module_pos_hr) { + if (this.env.pos.get_cashier().hasGroupRefundAction) { + return super._onClick(); + } + } else if (this.env.pos.user.hasGroupRefundAction) + return super._onClick(); + + return false; + } + }; + + Registries.Component.extend(RefundButton, PosRefundButton); + return RefundButton; +}); diff --git a/pos_access_right/static/src/js/TicketScreen.js b/pos_access_right/static/src/js/TicketScreen.js new file mode 100644 index 0000000000..fb536c97c4 --- /dev/null +++ b/pos_access_right/static/src/js/TicketScreen.js @@ -0,0 +1,30 @@ +odoo.define("pos_access_right.TicketScreen", function (require) { + "use strict"; + + const Registries = require("point_of_sale.Registries"); + const TicketScreen = require("point_of_sale.TicketScreen"); + + const PosTicketScreen = (TicketScreen) => + class extends TicketScreen { + get hasNewOrdersControlRights() { + if (this.env.pos.config.module_pos_hr) + return this.env.pos.get_cashier().hasGroupMultiOrder; + return this.env.pos.user.hasGroupMultiOrder; + } + + async _onDeleteOrder({detail: order}) { + if (this.env.pos.config.module_pos_hr) { + if (this.env.pos.get_cashier().hasGroupDeleteOrder) { + return super._onDeleteOrder({detail: order}); + } + } else if (this.env.pos.user.hasGroupDeleteOrder) + return super._onDeleteOrder({detail: order}); + + return false; + } + }; + + Registries.Component.extend(TicketScreen, PosTicketScreen); + + return TicketScreen; +}); diff --git a/pos_access_right/static/src/js/models.js b/pos_access_right/static/src/js/models.js new file mode 100644 index 0000000000..bf059a1a19 --- /dev/null +++ b/pos_access_right/static/src/js/models.js @@ -0,0 +1,21 @@ +odoo.define("pos_access_right.models", function (require) { + "use strict"; + + const Registries = require("point_of_sale.Registries"); + var {Order} = require("point_of_sale.models"); + + const PosAccessRightOrder = (Order) => + class PosAccessRightOrder extends Order { + remove_orderline(line) { + if (this.pos.config.module_pos_hr) { + if (this.pos.get_cashier().hasGroupDeleteOrderLine) { + return super.remove_orderline(line); + } + } else if (this.pos.user.hasGroupDeleteOrderLine) + return super.remove_orderline(line); + + return false; + } + }; + Registries.Model.extend(Order, PosAccessRightOrder); +}); diff --git a/pos_access_right/static/src/xml/ActionpadWidget.xml b/pos_access_right/static/src/xml/ActionpadWidget.xml new file mode 100644 index 0000000000..57534d335b --- /dev/null +++ b/pos_access_right/static/src/xml/ActionpadWidget.xml @@ -0,0 +1,21 @@ + + + + + + {'disabled-mode': !hasPaymentControlRights} + !hasPaymentControlRights + + + + diff --git a/pos_access_right/static/src/xml/NumpadWidget.xml b/pos_access_right/static/src/xml/NumpadWidget.xml new file mode 100644 index 0000000000..bbc3896eca --- /dev/null +++ b/pos_access_right/static/src/xml/NumpadWidget.xml @@ -0,0 +1,33 @@ + + + + + + {'disabled-mode': !hasMinusControlRights} + !hasMinusControlRights + + + + {'disabled-mode': !hasDeleteOrderLineRights} + !hasDeleteOrderLineRights + + + + + + diff --git a/pos_access_right/static/src/xml/TicketScreen.xml b/pos_access_right/static/src/xml/TicketScreen.xml new file mode 100644 index 0000000000..86951593b8 --- /dev/null +++ b/pos_access_right/static/src/xml/TicketScreen.xml @@ -0,0 +1,21 @@ + + + + + + {'disabled-mode': !hasNewOrdersControlRights} + !hasNewOrdersControlRights + + + + diff --git a/pos_access_right/tests/__init__.py b/pos_access_right/tests/__init__.py new file mode 100644 index 0000000000..bd00f708d2 --- /dev/null +++ b/pos_access_right/tests/__init__.py @@ -0,0 +1,2 @@ +from . import test_pos_access_right +from . import test_load_ui diff --git a/pos_access_right/tests/test_load_ui.py b/pos_access_right/tests/test_load_ui.py new file mode 100644 index 0000000000..cfc82946e2 --- /dev/null +++ b/pos_access_right/tests/test_load_ui.py @@ -0,0 +1,16 @@ +from odoo.tests import HttpCase, tagged + + +@tagged("post_install", "-at_install") +class TestLoadUI(HttpCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + env = cls.env(user=cls.env.ref("base.user_admin")) + cls.main_pos_config = env["pos.config"].create( + {"name": "Test access right", "module_pos_hr": True} + ) + + def test_pos_js(self): + self.main_pos_config.open_ui() + self.browser_js("/pos/ui/tests?mod=web", "", "", login="admin", timeout=1800) diff --git a/pos_access_right/tests/test_pos_access_right.py b/pos_access_right/tests/test_pos_access_right.py new file mode 100644 index 0000000000..75878a88a9 --- /dev/null +++ b/pos_access_right/tests/test_pos_access_right.py @@ -0,0 +1,79 @@ +from odoo.tests import TransactionCase + +# from odoo.addons.pos_hr.tests.test_frontend import TestPosHrHttpCommon + + +class TestUserRestriction(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env( + context=dict( + cls.env.context, + tracking_disable=True, + no_reset_password=True, + ) + ) + cls.pos_user = cls.env["res.users"].create( + { + "login": "pos_user", + "name": "pos_user", + "groups_id": [(6, 0, [cls.env.ref("point_of_sale.group_pos_user").id])], + } + ) + cls.pos_emp = cls.env["hr.employee"].create( + {"name": "pos_emp", "user_id": cls.pos_user.id} + ) + cls.pos_config_main = cls.env.ref("point_of_sale.pos_config_main") + + def test_access_pos(self): + self.pos_config_main._compute_groups() + + self.group_negative_qty = self.env.ref("pos_access_right.group_negative_qty") + self.assertEqual( + self.group_negative_qty, self.pos_config_main.group_negative_qty_id + ) + + self.group_discount = self.env.ref("pos_access_right.group_discount") + self.assertEqual(self.group_discount, self.pos_config_main.group_discount_id) + + self.group_change_unit_price = self.env.ref( + "pos_access_right.group_change_unit_price" + ) + self.assertEqual( + self.group_change_unit_price, + self.pos_config_main.group_change_unit_price_id, + ) + + self.group_multi_order = self.env.ref("pos_access_right.group_multi_order") + self.assertEqual( + self.group_multi_order, self.pos_config_main.group_multi_order_id + ) + + self.group_delete_order = self.env.ref("pos_access_right.group_delete_order") + self.assertEqual( + self.group_delete_order, self.pos_config_main.group_delete_order_id + ) + + self.group_delete_order_line = self.env.ref( + "pos_access_right.group_delete_order_line" + ) + self.assertEqual( + self.group_delete_order_line, + self.pos_config_main.group_delete_order_line_id, + ) + + self.group_payment = self.env.ref("pos_access_right.group_payment") + self.assertEqual(self.group_payment, self.pos_config_main.group_payment_id) + + self.group_refund_action = self.env.ref("pos_access_right.group_refund_action") + self.assertEqual( + self.group_refund_action, self.pos_config_main.group_refund_action + ) + + self.group_cashinout_action = self.env.ref( + "pos_access_right.group_cashinout_action" + ) + self.assertEqual( + self.group_cashinout_action, self.pos_config_main.group_cashinout_action + ) diff --git a/setup/pos_access_right/odoo/addons/pos_access_right b/setup/pos_access_right/odoo/addons/pos_access_right new file mode 120000 index 0000000000..513a8eb652 --- /dev/null +++ b/setup/pos_access_right/odoo/addons/pos_access_right @@ -0,0 +1 @@ +../../../../pos_access_right \ No newline at end of file diff --git a/setup/pos_access_right/setup.py b/setup/pos_access_right/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/pos_access_right/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)