diff --git a/pos_meal_voucher/README.rst b/pos_meal_voucher/README.rst index c651e6b6aa..2ce37fa6ea 100644 --- a/pos_meal_voucher/README.rst +++ b/pos_meal_voucher/README.rst @@ -17,22 +17,20 @@ Point Of Sale - Meal Voucher :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/12.0/pos_meal_voucher + :target: https://github.com/OCA/pos/tree/16.0/pos_meal_voucher :alt: OCA/pos .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_meal_voucher + :target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_meal_voucher :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=12.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module extend the Point of Sale Odoo module, regarding Meal Vouchers. - -Meal voucher is a payment method, available in some countries (France, Belgium, Romania, ...) -that allows customer to buy food products in grocery stores or pay in restaurants. +This module allows to handle meal vouchers in the point of sale. +Meal vouchers are a payment method, available in some countries (France, Belgium, Romania,…) that allows customers to buy food products in grocery stores or pay in restaurants. **Table of contents** @@ -45,68 +43,73 @@ Configuration Products ~~~~~~~~ -* go to your products, and click on the 'Meal Voucher' checkbox, if your product - can be paid with meal vouchers. +On a product form, in the "Sales" tab, the "Can be Paid for by Meal Vouchers" checkbox controls whether the product can be paid for by meal vouchers. -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/product_product_form.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/product_product_form.png -* You can configure your product categories to have a default value for the products - that belong to this category. +Product categories can be configured to have a default value for the "Can be Paid for by Meal Vouchers" field for its products. +The "Apply to All Products" button allows to set the value on all products of the category. -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/product_category_form.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/product_category_form.png -* configures your Account journals, mentioning the type of Meal Voucher: +Point of Sale Payment Methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Paper : the journal will be used when scanning meal voucher barcodes -- Dematerialized: the journal will be used for dematerialized meal vouchers -- Mixed: Specific configuration if your accountant want to use a single journal for Credit card AND dematerialized meal vouchers. In that case, the button of this journal will be duplicated, and an extra text can be set to display an alternative label. +Point of sale payment methods (Point of Sale > Configuration > Payment Methods) have a "Meal Voucher Type" field that defines what type of meal voucher payment method they are: -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/account_journal_form.png +* (empty): The payment method is not a meal voucher payment method. +* **Paper**: The payment method will be used when scanning meal voucher barcodes. +* **Electronic**: The payment method will be used for electronic meal vouchers. -* go your point of sale configuration form, and set the maximum amount allowed by ticket. (optional) +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_method_form.png -.. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/pos_config_form.png +Settings +~~~~~~~~ -Usage -===== +This module adds a "Meal Vouchers" section in the point of sale settings (Point of Sale > Configuration > Settings, or Settings > Point of Sale) with several options: -* Open your Point of Sale +* **Maximum Amount**: Optional maximum amount per order that can be paid by meal vouchers. Set to 0 to disable. +* **Icon on Order Lines**: Whether to display an icon on point of sale order lines (on the product screen) for products that can be paid for by meal vouchers. +* **Information on Receipt**: Whether to display an asterisk (*) on receipts before each product that can be paid for by meal vouchers as well as the total eligible amount. -* Cashier can see the food products, eligible for meal voucher payment, and see the total for - Meal Voucher amount +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_settings.png - .. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_order_screen.png +Usage +===== + +Product Screen +~~~~~~~~~~~~~~ -* go to the payment screen +On the product screen, the products that can be paid for by meal vouchers are (optionally) identified with an icon and the total amount of those products is displayed. -A Meal Voucher Summary is available: +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_order_screen.png - .. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen.png +Payment Screen +~~~~~~~~~~~~~~ -If the amount received is too important, a warning icon is displayed +On the payment screen, a meal voucher summary is displayed: - .. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen_summary.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_screen_meal_vouchers.png -If the cashier try to validate the order, a warning is also display, asking confirmation +If the received amount is too high, a warning icon is displayed: - .. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen_warning.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_screen_warning.png -It is a non blocking warning, because we don't want to prevent an order to be done, -if products are not correctly set, or if a recent law changed the maximum amount that can -be used each day. (A recent case occured in France, during the Covid-19 pandemy) +Receipt +~~~~~~~ -Informations are printed on the ticket, if the point of sale is so configured. +The receipts can optionally contain information about the products that can be paid for by meal vouchers and the total amount of those products: - .. figure:: https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/ticket_information.png +.. figure:: https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/receipt_information.png -Note -~~~~ +Barcodes +~~~~~~~~ -A new barcode rule is available for Paper Meal Voucher of 24 chars: +A new barcode rule is defined for paper meal vouchers (with 24 characters): ``...........{NNNDD}........`` -If you scan the following barcode ``052566641320080017000000``, a new payment line will be added, with an amount of 8,00€ (``00800``) +If you scan the following barcode: ``052566641320080017000000``, a new payment line with an amount of ¤8.00 (``00800``) will be added. Known issues / Roadmap ====================== @@ -114,12 +117,10 @@ Known issues / Roadmap Possible Features ~~~~~~~~~~~~~~~~~ -* Introduce the Meal Voucher Issuer model -* When scaning Meal Voucher, deduce the Issuer -* Add a reporting to make easily the deposit of Meal Vouchers, per issuers. -* Add an option to add subtotal of products that can be paid with meal vouchers, - on the bill. -* Prevent to scan twice the same Meal Voucher barcode. +* Introduce the Meal Voucher Issuer model. +* Deduce the issuer when scanning a meal voucher barcode. +* Add a report to easily compute the total deposit of meal vouchers (per issuer). +* Prevent to scan the same meal voucher barcode twice. Bug Tracker =========== @@ -127,7 +128,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -151,6 +152,7 @@ The development of this module has been financially supported by: * Vracoop (https://portail.vracoop.fr/) * Demain Supermarché (http://www.demainsupermarche.org/) +* Le Drive tout nu (https://ledrivetoutnu.com/) Maintainers ~~~~~~~~~~~ @@ -173,6 +175,6 @@ Current `maintainer `__: |maintainer-legalsylvain| -This module is part of the `OCA/pos `_ project on GitHub. +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_meal_voucher/__manifest__.py b/pos_meal_voucher/__manifest__.py index 299ccd6dfc..7738fb9fd9 100644 --- a/pos_meal_voucher/__manifest__.py +++ b/pos_meal_voucher/__manifest__.py @@ -5,7 +5,7 @@ "name": "Point Of Sale - Meal Voucher", "summary": "Handle meal vouchers in Point of Sale" " with eligible amount and max amount", - "version": "12.0.1.0.8", + "version": "16.0.1.0.0", "category": "Point of Sale", "author": "GRAP, Odoo Community Association (OCA)", "maintainers": ["legalsylvain"], @@ -16,18 +16,20 @@ ], "data": [ "data/barcode_rule.xml", - "views/view_account_journal.xml", - "views/view_pos_config.xml", + "views/pos_payment_method_view.xml", + "views/res_config_settings_view.xml", "views/view_product_category.xml", "views/view_product_template.xml", - "views/templates.xml", - ], - "qweb": [ - "static/src/xml/pos_meal_voucher.xml", ], + "assets": { + "point_of_sale.assets": [ + "pos_meal_voucher/static/src/scss/*.scss", + "pos_meal_voucher/static/src/js/**/*.js", + "pos_meal_voucher/static/src/xml/**/*.xml", + ], + }, "demo": [ "demo/product_category.xml", "demo/product_product.xml", ], - "installable": True, } diff --git a/pos_meal_voucher/demo/product_product.xml b/pos_meal_voucher/demo/product_product.xml index 1e5855c4a1..246f21d5e9 100644 --- a/pos_meal_voucher/demo/product_product.xml +++ b/pos_meal_voucher/demo/product_product.xml @@ -11,7 +11,6 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - 5.30 diff --git a/pos_meal_voucher/i18n/fr.po b/pos_meal_voucher/i18n/fr.po index 5bae5b476f..cbd9f6e269 100644 --- a/pos_meal_voucher/i18n/fr.po +++ b/pos_meal_voucher/i18n/fr.po @@ -4,228 +4,188 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-23 15:25+0000\n" -"PO-Revision-Date: 2023-01-23 15:25+0000\n" -"Last-Translator: <>\n" +"POT-Creation-Date: 2025-02-21 17:11+0000\n" +"PO-Revision-Date: 2025-02-21 17:11+0000\n" +"Last-Translator: \n" "Language-Team: \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:35 -#, python-format -msgid "(Dematerialized)" -msgstr "(Dématérialisé)" - -#. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Meal Voucher Amount" -msgstr "Montant de titre restaurant" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Alias" -msgstr "Alias" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "Maximum Amount" +msgstr "Montant maximum" #. module: pos_meal_voucher #: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category -msgid "Apply to all Products" -msgstr "Appliquer à tous les produitss" +msgid "Apply to All Products" +msgstr "Appliquer à tous les articles" #. module: pos_meal_voucher #: model:ir.model,name:pos_meal_voucher.model_barcode_rule msgid "Barcode Rule" -msgstr "Règle de code barre" +msgstr "Règle de code-barres" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Cashier" -msgstr "Caissier" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_category__meal_voucher_ok +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_product__meal_voucher_ok +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_template__meal_voucher_ok +msgid "Can be Paid for by Meal Vouchers" +msgstr "Peut être payé avec des titres-restaurant" #. module: pos_meal_voucher #: model:ir.model.fields,help:pos_meal_voucher.field_product_product__meal_voucher_ok #: model:ir.model.fields,help:pos_meal_voucher.field_product_template__meal_voucher_ok -msgid "Check this box if the product can be paid with meal vouchers." +msgid "Check this box if the product can be paid for by meal vouchers." msgstr "" -"Cocher cette case si le produit peut être payé avec des titres restaurants." - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Client" -msgstr "Client" - -#. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 -msgid "Credit Card / Dematerialized" -msgstr "Carte bleue / Dématérialisé" - -#. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 -msgid "Dematerialized" -msgstr "Dématérialisé" +"Cocher cette case si l'article peut être payé avec des titres-restaurant." #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Discounted Product" -msgstr "Article en promotion" +#: model:ir.model,name:pos_meal_voucher.model_res_config_settings +msgid "Config Settings" +msgstr "Paramètres de configuration" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__meal_voucher_display_info_ticket -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Display Information on Ticket" -msgstr "Afficher des informations sur le ticket" +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__pos_payment_method__meal_voucher_type__electronic +msgid "Electronic" +msgstr "Électronique" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__meal_voucher_display_product_screen -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Display icon before products on screen" -msgstr "Afficher une icone devant les produits" - -#. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:100 -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:118 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml:0 #, python-format msgid "Eligible Total:" -msgstr "Total éligible :" +msgstr "Total éligible :" #. module: pos_meal_voucher -#: model:product.category,name:pos_meal_voucher.food_category -msgid "Food" -msgstr "Alimentaire" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__has_meal_voucher_payment_method +msgid "Has Meal Voucher Payment Method" +msgstr "A une méthode de paiement titre-restaurant" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__has_meal_voucher_journal -msgid "Has Meal Voucher Journal" -msgstr "A un journal de titre restaurant" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "Icon on Order Lines" +msgstr "Icône sur les lignes de commande" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form msgid "" -"If checked, a star (*) will be displayed on the ticket, before each product " -"that can be paid with meal vouchers, and the total of the eligible product " -"will be printed." +"If checked, an asterisk (*) will be displayed on receipts before each " +"product that can be paid for by meal vouchers as well as the total eligible " +"amount." msgstr "" -"Si la case est cochée, une étoile (*) sera affichée sur le ticket, devant " -"chaque article éligible au titre restaurant, et le total éligible sera " -"imprimé." +"Si la case est cochée, une astérisque (*) sera affichée sur les tickets " +"devant chaque article qui peut être payé avec des titres-restaurant, ainsi " +"que le montant total éligible." #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form msgid "" -"If checked, an icon will be displayed on the screen, before each product " -"that can be paid with meal vouchers." +"If checked, an icon will be displayed on point of sale order lines (on the " +"product screen) for products that can be paid for by meal vouchers." msgstr "" -"Si la case est cochée, une icône sera affichée sur l'écran du point de " -"vente, avant chaque article éligible au paiement par titre restaurant." +"Si la case est cochée, une icône sera affichée sur les lignes de commande " +"(sur l'écran des articles) pour les articles qui peuvent être payés avec des" +" titres-restaurant." #. module: pos_meal_voucher #: model:ir.model.fields,help:pos_meal_voucher.field_product_category__meal_voucher_ok msgid "" -"If checked, the products that belong to the category will be marked as 'can " -"be paid with meal vouchers', by default." +"If checked, the products of this category will be marked as \"Can be Paid " +"for by Meal Vouchers\" by default." msgstr "" -"Si la case est cochée, les produits qui appartiennent à cette catégorie " -"seront marqués comme 'Peuvent être payé en titre restaurant', par défaut." - -#. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_account_journal -msgid "Journal" -msgstr "Journal" +"Si la case est cochée, les articles de cette catégorie seront marqués comme " +"\"Peut être payé avec des titres-restaurant\" par défaut." #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Location" -msgstr "Lieu" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "Information on Receipt" +msgstr "Informations sur le ticket" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Lot" -msgstr "Lot" +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/js/models.esm.js:0 +#, python-format +msgid "Invalid meal voucher" +msgstr "Titre-restaurant invalide" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:59 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Max Amount" msgstr "Montant maximum" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "" -"Maximum amount of Meal Vouchers that can be received for a PoS Order.\n" -" Let 0, if you don't want to enable this " -"check." -msgstr "" -"Montant total de titres restaurant qui peuvent être encaissé pour une " -"vente.\n" -" Laisser vide si vous ne souhaitez pas " -"activer cette vérification." +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__enable_meal_voucher_order_lines_icon +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_enable_meal_voucher_order_lines_icon +msgid "Meal Voucher Icon on Order Lines" +msgstr "Icône de titre-restaurant sur lignes de commande" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:46 -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_category__meal_voucher_ok -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_product__meal_voucher_ok -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_template__meal_voucher_ok -#, python-format -msgid "Meal Voucher" -msgstr "Titre restaurant" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__enable_meal_voucher_receipt_info +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_enable_meal_voucher_receipt_info +msgid "Meal Voucher Information on Receipt" +msgstr "Informations de titres-restaurant sur le ticket" #. module: pos_meal_voucher #: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__max_meal_voucher_amount -msgid "Meal Voucher Amount" -msgstr "Montant de titre restaurant" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_max_meal_voucher_amount +msgid "Meal Voucher Maximum Amount" +msgstr "Montant maximum en titres-restaurant" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__barcode_rule__type__meal_voucher_payment msgid "Meal Voucher Payment" -msgstr "Paiement en titre restaurant" +msgstr "Paiement en titres-restaurant" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_type -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_journal__meal_voucher_type +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_payment_method__meal_voucher_type msgid "Meal Voucher Type" -msgstr "Type de titre restaurant" +msgstr "Type de titre-restaurant" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:19 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ProductScreen/OrderSummary.xml:0 #, python-format msgid "Meal Voucher:" -msgstr "Titre restaurant :" +msgstr "Titre-restaurant :" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, python-format msgid "Meal Vouchers" -msgstr "Titres Restaurant" +msgstr "Titres-restaurant" + +#. module: pos_meal_voucher +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "" +"Optional maximum amount per order that can be paid by meal vouchers.\n" +" Set to 0 to disable." +msgstr "" +"Montant maximum en titres-restaurant par vente.\n" +" Mettre à 0 pour désactiver." #. module: pos_meal_voucher -#: model:product.product,name:pos_meal_voucher.bread #: model:product.template,name:pos_meal_voucher.bread_product_template msgid "Organic Wholemeal Bread" msgstr "Pain complet biologique" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Package" -msgstr "Colis" - -#. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__pos_payment_method__meal_voucher_type__paper msgid "Paper" msgstr "Papier" #. module: pos_meal_voucher #: model:ir.model,name:pos_meal_voucher.model_pos_config msgid "Point of Sale Configuration" -msgstr "Paramétrage du point de vente" +msgstr "Configuration du point de vente" #. module: pos_meal_voucher #: model:ir.model,name:pos_meal_voucher.model_pos_order @@ -233,19 +193,19 @@ msgid "Point of Sale Orders" msgstr "Commandes du point de vente" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Priced Product" -msgstr "Article à prix fixe" +#: model:ir.model,name:pos_meal_voucher.model_pos_payment_method +msgid "Point of Sale Payment Methods" +msgstr "Modes de paiement du point de vente" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Priced Product (Computed Weight)" -msgstr "" +#: model:ir.model,name:pos_meal_voucher.model_pos_session +msgid "Point of Sale Session" +msgstr "Session du point de vente" #. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_product_product +#: model:ir.model,name:pos_meal_voucher.model_product_template msgid "Product" -msgstr "Article" +msgstr "Produit" #. module: pos_meal_voucher #: model:ir.model,name:pos_meal_voucher.model_product_category @@ -253,51 +213,38 @@ msgid "Product Category" msgstr "Catégorie d'article" #. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_product_template -msgid "Product Template" -msgstr "Modèle d'article" +#: model:ir.model,name:pos_meal_voucher.model_product_product +msgid "Product Variant" +msgstr "Variante de produit" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:96 -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:114 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml:0 #, python-format -msgid "Products marked with a star (*) are eligible for Meal vouchers." -msgstr "" -"Les articles marqués d'une étoile (*) sont éligibles aux titres restaurants." - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Tare" +msgid "Products marked with an asterisk (*) can be paid for by meal vouchers." msgstr "" +"Les articles marqués d'une astérisque (*) peuvent être payés avec des " +"titres-restaurant." #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_mixed_text -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_journal__meal_voucher_mixed_text -msgid "Text for Mixed journal" -msgstr "Texte pour le journal mixte" - -#. module: pos_meal_voucher -#: model:ir.model.fields,help:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_mixed_text -#: model:ir.model.fields,help:pos_meal_voucher.field_account_journal__meal_voucher_mixed_text +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category msgid "" -"Text that will be displayed in the point of sale if the journal is a mixed " -"journal (Credit Card / Dematerialized) for the dematerialized button." +"Set the above \"Can be Paid for by Meal Vouchers\" value on all of the " +"products of this category" msgstr "" -"Ce texte sera affiché dans le point de vente, pour le journal de type " -"'mixte' (Carte bleue / Dématérialisé) pour le bouton correspondant au " -"paiement dématérialisé" +"Applique la valeur de \"Peut être payé avec des titres-restaurant\" ci-" +"dessus à tous les articles de cette catégorie" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:51 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Total Eligible" msgstr "Total éligible" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:67 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Total Received" msgstr "Total encaissé" @@ -305,35 +252,16 @@ msgstr "Total encaissé" #. module: pos_meal_voucher #: model:ir.model.fields,field_description:pos_meal_voucher.field_barcode_rule__type msgid "Type" -msgstr "Type" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Unit Product" -msgstr "Unité de produit" - -#. module: pos_meal_voucher -#: model:product.product,uom_name:pos_meal_voucher.bread -#: model:product.template,uom_name:pos_meal_voucher.bread_product_template -msgid "Unit(s)" -msgstr "Unité(s)" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Weighted Product" -msgstr "Article pesé" +msgstr "" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/js/models.esm.js:0 +#, python-format msgid "" -"by clicking on this button, all the products of this category will have the " -"same settings than the current category, for the value 'Meal Voucher'" +"the paper meal voucher with code '%s' has already been scanned during the " +"cashing of this sale." msgstr "" -"En cliquant sur ce bouton, tous les produits de cette catégories auront le " -"même paramétrage que cette catégorie, pour la valeur 'Titre Restaurant'" +"Le titre-restaurant papier avec le code '%s', a déjà été scanné durant" +"l'encaissement de cette vente." -#. module: pos_meal_voucher -#: model:product.product,weight_uom_name:pos_meal_voucher.bread -#: model:product.template,weight_uom_name:pos_meal_voucher.bread_product_template -msgid "kg" -msgstr "kg" diff --git a/pos_meal_voucher/i18n/it.po b/pos_meal_voucher/i18n/it.po index 89b50056eb..546dac0c5f 100644 --- a/pos_meal_voucher/i18n/it.po +++ b/pos_meal_voucher/i18n/it.po @@ -17,25 +17,15 @@ msgstr "" "X-Generator: Weblate 4.17\n" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:35 -#, python-format -msgid "(Dematerialized)" -msgstr "(Dematerializzato)" - -#. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Meal Voucher Amount" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, fuzzy +msgid "Maximum Amount" msgstr "Importo buoni pasto" -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Alias" -msgstr "Alias" - #. module: pos_meal_voucher #: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category -msgid "Apply to all Products" +#, fuzzy +msgid "Apply to All Products" msgstr "Applicare a tutti i prodotti" #. module: pos_meal_voucher @@ -44,180 +34,156 @@ msgid "Barcode Rule" msgstr "Regola codice a barre" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Cashier" -msgstr "Cassiere" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_category__meal_voucher_ok +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_product__meal_voucher_ok +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_template__meal_voucher_ok +msgid "Can be Paid for by Meal Vouchers" +msgstr "" #. module: pos_meal_voucher #: model:ir.model.fields,help:pos_meal_voucher.field_product_product__meal_voucher_ok #: model:ir.model.fields,help:pos_meal_voucher.field_product_template__meal_voucher_ok -msgid "Check this box if the product can be paid with meal vouchers." +#, fuzzy +msgid "Check this box if the product can be paid for by meal vouchers." msgstr "" "Selezionare questo campo se il prodotto può essere pagato con buoni pasto." #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Client" -msgstr "Client" - -#. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 -msgid "Credit Card / Dematerialized" -msgstr "Carta di credito / dematerializzato" - -#. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 -msgid "Dematerialized" -msgstr "Dematerializzato" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Discounted Product" -msgstr "Prodotto scontato" - -#. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__meal_voucher_display_info_ticket -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Display Information on Ticket" -msgstr "Visualizza informazioni sul biglietto" +#: model:ir.model,name:pos_meal_voucher.model_res_config_settings +msgid "Config Settings" +msgstr "" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__meal_voucher_display_product_screen -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Display icon before products on screen" -msgstr "Mostrare l'icona prima dei prodotti a schermo" +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__pos_payment_method__meal_voucher_type__electronic +msgid "Electronic" +msgstr "" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:100 -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:118 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml:0 #, python-format msgid "Eligible Total:" msgstr "Totale ammissibile:" #. module: pos_meal_voucher -#: model:product.category,name:pos_meal_voucher.food_category -msgid "Food" -msgstr "Cibo" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__has_meal_voucher_payment_method +#, fuzzy +msgid "Has Meal Voucher Payment Method" +msgstr "Pagamento buoni pasto" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__has_meal_voucher_journal -msgid "Has Meal Voucher Journal" -msgstr "Ha registro buoni pasto" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "Icon on Order Lines" +msgstr "" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, fuzzy msgid "" -"If checked, a star (*) will be displayed on the ticket, before each product " -"that can be paid with meal vouchers, and the total of the eligible product " -"will be printed." +"If checked, an asterisk (*) will be displayed on receipts before each " +"product that can be paid for by meal vouchers as well as the total eligible " +"amount." msgstr "" "Se selezionata, un asterisco (*) verrà visualizzato sul biglietto, prima di " "ogni prodotto che può essere pagato con i buoni pasto, e verrà stampato il " "totale del prodotto consentito." #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, fuzzy msgid "" -"If checked, an icon will be displayed on the screen, before each product " -"that can be paid with meal vouchers." +"If checked, an icon will be displayed on point of sale order lines (on the " +"product screen) for products that can be paid for by meal vouchers." msgstr "" "Se selezionato, un'icona verrà mostrata a schermo, prima di ogni prodotto " "che può essere pagato con buoni pasto." #. module: pos_meal_voucher #: model:ir.model.fields,help:pos_meal_voucher.field_product_category__meal_voucher_ok +#, fuzzy msgid "" -"If checked, the products that belong to the category will be marked as 'can " -"be paid with meal vouchers', by default." +"If checked, the products of this category will be marked as \"Can be Paid " +"for by Meal Vouchers\" by default." msgstr "" "Se selezionato, i prodotti che appartengono alla categoria verranno " "impostati come 'può essere pagato con buoni pasto', di default." #. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_account_journal -msgid "Journal" -msgstr "Registro" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Location" -msgstr "Ubicazione" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Lot" -msgstr "Lotto" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, fuzzy +msgid "Information on Receipt" +msgstr "Visualizza informazioni sul biglietto" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:59 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Max Amount" msgstr "Importo massimo" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "" -"Maximum amount of Meal Vouchers that can be received for a PoS Order.\n" -" Let 0, if you don't want to enable this " -"check." +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__enable_meal_voucher_order_lines_icon +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_enable_meal_voucher_order_lines_icon +msgid "Meal Voucher Icon on Order Lines" msgstr "" -"Massimo importo di buoni pasto che può essere ricevuto per un ordine POS.\n" -" Lasciare 0, se non si vuole abilitare questo " -"controllo." #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:46 -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_category__meal_voucher_ok -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_product__meal_voucher_ok -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_template__meal_voucher_ok -#, python-format -msgid "Meal Voucher" -msgstr "Buoni pasto" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__enable_meal_voucher_receipt_info +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_enable_meal_voucher_receipt_info +#, fuzzy +msgid "Meal Voucher Information on Receipt" +msgstr "Importo buoni pasto" #. module: pos_meal_voucher #: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__max_meal_voucher_amount -msgid "Meal Voucher Amount" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_max_meal_voucher_amount +#, fuzzy +msgid "Meal Voucher Maximum Amount" msgstr "Importo buoni pasto" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__barcode_rule__type__meal_voucher_payment msgid "Meal Voucher Payment" msgstr "Pagamento buoni pasto" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_type -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_journal__meal_voucher_type +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_payment_method__meal_voucher_type msgid "Meal Voucher Type" msgstr "Tipo buoni pasto" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:19 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ProductScreen/OrderSummary.xml:0 #, python-format msgid "Meal Voucher:" msgstr "Buoni pasto:" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, python-format msgid "Meal Vouchers" msgstr "Buoni pasto" #. module: pos_meal_voucher -#: model:product.product,name:pos_meal_voucher.bread +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, fuzzy +msgid "" +"Optional maximum amount per order that can be paid by meal vouchers.\n" +" Set to 0 to disable." +msgstr "" +"Massimo importo di buoni pasto che può essere ricevuto per un ordine POS.\n" +" Lasciare 0, se non si vuole abilitare questo " +"controllo." + +#. module: pos_meal_voucher #: model:product.template,name:pos_meal_voucher.bread_product_template msgid "Organic Wholemeal Bread" msgstr "Pane integrale biologico" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Package" -msgstr "Collo" - -#. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__pos_payment_method__meal_voucher_type__paper msgid "Paper" msgstr "Carta" @@ -232,17 +198,19 @@ msgid "Point of Sale Orders" msgstr "Ordini punto vendita" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Priced Product" -msgstr "Prodotto prezzato" +#: model:ir.model,name:pos_meal_voucher.model_pos_payment_method +#, fuzzy +msgid "Point of Sale Payment Methods" +msgstr "Ordini punto vendita" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Priced Product (Computed Weight)" -msgstr "Prodotto prezzato (peso calcolato)" +#: model:ir.model,name:pos_meal_voucher.model_pos_session +#, fuzzy +msgid "Point of Sale Session" +msgstr "Ordini punto vendita" #. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_product_product +#: model:ir.model,name:pos_meal_voucher.model_product_template msgid "Product" msgstr "Prodotto" @@ -252,50 +220,36 @@ msgid "Product Category" msgstr "Categoria prodotto" #. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_product_template -msgid "Product Template" -msgstr "Modello prodotto" +#: model:ir.model,name:pos_meal_voucher.model_product_product +#, fuzzy +msgid "Product Variant" +msgstr "Categoria prodotto" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:96 -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:114 -#, python-format -msgid "Products marked with a star (*) are eligible for Meal vouchers." +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml:0 +#, fuzzy, python-format +msgid "Products marked with an asterisk (*) can be paid for by meal vouchers." msgstr "" "I prodotti segnalati da un asterisco (*) sono pagabili con i buoni pasto." #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Tare" -msgstr "Tara" - -#. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_mixed_text -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_journal__meal_voucher_mixed_text -msgid "Text for Mixed journal" -msgstr "Testo per il registro misto" - -#. module: pos_meal_voucher -#: model:ir.model.fields,help:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_mixed_text -#: model:ir.model.fields,help:pos_meal_voucher.field_account_journal__meal_voucher_mixed_text +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category msgid "" -"Text that will be displayed in the point of sale if the journal is a mixed " -"journal (Credit Card / Dematerialized) for the dematerialized button." +"Set the above \"Can be Paid for by Meal Vouchers\" value on all of the " +"products of this category" msgstr "" -"Testo che verrà mostrato nel punto vendita se il registro è misto (carta di " -"credito / dematerializzato) per il pulsante dematerializzato." #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:51 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Total Eligible" msgstr "Totale idoneo" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:67 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Total Received" msgstr "Totale ricevuto" @@ -305,33 +259,90 @@ msgstr "Totale ricevuto" msgid "Type" msgstr "Tipo" -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Unit Product" -msgstr "Prodotto unitario" +#~ msgid "(Dematerialized)" +#~ msgstr "(Dematerializzato)" -#. module: pos_meal_voucher -#: model:product.product,uom_name:pos_meal_voucher.bread -#: model:product.template,uom_name:pos_meal_voucher.bread_product_template -msgid "Unit(s)" -msgstr "Unità" +#~ msgid "Alias" +#~ msgstr "Alias" -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Weighted Product" -msgstr "Prodotto pesato" +#~ msgid "Cashier" +#~ msgstr "Cassiere" -#. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category -msgid "" -"by clicking on this button, all the products of this category will have the " -"same settings than the current category, for the value 'Meal Voucher'" -msgstr "" -"cliccando questo pulsante, tutti i prodotti di questa categoria avranno le " -"stesse impostazioni della categoria corrente, per il valore 'buoni pasto'" +#~ msgid "Client" +#~ msgstr "Client" -#. module: pos_meal_voucher -#: model:product.product,weight_uom_name:pos_meal_voucher.bread -#: model:product.template,weight_uom_name:pos_meal_voucher.bread_product_template -msgid "kg" -msgstr "kg" +#~ msgid "Credit Card / Dematerialized" +#~ msgstr "Carta di credito / dematerializzato" + +#~ msgid "Dematerialized" +#~ msgstr "Dematerializzato" + +#~ msgid "Discounted Product" +#~ msgstr "Prodotto scontato" + +#~ msgid "Display icon before products on screen" +#~ msgstr "Mostrare l'icona prima dei prodotti a schermo" + +#~ msgid "Food" +#~ msgstr "Cibo" + +#~ msgid "Has Meal Voucher Journal" +#~ msgstr "Ha registro buoni pasto" + +#~ msgid "Journal" +#~ msgstr "Registro" + +#~ msgid "Location" +#~ msgstr "Ubicazione" + +#~ msgid "Lot" +#~ msgstr "Lotto" + +#~ msgid "Meal Voucher" +#~ msgstr "Buoni pasto" + +#~ msgid "Package" +#~ msgstr "Collo" + +#~ msgid "Priced Product" +#~ msgstr "Prodotto prezzato" + +#~ msgid "Priced Product (Computed Weight)" +#~ msgstr "Prodotto prezzato (peso calcolato)" + +#~ msgid "Product Template" +#~ msgstr "Modello prodotto" + +#~ msgid "Tare" +#~ msgstr "Tara" + +#~ msgid "Text for Mixed journal" +#~ msgstr "Testo per il registro misto" + +#~ msgid "" +#~ "Text that will be displayed in the point of sale if the journal is a " +#~ "mixed journal (Credit Card / Dematerialized) for the dematerialized " +#~ "button." +#~ msgstr "" +#~ "Testo che verrà mostrato nel punto vendita se il registro è misto (carta " +#~ "di credito / dematerializzato) per il pulsante dematerializzato." + +#~ msgid "Unit Product" +#~ msgstr "Prodotto unitario" + +#~ msgid "Unit(s)" +#~ msgstr "Unità" + +#~ msgid "Weighted Product" +#~ msgstr "Prodotto pesato" + +#~ msgid "" +#~ "by clicking on this button, all the products of this category will have " +#~ "the same settings than the current category, for the value 'Meal Voucher'" +#~ msgstr "" +#~ "cliccando questo pulsante, tutti i prodotti di questa categoria avranno " +#~ "le stesse impostazioni della categoria corrente, per il valore 'buoni " +#~ "pasto'" + +#~ msgid "kg" +#~ msgstr "kg" diff --git a/pos_meal_voucher/i18n/pos_meal_voucher.pot b/pos_meal_voucher/i18n/pos_meal_voucher.pot index 12b3844917..0442810e9d 100644 --- a/pos_meal_voucher/i18n/pos_meal_voucher.pot +++ b/pos_meal_voucher/i18n/pos_meal_voucher.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * pos_meal_voucher +# * pos_meal_voucher # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,25 +14,13 @@ msgstr "" "Plural-Forms: \n" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:35 -#, python-format -msgid "(Dematerialized)" -msgstr "" - -#. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Meal Voucher Amount" -msgstr "" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Alias" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "Maximum Amount" msgstr "" #. module: pos_meal_voucher #: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category -msgid "Apply to all Products" +msgid "Apply to All Products" msgstr "" #. module: pos_meal_voucher @@ -41,160 +29,136 @@ msgid "Barcode Rule" msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Cashier" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_category__meal_voucher_ok +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_product__meal_voucher_ok +#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_template__meal_voucher_ok +msgid "Can be Paid for by Meal Vouchers" msgstr "" #. module: pos_meal_voucher #: model:ir.model.fields,help:pos_meal_voucher.field_product_product__meal_voucher_ok #: model:ir.model.fields,help:pos_meal_voucher.field_product_template__meal_voucher_ok -msgid "Check this box if the product can be paid with meal vouchers." +msgid "Check this box if the product can be paid for by meal vouchers." msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Client" +#: model:ir.model,name:pos_meal_voucher.model_res_config_settings +msgid "Config Settings" msgstr "" #. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 -msgid "Credit Card / Dematerialized" +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__pos_payment_method__meal_voucher_type__electronic +msgid "Electronic" msgstr "" #. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 -msgid "Dematerialized" -msgstr "" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Discounted Product" -msgstr "" - -#. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__meal_voucher_display_info_ticket -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Display Information on Ticket" -msgstr "" - -#. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__meal_voucher_display_product_screen -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Display icon before products on screen" -msgstr "" - -#. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:100 -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:118 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml:0 #, python-format msgid "Eligible Total:" msgstr "" #. module: pos_meal_voucher -#: model:product.category,name:pos_meal_voucher.food_category -msgid "Food" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__has_meal_voucher_payment_method +msgid "Has Meal Voucher Payment Method" msgstr "" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__has_meal_voucher_journal -msgid "Has Meal Voucher Journal" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "Icon on Order Lines" msgstr "" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "If checked, a star (*) will be displayed on the ticket, before each product that can be paid with meal vouchers, and the total of the eligible product will be printed." +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "" +"If checked, an asterisk (*) will be displayed on receipts before each " +"product that can be paid for by meal vouchers as well as the total eligible " +"amount." msgstr "" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "If checked, an icon will be displayed on the screen, before each product that can be paid with meal vouchers." +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "" +"If checked, an icon will be displayed on point of sale order lines (on the " +"product screen) for products that can be paid for by meal vouchers." msgstr "" #. module: pos_meal_voucher #: model:ir.model.fields,help:pos_meal_voucher.field_product_category__meal_voucher_ok -msgid "If checked, the products that belong to the category will be marked as 'can be paid with meal vouchers', by default." -msgstr "" - -#. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_account_journal -msgid "Journal" -msgstr "" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Location" +msgid "" +"If checked, the products of this category will be marked as \"Can be Paid " +"for by Meal Vouchers\" by default." msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Lot" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "Information on Receipt" msgstr "" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:59 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Max Amount" msgstr "" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form -msgid "Maximum amount of Meal Vouchers that can be received for a PoS Order.\n" -" Let 0, if you don't want to enable this check." +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__enable_meal_voucher_order_lines_icon +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_enable_meal_voucher_order_lines_icon +msgid "Meal Voucher Icon on Order Lines" msgstr "" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:46 -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_category__meal_voucher_ok -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_product__meal_voucher_ok -#: model:ir.model.fields,field_description:pos_meal_voucher.field_product_template__meal_voucher_ok -#, python-format -msgid "Meal Voucher" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__enable_meal_voucher_receipt_info +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_enable_meal_voucher_receipt_info +msgid "Meal Voucher Information on Receipt" msgstr "" #. module: pos_meal_voucher #: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_config__max_meal_voucher_amount -msgid "Meal Voucher Amount" +#: model:ir.model.fields,field_description:pos_meal_voucher.field_res_config_settings__pos_max_meal_voucher_amount +msgid "Meal Voucher Maximum Amount" msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__barcode_rule__type__meal_voucher_payment msgid "Meal Voucher Payment" msgstr "" #. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_type -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_journal__meal_voucher_type +#: model:ir.model.fields,field_description:pos_meal_voucher.field_pos_payment_method__meal_voucher_type msgid "Meal Voucher Type" msgstr "" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:19 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ProductScreen/OrderSummary.xml:0 #, python-format msgid "Meal Voucher:" msgstr "" #. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_pos_config_form +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +#, python-format msgid "Meal Vouchers" msgstr "" #. module: pos_meal_voucher -#: model:product.product,name:pos_meal_voucher.bread -#: model:product.template,name:pos_meal_voucher.bread_product_template -msgid "Organic Wholemeal Bread" +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.res_config_settings_view_form +msgid "" +"Optional maximum amount per order that can be paid by meal vouchers.\n" +" Set to 0 to disable." msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Package" +#: model:product.template,name:pos_meal_voucher.bread_product_template +msgid "Organic Wholemeal Bread" msgstr "" #. module: pos_meal_voucher -#: selection:account.journal,meal_voucher_type:0 +#: model:ir.model.fields.selection,name:pos_meal_voucher.selection__pos_payment_method__meal_voucher_type__paper msgid "Paper" msgstr "" @@ -209,17 +173,17 @@ msgid "Point of Sale Orders" msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Priced Product" +#: model:ir.model,name:pos_meal_voucher.model_pos_payment_method +msgid "Point of Sale Payment Methods" msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Priced Product (Computed Weight)" +#: model:ir.model,name:pos_meal_voucher.model_pos_session +msgid "Point of Sale Session" msgstr "" #. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_product_product +#: model:ir.model,name:pos_meal_voucher.model_product_template msgid "Product" msgstr "" @@ -229,45 +193,34 @@ msgid "Product Category" msgstr "" #. module: pos_meal_voucher -#: model:ir.model,name:pos_meal_voucher.model_product_template -msgid "Product Template" +#: model:ir.model,name:pos_meal_voucher.model_product_product +msgid "Product Variant" msgstr "" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:96 -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:114 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml:0 #, python-format -msgid "Products marked with a star (*) are eligible for Meal vouchers." +msgid "Products marked with an asterisk (*) can be paid for by meal vouchers." msgstr "" #. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Tare" -msgstr "" - -#. module: pos_meal_voucher -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_mixed_text -#: model:ir.model.fields,field_description:pos_meal_voucher.field_account_journal__meal_voucher_mixed_text -msgid "Text for Mixed journal" -msgstr "" - -#. module: pos_meal_voucher -#: model:ir.model.fields,help:pos_meal_voucher.field_account_bank_statement_import_journal_creation__meal_voucher_mixed_text -#: model:ir.model.fields,help:pos_meal_voucher.field_account_journal__meal_voucher_mixed_text -msgid "Text that will be displayed in the point of sale if the journal is a mixed journal (Credit Card / Dematerialized) for the dematerialized button." +#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category +msgid "" +"Set the above \"Can be Paid for by Meal Vouchers\" value on all of the " +"products of this category" msgstr "" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:51 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Total Eligible" msgstr "" #. module: pos_meal_voucher -#. openerp-web -#: code:addons/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml:67 +#. odoo-javascript +#: code:addons/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml:0 #, python-format msgid "Total Received" msgstr "" @@ -276,31 +229,3 @@ msgstr "" #: model:ir.model.fields,field_description:pos_meal_voucher.field_barcode_rule__type msgid "Type" msgstr "" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Unit Product" -msgstr "" - -#. module: pos_meal_voucher -#: model:product.product,uom_name:pos_meal_voucher.bread -#: model:product.template,uom_name:pos_meal_voucher.bread_product_template -msgid "Unit(s)" -msgstr "" - -#. module: pos_meal_voucher -#: selection:barcode.rule,type:0 -msgid "Weighted Product" -msgstr "" - -#. module: pos_meal_voucher -#: model_terms:ir.ui.view,arch_db:pos_meal_voucher.view_product_category -msgid "by clicking on this button, all the products of this category will have the same settings than the current category, for the value 'Meal Voucher'" -msgstr "" - -#. module: pos_meal_voucher -#: model:product.product,weight_uom_name:pos_meal_voucher.bread -#: model:product.template,weight_uom_name:pos_meal_voucher.bread_product_template -msgid "kg" -msgstr "" - diff --git a/pos_meal_voucher/models/__init__.py b/pos_meal_voucher/models/__init__.py index b7f32b08fd..ef43dffb81 100644 --- a/pos_meal_voucher/models/__init__.py +++ b/pos_meal_voucher/models/__init__.py @@ -1,7 +1,9 @@ -from . import account_journal from . import barcode_rule from . import pos_config from . import pos_order +from . import pos_payment_method +from . import pos_session from . import product_category -from . import product_template from . import product_product +from . import product_template +from . import res_config_settings diff --git a/pos_meal_voucher/models/account_journal.py b/pos_meal_voucher/models/account_journal.py deleted file mode 100644 index 031760a8a9..0000000000 --- a/pos_meal_voucher/models/account_journal.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2020 - Today: GRAP (http://www.grap.coop) -# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from odoo import fields, models - - -class AccountJournal(models.Model): - _inherit = "account.journal" - - meal_voucher_type = fields.Selection( - string="Meal Voucher Type", - selection=[ - ("paper", "Paper"), - ("dematerialized", "Dematerialized"), - ("mixed", "Credit Card / Dematerialized"), - ], - ) - - meal_voucher_mixed_text = fields.Char( - string="Text for Mixed journal", - help="Text that will be displayed in the point of sale" - " if the journal is a mixed journal (Credit Card / " - " Dematerialized) for the dematerialized button.", - ) diff --git a/pos_meal_voucher/models/barcode_rule.py b/pos_meal_voucher/models/barcode_rule.py index f7fde3eaa3..9fb259de6f 100644 --- a/pos_meal_voucher/models/barcode_rule.py +++ b/pos_meal_voucher/models/barcode_rule.py @@ -9,5 +9,6 @@ class BarcodeRule(models.Model): _inherit = "barcode.rule" type = fields.Selection( - selection_add=[("meal_voucher_payment", "Meal Voucher Payment")] + selection_add=[("meal_voucher_payment", "Meal Voucher Payment")], + ondelete={"meal_voucher_payment": "set default"}, ) diff --git a/pos_meal_voucher/models/pos_config.py b/pos_meal_voucher/models/pos_config.py index ea2368492b..b2b0ed1f66 100644 --- a/pos_meal_voucher/models/pos_config.py +++ b/pos_meal_voucher/models/pos_config.py @@ -9,24 +9,23 @@ class PosConfig(models.Model): _inherit = "pos.config" max_meal_voucher_amount = fields.Monetary( - string="Meal Voucher Amount", + string="Meal Voucher Maximum Amount", currency_field="currency_id", ) - - meal_voucher_display_product_screen = fields.Boolean( - string="Display icon before products on screen", default=True + enable_meal_voucher_order_lines_icon = fields.Boolean( + string="Meal Voucher Icon on Order Lines", default=True ) - - meal_voucher_display_info_ticket = fields.Boolean( - string="Display Information on Ticket", + enable_meal_voucher_receipt_info = fields.Boolean( + string="Meal Voucher Information on Receipt", ) - - has_meal_voucher_journal = fields.Boolean( - compute="_compute_has_meal_voucher_journal" + has_meal_voucher_payment_method = fields.Boolean( + compute="_compute_has_meal_voucher_payment_method" ) - def _compute_has_meal_voucher_journal(self): + def _compute_has_meal_voucher_payment_method(self): for config in self: - config.has_meal_voucher_journal = len( - config.journal_ids.filtered(lambda x: x.meal_voucher_type is not False) + config.has_meal_voucher_payment_method = bool( + config.payment_method_ids.filtered( + lambda x: x.meal_voucher_type is not False + ) ) diff --git a/pos_meal_voucher/models/pos_order.py b/pos_meal_voucher/models/pos_order.py index 1155081121..e904098ef1 100644 --- a/pos_meal_voucher/models/pos_order.py +++ b/pos_meal_voucher/models/pos_order.py @@ -8,12 +8,10 @@ class PosOrder(models.Model): _inherit = "pos.order" - def _payment_fields(self, ui_paymentline): - res = super()._payment_fields(ui_paymentline) - res["statement_note"] = ui_paymentline.get("statement_note", False) - return res - - def _prepare_bank_statement_line_payment_values(self, data): - res = super()._prepare_bank_statement_line_payment_values(data) - res["note"] = data.get("statement_note", False) + def _payment_fields(self, order, ui_paymentline): + res = super()._payment_fields(order, ui_paymentline) + # the pos.payment.name field is named "Label" and is not used for + # normal payments, so it is used here to store the payment note (the + # barcode of paper meal vouchers). + res["name"] = ui_paymentline.get("payment_note", False) return res diff --git a/pos_meal_voucher/models/pos_payment_method.py b/pos_meal_voucher/models/pos_payment_method.py new file mode 100644 index 0000000000..c1a81c9550 --- /dev/null +++ b/pos_meal_voucher/models/pos_payment_method.py @@ -0,0 +1,16 @@ +# Copyright (C) 2020 - Today: GRAP (http://www.grap.coop) +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class PosPaymentMethod(models.Model): + _inherit = "pos.payment.method" + + meal_voucher_type = fields.Selection( + selection=[ + ("paper", "Paper"), + ("electronic", "Electronic"), + ], + ) diff --git a/pos_meal_voucher/models/pos_session.py b/pos_meal_voucher/models/pos_session.py new file mode 100644 index 0000000000..96b0292705 --- /dev/null +++ b/pos_meal_voucher/models/pos_session.py @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import models + + +class PosSession(models.Model): + _inherit = "pos.session" + + def _loader_params_pos_payment_method(self): + res = super()._loader_params_pos_payment_method() + res["search_params"]["fields"].append("meal_voucher_type") + return res + + def _loader_params_product_product(self): + res = super()._loader_params_product_product() + res["search_params"]["fields"].append("meal_voucher_ok") + return res diff --git a/pos_meal_voucher/models/product_category.py b/pos_meal_voucher/models/product_category.py index 239c616f06..6761f84e31 100644 --- a/pos_meal_voucher/models/product_category.py +++ b/pos_meal_voucher/models/product_category.py @@ -9,9 +9,9 @@ class ProductCategory(models.Model): _inherit = "product.category" meal_voucher_ok = fields.Boolean( - string="Meal Voucher", - help="If checked, the products that belong to the category" - " will be marked as 'can be paid with meal vouchers', by default.", + string="Can be Paid for by Meal Vouchers", + help="If checked, the products of this category will be marked as " + '"Can be Paid for by Meal Vouchers" by default.', ) def button_apply_meal_voucher_settings(self): diff --git a/pos_meal_voucher/models/product_template.py b/pos_meal_voucher/models/product_template.py index 60ed510c32..c457f376c7 100644 --- a/pos_meal_voucher/models/product_template.py +++ b/pos_meal_voucher/models/product_template.py @@ -9,8 +9,8 @@ class ProductTemplate(models.Model): _inherit = "product.template" meal_voucher_ok = fields.Boolean( - string="Meal Voucher", - help="Check this box if the product can be paid with meal vouchers.", + string="Can be Paid for by Meal Vouchers", + help="Check this box if the product can be paid for by meal vouchers.", ) @api.onchange("categ_id") @@ -18,10 +18,12 @@ def onchange_categ_id_pos_meal_voucher(self): for template in self: template.meal_voucher_ok = template.categ_id.meal_voucher_ok - @api.model - def create(self, vals): - if "meal_voucher_ok" not in vals and "categ_id" in vals: - # Guess meal_voucher_ok if not present, based on the category - categ = self.env["product.category"].browse(vals.get("categ_id")) - vals["meal_voucher_ok"] = categ.meal_voucher_ok - return super().create(vals) + @api.model_create_multi + def create(self, vals_list): + product_category_model = self.env["product.category"] + for vals in vals_list: + if "meal_voucher_ok" not in vals and "categ_id" in vals: + # Guess meal_voucher_ok if not present, based on the category + categ = product_category_model.browse(vals.get("categ_id")) + vals["meal_voucher_ok"] = categ.meal_voucher_ok + return super().create(vals_list) diff --git a/pos_meal_voucher/models/res_config_settings.py b/pos_meal_voucher/models/res_config_settings.py new file mode 100644 index 0000000000..87eafd0149 --- /dev/null +++ b/pos_meal_voucher/models/res_config_settings.py @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2025 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + pos_max_meal_voucher_amount = fields.Monetary( + related="pos_config_id.max_meal_voucher_amount", + readonly=False, + ) + pos_enable_meal_voucher_order_lines_icon = fields.Boolean( + related="pos_config_id.enable_meal_voucher_order_lines_icon", + readonly=False, + ) + pos_enable_meal_voucher_receipt_info = fields.Boolean( + related="pos_config_id.enable_meal_voucher_receipt_info", + readonly=False, + ) diff --git a/pos_meal_voucher/readme/CONFIGURE.rst b/pos_meal_voucher/readme/CONFIGURE.rst index cb93a642b6..42abba35a4 100644 --- a/pos_meal_voucher/readme/CONFIGURE.rst +++ b/pos_meal_voucher/readme/CONFIGURE.rst @@ -1,24 +1,33 @@ Products ~~~~~~~~ -* go to your products, and click on the 'Meal Voucher' checkbox, if your product - can be paid with meal vouchers. +On a product form, in the "Sales" tab, the "Can be Paid for by Meal Vouchers" checkbox controls whether the product can be paid for by meal vouchers. .. figure:: ../static/description/product_product_form.png -* You can configure your product categories to have a default value for the products - that belong to this category. +Product categories can be configured to have a default value for the "Can be Paid for by Meal Vouchers" field for its products. +The "Apply to All Products" button allows to set the value on all products of the category. .. figure:: ../static/description/product_category_form.png -* configures your Account journals, mentioning the type of Meal Voucher: +Point of Sale Payment Methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Paper : the journal will be used when scanning meal voucher barcodes -- Dematerialized: the journal will be used for dematerialized meal vouchers -- Mixed: Specific configuration if your accountant want to use a single journal for Credit card AND dematerialized meal vouchers. In that case, the button of this journal will be duplicated, and an extra text can be set to display an alternative label. +Point of sale payment methods (Point of Sale > Configuration > Payment Methods) have a "Meal Voucher Type" field that defines what type of meal voucher payment method they are: -.. figure:: ../static/description/account_journal_form.png +* (empty): The payment method is not a meal voucher payment method. +* **Paper**: The payment method will be used when scanning meal voucher barcodes. +* **Electronic**: The payment method will be used for electronic meal vouchers. -* go your point of sale configuration form, and set the maximum amount allowed by ticket. (optional) +.. figure:: ../static/description/pos_payment_method_form.png -.. figure:: ../static/description/pos_config_form.png +Settings +~~~~~~~~ + +This module adds a "Meal Vouchers" section in the point of sale settings (Point of Sale > Configuration > Settings, or Settings > Point of Sale) with several options: + +* **Maximum Amount**: Optional maximum amount per order that can be paid by meal vouchers. Set to 0 to disable. +* **Icon on Order Lines**: Whether to display an icon on point of sale order lines (on the product screen) for products that can be paid for by meal vouchers. +* **Information on Receipt**: Whether to display an asterisk (*) on receipts before each product that can be paid for by meal vouchers as well as the total eligible amount. + +.. figure:: ../static/description/pos_settings.png diff --git a/pos_meal_voucher/readme/CREDITS.rst b/pos_meal_voucher/readme/CREDITS.rst index 49ddf85e00..969f293038 100644 --- a/pos_meal_voucher/readme/CREDITS.rst +++ b/pos_meal_voucher/readme/CREDITS.rst @@ -2,3 +2,4 @@ The development of this module has been financially supported by: * Vracoop (https://portail.vracoop.fr/) * Demain Supermarché (http://www.demainsupermarche.org/) +* Le Drive tout nu (https://ledrivetoutnu.com/) diff --git a/pos_meal_voucher/readme/DESCRIPTION.rst b/pos_meal_voucher/readme/DESCRIPTION.rst index 11b8d4bb9b..e3044761a6 100644 --- a/pos_meal_voucher/readme/DESCRIPTION.rst +++ b/pos_meal_voucher/readme/DESCRIPTION.rst @@ -1,5 +1,3 @@ -This module extend the Point of Sale Odoo module, regarding Meal Vouchers. - -Meal voucher is a payment method, available in some countries (France, Belgium, Romania, ...) -that allows customer to buy food products in grocery stores or pay in restaurants. +This module allows to handle meal vouchers in the point of sale. +Meal vouchers are a payment method, available in some countries (France, Belgium, Romania,…) that allows customers to buy food products in grocery stores or pay in restaurants. diff --git a/pos_meal_voucher/readme/ROADMAP.rst b/pos_meal_voucher/readme/ROADMAP.rst index 3584525d2e..4dbfdf5a6d 100644 --- a/pos_meal_voucher/readme/ROADMAP.rst +++ b/pos_meal_voucher/readme/ROADMAP.rst @@ -1,9 +1,7 @@ Possible Features ~~~~~~~~~~~~~~~~~ -* Introduce the Meal Voucher Issuer model -* When scaning Meal Voucher, deduce the Issuer -* Add a reporting to make easily the deposit of Meal Vouchers, per issuers. -* Add an option to add subtotal of products that can be paid with meal vouchers, - on the bill. -* Prevent to scan twice the same Meal Voucher barcode. \ No newline at end of file +* Introduce the Meal Voucher Issuer model. +* Deduce the issuer when scanning a meal voucher barcode. +* Add a report to easily compute the total deposit of meal vouchers (per issuer). +* Prevent to scan the same meal voucher barcode twice. diff --git a/pos_meal_voucher/readme/USAGE.rst b/pos_meal_voucher/readme/USAGE.rst index e887e13756..b46bea9047 100644 --- a/pos_meal_voucher/readme/USAGE.rst +++ b/pos_meal_voucher/readme/USAGE.rst @@ -1,37 +1,33 @@ -* Open your Point of Sale +Product Screen +~~~~~~~~~~~~~~ -* Cashier can see the food products, eligible for meal voucher payment, and see the total for - Meal Voucher amount +On the product screen, the products that can be paid for by meal vouchers are (optionally) identified with an icon and the total amount of those products is displayed. - .. figure:: ../static/description/front_ui_pos_order_screen.png +.. figure:: ../static/description/pos_order_screen.png -* go to the payment screen +Payment Screen +~~~~~~~~~~~~~~ -A Meal Voucher Summary is available: +On the payment screen, a meal voucher summary is displayed: - .. figure:: ../static/description/front_ui_pos_payment_screen.png +.. figure:: ../static/description/pos_payment_screen_meal_vouchers.png -If the amount received is too important, a warning icon is displayed +If the received amount is too high, a warning icon is displayed: - .. figure:: ../static/description/front_ui_pos_payment_screen_summary.png +.. figure:: ../static/description/pos_payment_screen_warning.png -If the cashier try to validate the order, a warning is also display, asking confirmation +Receipt +~~~~~~~ - .. figure:: ../static/description/front_ui_pos_payment_screen_warning.png +The receipts can optionally contain information about the products that can be paid for by meal vouchers and the total amount of those products: -It is a non blocking warning, because we don't want to prevent an order to be done, -if products are not correctly set, or if a recent law changed the maximum amount that can -be used each day. (A recent case occured in France, during the Covid-19 pandemy) +.. figure:: ../static/description/receipt_information.png -Informations are printed on the ticket, if the point of sale is so configured. +Barcodes +~~~~~~~~ - .. figure:: ../static/description/ticket_information.png - -Note -~~~~ - -A new barcode rule is available for Paper Meal Voucher of 24 chars: +A new barcode rule is defined for paper meal vouchers (with 24 characters): ``...........{NNNDD}........`` -If you scan the following barcode ``052566641320080017000000``, a new payment line will be added, with an amount of 8,00€ (``00800``) +If you scan the following barcode: ``052566641320080017000000``, a new payment line with an amount of ¤8.00 (``00800``) will be added. diff --git a/pos_meal_voucher/static/description/account_journal_form.png b/pos_meal_voucher/static/description/account_journal_form.png deleted file mode 100644 index ab385b4ca2..0000000000 Binary files a/pos_meal_voucher/static/description/account_journal_form.png and /dev/null differ diff --git a/pos_meal_voucher/static/description/front_ui_pos_order_screen.png b/pos_meal_voucher/static/description/front_ui_pos_order_screen.png deleted file mode 100644 index fd6ef495af..0000000000 Binary files a/pos_meal_voucher/static/description/front_ui_pos_order_screen.png and /dev/null differ diff --git a/pos_meal_voucher/static/description/front_ui_pos_payment_screen.png b/pos_meal_voucher/static/description/front_ui_pos_payment_screen.png deleted file mode 100644 index 32d7649c52..0000000000 Binary files a/pos_meal_voucher/static/description/front_ui_pos_payment_screen.png and /dev/null differ diff --git a/pos_meal_voucher/static/description/front_ui_pos_payment_screen_summary.png b/pos_meal_voucher/static/description/front_ui_pos_payment_screen_summary.png deleted file mode 100644 index e85fdf99d0..0000000000 Binary files a/pos_meal_voucher/static/description/front_ui_pos_payment_screen_summary.png and /dev/null differ diff --git a/pos_meal_voucher/static/description/front_ui_pos_payment_screen_warning.png b/pos_meal_voucher/static/description/front_ui_pos_payment_screen_warning.png deleted file mode 100644 index e26de114cc..0000000000 Binary files a/pos_meal_voucher/static/description/front_ui_pos_payment_screen_warning.png and /dev/null differ diff --git a/pos_meal_voucher/static/description/index.html b/pos_meal_voucher/static/description/index.html index fff6671ebd..ff314b1f74 100644 --- a/pos_meal_voucher/static/description/index.html +++ b/pos_meal_voucher/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,31 +369,35 @@

Point Of Sale - Meal Voucher

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:3881e082a79362cd653b81271727fd0bd6c817adf05ba5c87fa872bb7602dca5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

-

This module extend the Point of Sale Odoo module, regarding Meal Vouchers.

-

Meal voucher is a payment method, available in some countries (France, Belgium, Romania, …) -that allows customer to buy food products in grocery stores or pay in restaurants.

+

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

+

This module allows to handle meal vouchers in the point of sale.

+

Meal vouchers are a payment method, available in some countries (France, Belgium, Romania,…) that allows customers to buy food products in grocery stores or pay in restaurants.

Table of contents

  • Configuration
  • -
  • Usage
      -
    • Note
    • +
    • Usage
    • -
    • Known issues / Roadmap
        -
      • Possible Features
      • +
      • Known issues / Roadmap
      • -
      • Bug Tracker
      • -
      • Credits @@ -402,141 +406,130 @@

        Point Of Sale - Meal Voucher

        Configuration

        Products

        -
          -
        • go to your products, and click on the ‘Meal Voucher’ checkbox, if your product -can be paid with meal vouchers.
        • -
        +

        On a product form, in the “Sales” tab, the “Can be Paid for by Meal Vouchers” checkbox controls whether the product can be paid for by meal vouchers.

        -https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/product_product_form.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/product_product_form.png
        -
          -
        • You can configure your product categories to have a default value for the products -that belong to this category.
        • -
        +

        Product categories can be configured to have a default value for the “Can be Paid for by Meal Vouchers” field for its products. +The “Apply to All Products” button allows to set the value on all products of the category.

        -https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/product_category_form.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/product_category_form.png
        +
        +
        +

        Point of Sale Payment Methods

        +

        Point of sale payment methods (Point of Sale > Configuration > Payment Methods) have a “Meal Voucher Type” field that defines what type of meal voucher payment method they are:

          -
        • configures your Account journals, mentioning the type of Meal Voucher:
        • -
        -
          -
        • Paper : the journal will be used when scanning meal voucher barcodes
        • -
        • Dematerialized: the journal will be used for dematerialized meal vouchers
        • -
        • Mixed: Specific configuration if your accountant want to use a single journal for Credit card AND dematerialized meal vouchers. In that case, the button of this journal will be duplicated, and an extra text can be set to display an alternative label.
        • +
        • (empty): The payment method is not a meal voucher payment method.
        • +
        • Paper: The payment method will be used when scanning meal voucher barcodes.
        • +
        • Electronic: The payment method will be used for electronic meal vouchers.
        -https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/account_journal_form.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_method_form.png +
        +
        +

        Settings

        +

        This module adds a “Meal Vouchers” section in the point of sale settings (Point of Sale > Configuration > Settings, or Settings > Point of Sale) with several options:

          -
        • go your point of sale configuration form, and set the maximum amount allowed by ticket. (optional)
        • +
        • Maximum Amount: Optional maximum amount per order that can be paid by meal vouchers. Set to 0 to disable.
        • +
        • Icon on Order Lines: Whether to display an icon on point of sale order lines (on the product screen) for products that can be paid for by meal vouchers.
        • +
        • Information on Receipt: Whether to display an asterisk (*) on receipts before each product that can be paid for by meal vouchers as well as the total eligible amount.
        -https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/pos_config_form.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_settings.png
-

Usage

-
    -
  • Open your Point of Sale

    -
  • -
  • Cashier can see the food products, eligible for meal voucher payment, and see the total for -Meal Voucher amount

    +

    Usage

    +
    +

    Product Screen

    +

    On the product screen, the products that can be paid for by meal vouchers are (optionally) identified with an icon and the total amount of those products is displayed.

    -https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_order_screen.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_order_screen.png
    -
  • -
  • go to the payment screen

    -
  • -
-

A Meal Voucher Summary is available:

-
-
-https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen.png
-
-

If the amount received is too important, a warning icon is displayed

-
+
+

Payment Screen

+

On the payment screen, a meal voucher summary is displayed:

-https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen_summary.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_screen_meal_vouchers.png
-
-

If the cashier try to validate the order, a warning is also display, asking confirmation

-
+

If the received amount is too high, a warning icon is displayed:

-https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/front_ui_pos_payment_screen_warning.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/pos_payment_screen_warning.png +
- -

It is a non blocking warning, because we don’t want to prevent an order to be done, -if products are not correctly set, or if a recent law changed the maximum amount that can -be used each day. (A recent case occured in France, during the Covid-19 pandemy)

-

Informations are printed on the ticket, if the point of sale is so configured.

-
+
+

Receipt

+

The receipts can optionally contain information about the products that can be paid for by meal vouchers and the total amount of those products:

-https://raw.githubusercontent.com/OCA/pos/12.0/pos_meal_voucher/static/description/ticket_information.png +https://raw.githubusercontent.com/OCA/pos/16.0/pos_meal_voucher/static/description/receipt_information.png +
-
-
-

Note

-

A new barcode rule is available for Paper Meal Voucher of 24 chars:

+
+

Barcodes

+

A new barcode rule is defined for paper meal vouchers (with 24 characters):

...........{NNNDD}........

-

If you scan the following barcode 052566641320080017000000, a new payment line will be added, with an amount of 8,00€ (00800)

+

If you scan the following barcode: 052566641320080017000000, a new payment line with an amount of ¤8.00 (00800) will be added.

-

Known issues / Roadmap

+

Known issues / Roadmap

-

Possible Features

+

Possible Features

    -
  • Introduce the Meal Voucher Issuer model
  • -
  • When scaning Meal Voucher, deduce the Issuer
  • -
  • Add a reporting to make easily the deposit of Meal Vouchers, per issuers.
  • -
  • Add an option to add subtotal of products that can be paid with meal vouchers, -on the bill.
  • -
  • Prevent to scan twice the same Meal Voucher barcode.
  • +
  • Introduce the Meal Voucher Issuer model.
  • +
  • Deduce the issuer when scanning a meal voucher barcode.
  • +
  • Add a report to easily compute the total deposit of meal vouchers (per issuer).
  • +
  • Prevent to scan the same meal voucher barcode twice.
-

Bug Tracker

+

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 to smash it by providing a detailed and welcomed -feedback.

+feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

  • GRAP
-

Other credits

+

Other credits

The development of this module has been financially supported by:

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.

Current maintainer:

legalsylvain

-

This module is part of the OCA/pos project on GitHub.

+

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_meal_voucher/static/description/pos_config_form.png b/pos_meal_voucher/static/description/pos_config_form.png deleted file mode 100644 index 14d1cb8927..0000000000 Binary files a/pos_meal_voucher/static/description/pos_config_form.png and /dev/null differ diff --git a/pos_meal_voucher/static/description/pos_order_screen.png b/pos_meal_voucher/static/description/pos_order_screen.png new file mode 100644 index 0000000000..99b6e4dad8 Binary files /dev/null and b/pos_meal_voucher/static/description/pos_order_screen.png differ diff --git a/pos_meal_voucher/static/description/pos_payment_method_form.png b/pos_meal_voucher/static/description/pos_payment_method_form.png new file mode 100644 index 0000000000..c240e09765 Binary files /dev/null and b/pos_meal_voucher/static/description/pos_payment_method_form.png differ diff --git a/pos_meal_voucher/static/description/pos_payment_screen_meal_vouchers.png b/pos_meal_voucher/static/description/pos_payment_screen_meal_vouchers.png new file mode 100644 index 0000000000..cb35131fdb Binary files /dev/null and b/pos_meal_voucher/static/description/pos_payment_screen_meal_vouchers.png differ diff --git a/pos_meal_voucher/static/description/pos_payment_screen_warning.png b/pos_meal_voucher/static/description/pos_payment_screen_warning.png new file mode 100644 index 0000000000..e787a5f4cf Binary files /dev/null and b/pos_meal_voucher/static/description/pos_payment_screen_warning.png differ diff --git a/pos_meal_voucher/static/description/pos_settings.png b/pos_meal_voucher/static/description/pos_settings.png new file mode 100644 index 0000000000..13e1dee945 Binary files /dev/null and b/pos_meal_voucher/static/description/pos_settings.png differ diff --git a/pos_meal_voucher/static/description/product_category_form.png b/pos_meal_voucher/static/description/product_category_form.png index cb7277e258..ede32f8d38 100644 Binary files a/pos_meal_voucher/static/description/product_category_form.png and b/pos_meal_voucher/static/description/product_category_form.png differ diff --git a/pos_meal_voucher/static/description/product_product_form.png b/pos_meal_voucher/static/description/product_product_form.png index 61ce01c935..9e7f9cdc41 100644 Binary files a/pos_meal_voucher/static/description/product_product_form.png and b/pos_meal_voucher/static/description/product_product_form.png differ diff --git a/pos_meal_voucher/static/description/receipt_information.png b/pos_meal_voucher/static/description/receipt_information.png new file mode 100644 index 0000000000..7f36c3d406 Binary files /dev/null and b/pos_meal_voucher/static/description/receipt_information.png differ diff --git a/pos_meal_voucher/static/description/ticket_information.png b/pos_meal_voucher/static/description/ticket_information.png deleted file mode 100644 index 9f4ad01130..0000000000 Binary files a/pos_meal_voucher/static/description/ticket_information.png and /dev/null differ diff --git a/pos_meal_voucher/static/src/css/pos_meal_voucher.css b/pos_meal_voucher/static/src/css/pos_meal_voucher.css deleted file mode 100644 index 1e1bdcc1df..0000000000 --- a/pos_meal_voucher/static/src/css/pos_meal_voucher.css +++ /dev/null @@ -1,56 +0,0 @@ -.pos .paymentline .is-meal-voucher { - cursor: pointer; - text-align: center; - padding-top: 0px; - padding-bottom: 0px; - background-color: #f0eeee; -} - -.pos .paymentline .is-meal-voucher .fa-cutlery { - border-radius: 20px; - border: 1px solid rgba(0, 0, 0, 0.2); - font-size: 20px; - width: 40px; - height: 30px; - line-height: 30px; - vertical-align: 0%; - color: #aaa; - background-color: #fff; -} - -.payment-screen .paymentmethods .fa-cutlery { - width: 48px; - height: 48px; - line-height: 48px; - margin-top: -25px; - font-size: 20px; - border-radius: 26px; - border: 1px solid rgba(0, 0, 0, 0.2); - background: rgba(255, 255, 255, 0.4); -} - -.payment-screen div.meal-voucher-summary { - border-top: dashed 1px gainsboro; -} - -.payment-screen div.meal-voucher-summary .fa-warning { - color: red; -} - -.payment-screen div.meal-voucher-summary table { - width: 100%; -} - -.payment-screen div.meal-voucher-summary tbody { - background: white; -} - -.payment-screen div.meal-voucher-summary th { - font-size: 16px; - padding: 8px; - text-align: center; -} -.payment-screen div.meal-voucher-summary td { - font-size: 22px; - padding: 8px 12px; -} diff --git a/pos_meal_voucher/static/src/js/Screens/PaymentScreen/PaymentScreen.esm.js b/pos_meal_voucher/static/src/js/Screens/PaymentScreen/PaymentScreen.esm.js new file mode 100644 index 0000000000..80ddf841b8 --- /dev/null +++ b/pos_meal_voucher/static/src/js/Screens/PaymentScreen/PaymentScreen.esm.js @@ -0,0 +1,42 @@ +/** @odoo-module **/ +// SPDX-FileCopyrightText: 2025 Coop IT Easy SC +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +import {Component} from "point_of_sale.Registries"; +import PaymentScreen from "point_of_sale.PaymentScreen"; +import {useBarcodeReader} from "point_of_sale.custom_hooks"; + +const MealVoucherPaymentScreen = (OriginalPaymentScreen) => + class extends OriginalPaymentScreen { + setup() { + super.setup(); + if (this.env.pos.paper_meal_voucher_payment_method !== null) { + useBarcodeReader({ + meal_voucher_payment: this._barcodeMealVoucherAction, + }); + } + } + + async _barcodeMealVoucherAction(code) { + return this.currentOrder.handle_meal_voucher_barcode(code); + } + + get hasMealVoucherPaymentMethod() { + return this.env.pos.config.has_meal_voucher_payment_method; + } + + get mealVoucherEligibleAmount() { + return this.currentOrder.get_total_meal_voucher_eligible(); + } + + get mealVoucherReceivedAmount() { + return this.currentOrder.get_total_meal_voucher_received(); + } + + get maxMealVoucherAmount() { + return this.env.pos.config.max_meal_voucher_amount; + } + }; + +Component.extend(PaymentScreen, MealVoucherPaymentScreen); diff --git a/pos_meal_voucher/static/src/js/Screens/PaymentScreen/PaymentScreenPaymentLines.esm.js b/pos_meal_voucher/static/src/js/Screens/PaymentScreen/PaymentScreenPaymentLines.esm.js new file mode 100644 index 0000000000..595a587765 --- /dev/null +++ b/pos_meal_voucher/static/src/js/Screens/PaymentScreen/PaymentScreenPaymentLines.esm.js @@ -0,0 +1,16 @@ +/** @odoo-module **/ +// SPDX-FileCopyrightText: 2025 Coop IT Easy SC +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +import {Component} from "point_of_sale.Registries"; +import PaymentScreenPaymentLines from "point_of_sale.PaymentScreenPaymentLines"; + +const MealVoucherPaymentScreenPaymentLines = (OriginalPaymentScreenPaymentLines) => + class extends OriginalPaymentScreenPaymentLines { + isMealVoucher(line) { + return line.payment_method.meal_voucher_type !== false; + } + }; + +Component.extend(PaymentScreenPaymentLines, MealVoucherPaymentScreenPaymentLines); diff --git a/pos_meal_voucher/static/src/js/Screens/ProductScreen/Orderline.esm.js b/pos_meal_voucher/static/src/js/Screens/ProductScreen/Orderline.esm.js new file mode 100644 index 0000000000..6386ed0115 --- /dev/null +++ b/pos_meal_voucher/static/src/js/Screens/ProductScreen/Orderline.esm.js @@ -0,0 +1,19 @@ +/** @odoo-module **/ +// SPDX-FileCopyrightText: 2025 Coop IT Easy SC +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +import {Component} from "point_of_sale.Registries"; +import Orderline from "point_of_sale.Orderline"; + +const MealVoucherOrderline = (OriginalOrderline) => + class extends OriginalOrderline { + get displayMealVoucherIcon() { + return ( + this.env.pos.config.enable_meal_voucher_order_lines_icon && + this.props.line.get_product().meal_voucher_ok + ); + } + }; + +Component.extend(Orderline, MealVoucherOrderline); diff --git a/pos_meal_voucher/static/src/js/Screens/ProductScreen/ProductScreen.esm.js b/pos_meal_voucher/static/src/js/Screens/ProductScreen/ProductScreen.esm.js new file mode 100644 index 0000000000..3b781122d6 --- /dev/null +++ b/pos_meal_voucher/static/src/js/Screens/ProductScreen/ProductScreen.esm.js @@ -0,0 +1,28 @@ +/** @odoo-module **/ +// SPDX-FileCopyrightText: 2025 Coop IT Easy SC +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +import {Component} from "point_of_sale.Registries"; +import ProductScreen from "point_of_sale.ProductScreen"; +import {useBarcodeReader} from "point_of_sale.custom_hooks"; + +const MealVoucherProductScreen = (OriginalProductScreen) => + class extends OriginalProductScreen { + setup() { + super.setup(); + if (this.env.pos.paper_meal_voucher_payment_method !== null) { + useBarcodeReader({ + meal_voucher_payment: this._barcodeMealVoucherAction, + }); + } + } + + async _barcodeMealVoucherAction(code) { + // Display the payment screen, if it is not the current one. + this.showScreen("PaymentScreen"); + return this.currentOrder.handle_meal_voucher_barcode(code); + } + }; + +Component.extend(ProductScreen, MealVoucherProductScreen); diff --git a/pos_meal_voucher/static/src/js/models.esm.js b/pos_meal_voucher/static/src/js/models.esm.js new file mode 100644 index 0000000000..0383818ea5 --- /dev/null +++ b/pos_meal_voucher/static/src/js/models.esm.js @@ -0,0 +1,158 @@ +/** @odoo-module **/ +// Copyright (C) 2020 - Today: GRAP (http://www.grap.coop) +// @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import {Order, Orderline, Payment, PosGlobalState} from "point_of_sale.models"; +import {Gui} from "point_of_sale.Gui"; +import {Model} from "point_of_sale.Registries"; +import core from "web.core"; +import utils from "web.utils"; + +var _t = core._t; + +const round_pr = utils.round_precision; + +const MealVoucherOrder = (OriginalOrder) => + class extends OriginalOrder { + get_total_meal_voucher_eligible() { + return round_pr( + this.orderlines.reduce(function (sum, orderLine) { + if (orderLine.product.meal_voucher_ok) { + return sum + orderLine.get_price_with_tax(); + } + return sum; + }, 0), + this.pos.currency.rounding + ); + } + + get_total_meal_voucher_received() { + return round_pr( + this.paymentlines.reduce(function (sum, paymentLine) { + if (paymentLine.is_meal_voucher()) { + return sum + paymentLine.get_amount(); + } + return sum; + }, 0), + this.pos.currency.rounding + ); + } + + handle_meal_voucher_barcode(code) { + var duplicated_scan = false; + this.paymentlines.forEach(function (paymentLine) { + if (paymentLine.payment_note === code.code) { + Gui.showPopup("ErrorPopup", { + title: _t("Invalid meal voucher"), + body: _.str.sprintf( + _t( + "the paper meal voucher with code '%s' has already been scanned during the cashing of this sale." + ), + code.code + ), + }); + duplicated_scan = true; + return false; + } + }, this); + if (duplicated_scan) { + return; + } + // Add new payment line with the amount found in the barcode. + const payment_line = this.add_paymentline( + this.pos.paper_meal_voucher_payment_method + ); + payment_line.set_amount(code.value); + payment_line.payment_note = code.code; + } + }; + +Model.extend(Order, MealVoucherOrder); + +const RECEIPT_ORDER_LINE_PREFIX = "(*) "; + +const MealVoucherOrderline = (OriginalOrderline) => + class extends OriginalOrderline { + generate_wrapped_product_name() { + if ( + !this.get_product().meal_voucher_ok || + !this.pos.config.enable_meal_voucher_receipt_info + ) { + return super.generate_wrapped_product_name(...arguments); + } + // Temporarily change the product name to add a prefix on the + // receipt. + // + // .generate_wrapped_product_name() calls + // .get_full_product_name(), and it has a different behavior + // depending on whether this.full_product_name is set or not. both + // behaviors must be handled, because one is used when generating + // a receipt during an order, while the order is used when + // retrieving a receipt from a previous order. + // .get_full_product_name() cannot be overridden because its + // result is also used for display in the product screen and + // its result is stored, which would result in the prefix being + // added each time the pos interface is reloaded. + const originalFullProductName = this.full_product_name; + const originalDisplayName = this.product.display_name; + if (originalFullProductName) { + this.full_product_name = + RECEIPT_ORDER_LINE_PREFIX + originalFullProductName; + } else { + this.product.display_name = + RECEIPT_ORDER_LINE_PREFIX + originalDisplayName; + } + const res = super.generate_wrapped_product_name(...arguments); + if (originalFullProductName) { + this.full_product_name = originalFullProductName; + } else { + this.product.display_name = originalDisplayName; + } + return res; + } + }; + +Model.extend(Orderline, MealVoucherOrderline); + +const MealVoucherPayment = (OriginalPayment) => + class extends OriginalPayment { + initialize() { + super.initialize(...arguments); + this.payment_note = null; + } + + init_from_JSON(json) { + super.init_from_JSON(...arguments); + this.payment_note = json.payment_note; + } + + export_as_JSON() { + const res = super.export_as_JSON(...arguments); + res.payment_note = this.payment_note; + return res; + } + + is_meal_voucher() { + return this.payment_method.meal_voucher_type !== false; + } + }; + +Model.extend(Payment, MealVoucherPayment); + +const MealVoucherPosGlobalState = (OriginalPosGlobalState) => + class extends OriginalPosGlobalState { + async load_server_data() { + await super.load_server_data(...arguments); + this.paper_meal_voucher_payment_method = null; + for (const payment_method_id of this.config.payment_method_ids) { + const payment_method = this.payment_methods_by_id[payment_method_id]; + if (payment_method.meal_voucher_type === "paper") { + this.paper_meal_voucher_payment_method = payment_method; + break; + } + } + } + }; + +Model.extend(PosGlobalState, MealVoucherPosGlobalState); diff --git a/pos_meal_voucher/static/src/js/models.js b/pos_meal_voucher/static/src/js/models.js deleted file mode 100644 index 62c63061e2..0000000000 --- a/pos_meal_voucher/static/src/js/models.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (C) 2020 - Today: GRAP (http://www.grap.coop) -// @author: Sylvain LE GAL (https://twitter.com/legalsylvain) -// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -odoo.define("pos_meal_voucher.models", function (require) { - "use strict"; - - var models = require("point_of_sale.models"); - var utils = require("web.utils"); - - var round_pr = utils.round_precision; - - models.load_fields("product.product", ["meal_voucher_ok"]); - - models.load_fields("account.journal", [ - "meal_voucher_type", - "meal_voucher_mixed_text", - ]); - - var OrderSuper = models.Order.prototype; - var Order = models.Order.extend({ - get_total_meal_voucher_eligible: function () { - return round_pr( - this.orderlines.reduce(function (sum, orderLine) { - if (orderLine.product.meal_voucher_ok) { - return sum + orderLine.get_price_with_tax(); - } - return sum; - - }, 0), - this.pos.currency.rounding - ); - }, - get_total_meal_voucher_received: function () { - return round_pr( - this.paymentlines.reduce(function (sum, paymentLine) { - if (paymentLine.is_meal_voucher()) { - return sum + paymentLine.get_amount(); - } - return sum; - - }, 0), - this.pos.currency.rounding - ); - }, - }); - - models.Order = Order; - - var OrderlineSuper = models.Orderline.prototype; - var Orderline = models.Orderline.extend({ - generate_wrapped_product_name: function () { - if ( - !this.get_product().meal_voucher_ok || - !this.pos.config.meal_voucher_display_info_ticket - ) { - return OrderlineSuper.generate_wrapped_product_name.apply( - this, - arguments - ); - } - const originalDisplayName = this.product.display_name; - this.product.display_name = "(*) " + originalDisplayName; - const res = OrderlineSuper.generate_wrapped_product_name.apply( - this, - arguments - ); - this.product.display_name = originalDisplayName; - return res; - }, - }); - - models.Orderline = Orderline; - - var PaymentlineSuper = models.Paymentline.prototype; - - var Paymentline = models.Paymentline.extend({ - initialize: function () { - PaymentlineSuper.initialize.apply(this, arguments); - // We use 'payment_note', because 'note' field is still used - // to set in the payment_name value. - // See odoo/addons/point_of_sale/models/pos_order.py:59 - // and then in the name of the statement line. - // See odoo/addons/point_of_sale/models/pos_order.py:950 - this.statement_note = ""; - this.manual_meal_voucher = false; - }, - - init_from_JSON: function (json) { - PaymentlineSuper.init_from_JSON.apply(this, arguments); - this.statement_note = json.statement_note; - }, - export_as_JSON: function () { - var res = PaymentlineSuper.export_as_JSON.apply(this, arguments); - res.statement_note = this.statement_note; - return res; - }, - - is_meal_voucher: function () { - return ( - this.manual_meal_voucher === true || - ["paper", "dematerialized"].indexOf( - this.cashregister.journal.meal_voucher_type - ) !== -1 - ); - }, - }); - - models.Paymentline = Paymentline; -}); diff --git a/pos_meal_voucher/static/src/js/screens.js b/pos_meal_voucher/static/src/js/screens.js deleted file mode 100644 index def2d584ed..0000000000 --- a/pos_meal_voucher/static/src/js/screens.js +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2020 - Today: GRAP (http://www.grap.coop) -// @author: Sylvain LE GAL (https://twitter.com/legalsylvain) -// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -odoo.define("pos_meal_voucher.screens", function (require) { - "use strict"; - - var screens = require("point_of_sale.screens"); - - screens.ScreenWidget.include({ - barcode_meal_voucher_payment_action: function (code) { - // Display the payment screen, if it is not the current one. - if (this.pos.gui.current_screen.template !== "PaymentScreenWidget") { - this.gui.show_screen("payment"); - } - var paymentScreen = this.pos.gui.current_screen; - var order = this.pos.get_order(); - var amount = code.value; - var cashregister = null; - // Find a meal voucher cash register, if exist - for (var i = 0; i < this.pos.cashregisters.length; i++) { - if (this.pos.cashregisters[i].journal.meal_voucher_type === "paper") { - cashregister = this.pos.cashregisters[i]; - break; - } - } - if (!cashregister) { - return; - } - - // Add new payment line with the amount found in the barcode - this.pos.get_order().add_paymentline(cashregister); - paymentScreen.reset_input(); - order.selected_paymentline.set_amount(amount); - order.selected_paymentline.statement_note = code.code; - paymentScreen.order_changes(); - paymentScreen.render_paymentlines(); - paymentScreen - .$(".paymentline.selected .edit") - .text(paymentScreen.format_currency_no_symbol(amount)); - }, - - // Setup the callback action for the "meal_voucher_payment" barcodes. - show: function () { - this._super(); - this.pos.barcode_reader.set_action_callback( - "meal_voucher_payment", - _.bind(this.barcode_meal_voucher_payment_action, this) - ); - }, - }); - - screens.OrderWidget.include({ - update_summary: function () { - this._super.apply(this, arguments); - var order = this.pos.get_order(); - if ( - !order.get_orderlines().length || - !this.pos.config.has_meal_voucher_journal - ) { - return; - } - this.el.querySelector(".summary .meal-voucher .value").textContent = - this.format_currency(order.get_total_meal_voucher_eligible()); - }, - }); - - screens.PaymentScreenWidget.include({ - click_paymentmethods_meal_voucher_mixed: function (id) { - var cashregister = null; - for (var i = 0; i < this.pos.cashregisters.length; i++) { - if (this.pos.cashregisters[i].journal_id[0] === id) { - cashregister = this.pos.cashregisters[i]; - break; - } - } - this.pos.get_order().add_paymentline(cashregister); - // Manually set meal voucher - this.pos.get_order().selected_paymentline.manual_meal_voucher = true; - this.reset_input(); - this.render_paymentlines(); - }, - - render_paymentmethods: function () { - var self = this; - var methods = this._super.apply(this, arguments); - methods.on("click", ".paymentmethod-meal-voucher-mixed", function () { - self.click_paymentmethods_meal_voucher_mixed($(this).data("id")); - }); - return methods; - }, - - render_paymentlines: function () { - var self = this; - - this._super.apply(this, arguments); - var order = this.pos.get_order(); - if (!order || !this.pos.config.has_meal_voucher_journal) { - return; - } - // Update meal voucher summary - var total_eligible = order.get_total_meal_voucher_eligible(); - this.el.querySelector("#meal-voucher-eligible-amount").textContent = - this.format_currency(total_eligible); - - var max_amount = this.pos.config.max_meal_voucher_amount; - if (max_amount !== 0) { - this.el.querySelector("#meal-voucher-max-amount").textContent = - this.format_currency(max_amount); - } - var total_received = order.get_total_meal_voucher_received(); - this.el.querySelector("#meal-voucher-received-amount").textContent = - this.format_currency(total_received); - - // Display warnings - if (total_received > total_eligible) { - this.$("#meal-voucher-eligible-warning").removeClass("oe_hidden"); - } else { - this.$("#meal-voucher-eligible-warning").addClass("oe_hidden"); - } - if (total_received > max_amount) { - this.$("#meal-voucher-max-warning").removeClass("oe_hidden"); - } else { - this.$("#meal-voucher-max-warning").addClass("oe_hidden"); - } - }, - }); -}); diff --git a/pos_meal_voucher/static/src/scss/pos_meal_voucher.scss b/pos_meal_voucher/static/src/scss/pos_meal_voucher.scss new file mode 100644 index 0000000000..7cc38c8747 --- /dev/null +++ b/pos_meal_voucher/static/src/scss/pos_meal_voucher.scss @@ -0,0 +1,56 @@ +.pos .paymentline .is-meal-voucher { + text-align: center; + padding: map-get($spacers, 3); +} + +.pos .paymentline .is-meal-voucher .fa-cutlery { + border-radius: 8px; + border: 1px solid rgba($gray-700, 0.5); + width: 24px; + line-height: 24px; +} + +.payment-screen div.meal-voucher-summary .fa-warning { + color: red; +} + +.pos .meal-voucher-summary { + // same as .pos .paymentlines + display: flex; + flex-direction: column-reverse; + border-spacing: 0px 10px; + border-collapse: inherit; +} + +.pos .meal-voucher-summary-container { + padding: map-get($spacers, 2) 0; +} + +.pos .meal-voucher-summary-line { + // same as .pos .paymentline, with some changes + display: flex; + flex-grow: 1; + flex-basis: 100%; + background: #fff; + font-size: 16px; + border-top-width: 0px; + padding: map-get($spacers, 2) 0; +} + +.meal-voucher-summary-line .meal-voucher-summary-line-name { + flex-grow: 1; + padding: 0 map-get($spacers, 3); +} + +.meal-voucher-summary-line .meal-voucher-summary-line-amount { + padding: 0 map-get($spacers, 3); +} + +.meal-voucher-summary-line .meal-voucher-summary-line-warning { + font-size: 20px; + margin-bottom: -(map-get($spacers, 2)); +} + +.pos-receipt-meal-voucher-eligible { + font-size: 75%; +} diff --git a/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml b/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml new file mode 100644 index 0000000000..9734924cd2 --- /dev/null +++ b/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreen.xml @@ -0,0 +1,64 @@ + + + + + +
+

Meal Vouchers

+
+
+
Total Eligible
+
+ +
+
+ +
+
+
+
Max Amount
+
+ +
+
+ +
+
+
+
Total Received
+
+ +
+
+
+
+
+
+ +
diff --git a/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreenPaymentLines.xml b/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreenPaymentLines.xml new file mode 100644 index 0000000000..08f62de9da --- /dev/null +++ b/pos_meal_voucher/static/src/xml/Screens/PaymentScreen/PaymentScreenPaymentLines.xml @@ -0,0 +1,28 @@ + + + + + +
+ +
+
+ +
+ +
+
+
+ +
diff --git a/pos_meal_voucher/static/src/xml/Screens/ProductScreen/OrderSummary.xml b/pos_meal_voucher/static/src/xml/Screens/ProductScreen/OrderSummary.xml new file mode 100644 index 0000000000..8baa8309ae --- /dev/null +++ b/pos_meal_voucher/static/src/xml/Screens/ProductScreen/OrderSummary.xml @@ -0,0 +1,26 @@ + + + + + + +
+
+
+ Meal Voucher: +
+
+
+
+
+
+ +
diff --git a/pos_meal_voucher/static/src/xml/Screens/ProductScreen/Orderline.xml b/pos_meal_voucher/static/src/xml/Screens/ProductScreen/Orderline.xml new file mode 100644 index 0000000000..b80ec3445a --- /dev/null +++ b/pos_meal_voucher/static/src/xml/Screens/ProductScreen/Orderline.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml b/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml new file mode 100644 index 0000000000..23f70f15c0 --- /dev/null +++ b/pos_meal_voucher/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml @@ -0,0 +1,26 @@ + + + + + + +
+
+ Products marked with an asterisk (*) can be paid for by meal vouchers. +
+ Eligible Total: + +
+
+
+
+ +
diff --git a/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml b/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml deleted file mode 100644 index e685a62330..0000000000 --- a/pos_meal_voucher/static/src/xml/pos_meal_voucher.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - -
-
-
- Meal Voucher: 0.00 € -
-
-
-
-
-
- - - - -
- - - - - (Dematerialized) - -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - -
Meal Voucher
Total Eligible - 0.00 € - -
Max Amount - 0.00 € - -
Total Received - 0.00 € -
-
-
-
-
- - - - - - - - - - - - - - (*) - - - -
- Products marked with a star (*) are eligible for Meal vouchers. - - - - - -
Eligible Total: - -
-
-
-
- - - - -
------------------------------------------
-
- Products marked with a star (*) are eligible for Meal vouchers. -
- - Eligible Total: - - -
-
-
- -
diff --git a/pos_meal_voucher/views/pos_payment_method_view.xml b/pos_meal_voucher/views/pos_payment_method_view.xml new file mode 100644 index 0000000000..371b97faf8 --- /dev/null +++ b/pos_meal_voucher/views/pos_payment_method_view.xml @@ -0,0 +1,21 @@ + + + + + + pos.payment.method + + + + + + + + + + + diff --git a/pos_meal_voucher/views/view_pos_config.xml b/pos_meal_voucher/views/res_config_settings_view.xml similarity index 58% rename from pos_meal_voucher/views/view_pos_config.xml rename to pos_meal_voucher/views/res_config_settings_view.xml index 8bda9bbce1..477c2119c4 100644 --- a/pos_meal_voucher/views/view_pos_config.xml +++ b/pos_meal_voucher/views/res_config_settings_view.xml @@ -6,23 +6,23 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> - - pos.config - + + res.config.settings + - +

Meal Vouchers

- Meal Voucher Amount + Maximum Amount
- Maximum amount of Meal Vouchers that can be received for a PoS Order. - Let 0, if you don't want to enable this check. + Optional maximum amount per order that can be paid by meal vouchers. + Set to 0 to disable.
@@ -31,29 +31,29 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
- +
- +
diff --git a/pos_meal_voucher/views/templates.xml b/pos_meal_voucher/views/templates.xml deleted file mode 100644 index 3118e7f9b6..0000000000 --- a/pos_meal_voucher/views/templates.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - -