diff --git a/pos_payment_change/README.rst b/pos_payment_change/README.rst new file mode 100644 index 0000000000..2529711207 --- /dev/null +++ b/pos_payment_change/README.rst @@ -0,0 +1,152 @@ +=============================== +Point Of Sale - Change Payments +=============================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:bd65942d8b04bf96c6479713390736e81e44935e7df4cd0a3a9c94237b229c28 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github + :target: https://github.com/OCA/pos/tree/18.0/pos_payment_change + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-18-0/pos-18-0-pos_payment_change + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionnality of the Odoo Point of Sale to +allow the cashier to change the payments of a invoiced PoS order. + +This feature is usefull when the user realized that he did a mistake +after invoice. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +- Go to Point of Sale > Configuration > Settings +- Edit your point of sale, and select a value for the field 'Payment + Change Policy'. + +Two options are available: + +- 'Refund and Resale': Odoo will refund the current Pos Order to cancel + it, and create a new PoS Order with the correct payment lines +- 'Update Payments': Odoo will change payment lines. + +|pos_config_form| + +**Note** In some countries the 'Update Payments' Option is not allowed +by law, because orders history shouldn't not be altered. + +For that purpose, a constrains is present to check the value of this +field. If the module ``l10n_fr_certification`` is installed and if the +current company has an inalterable accounting, it will not be possible +to select the value 'Update Payments'. + +.. |pos_config_form| image:: https://raw.githubusercontent.com/OCA/pos/18.0/pos_payment_change/static/description/res_config_settings_form.png + +Usage +===== + +- Go to a PoS Order +- Click on the button 'Change Payments' + +|pos_order_form| + +- In the pop up wizard, select the real payment(s) that have been used + to pay the order + +|pos_payment_change_wizard_form| + +- Then click on the button 'Change Payments' + +**Note** + +If the option 'Refund and Resale' is selected, changing the payments +will display the three PoS orders. the oringal one, the refund one, and +the new one. + +|pos_order_tree| + +.. |pos_order_form| image:: https://raw.githubusercontent.com/OCA/pos/18.0/pos_payment_change/static/description/pos_order_form.png +.. |pos_payment_change_wizard_form| image:: https://raw.githubusercontent.com/OCA/pos/18.0/pos_payment_change/static/description/pos_payment_change_wizard_form.png +.. |pos_order_tree| image:: https://raw.githubusercontent.com/OCA/pos/18.0/pos_payment_change/static/description/pos_order_tree.png + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* GRAP + +Contributors +------------ + +- Sylvain LE GAL +- Julien WESTE +- Foram Shah +- Manuel Regidor + +Other credits +------------- + +The development of this module has been financially supported by: + +- GRAP, Groupement Régional Alimentaire de proximité + (`www.grap.coop `__) +- Vracoop (`www.vracoop.fr `__) + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px + :target: https://github.com/legalsylvain + :alt: legalsylvain + +Current `maintainer `__: + +|maintainer-legalsylvain| + +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_payment_change/__init__.py b/pos_payment_change/__init__.py new file mode 100644 index 0000000000..aee8895e7a --- /dev/null +++ b/pos_payment_change/__init__.py @@ -0,0 +1,2 @@ +from . import models +from . import wizards diff --git a/pos_payment_change/__manifest__.py b/pos_payment_change/__manifest__.py new file mode 100644 index 0000000000..23a247c648 --- /dev/null +++ b/pos_payment_change/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright (C) 2013 - 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). +{ + "name": "Point Of Sale - Change Payments", + "version": "18.0.1.0.0", + "summary": "Allow cashier to change order payments, as long as" + " the session is not closed.", + "category": "Point Of Sale", + "author": "GRAP, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/pos", + "license": "AGPL-3", + "depends": ["point_of_sale"], + "maintainers": ["legalsylvain"], + "development_status": "Beta", + "data": [ + "security/ir.model.access.csv", + "wizards/view_pos_payment_change_wizard.xml", + "views/view_res_config_settings.xml", + "views/view_pos_order.xml", + ], + "installable": True, +} diff --git a/pos_payment_change/i18n/de.po b/pos_payment_change/i18n/de.po new file mode 100644 index 0000000000..16893fa83c --- /dev/null +++ b/pos_payment_change/i18n/de.po @@ -0,0 +1,251 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-08 07:52+0000\n" +"Last-Translator: André Volksdorf \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid " (Refund Order: %(refund_order)s ; Resale Order: %(resale_order)s)" +msgstr "" +" (Rückerstattungsauftrag: %(refund_order)s ; Wiederverkaufsauftrag: " +"%(resale_order)s)" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form +msgid "Payment Change Policy" +msgstr "Richtlinie für Zahlungsänderungen" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount +msgid "Amount" +msgstr "Betrag" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Cancel" +msgstr "Abbrechen" + +#. module: pos_payment_change +#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Change Payments" +msgstr "Zahlung ändern" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Company Currency" +msgstr "Währung" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid +msgid "Created by" +msgstr "Erstellt von" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date +msgid "Created on" +msgstr "Erstellt am" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0 +#, python-format +msgid "" +"Differences between the two values for the POS Order '%(name)s':\n" +"\n" +" * Total of all the new payments %(total)s;\n" +" * Total of the POS Order %(amount_total)s;\n" +"\n" +"Please change the payments." +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id +msgid "ID" +msgstr "ID" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert von" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids +msgid "New Payment Lines" +msgstr "Neue Zahlungslinien" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids +msgid "Old Payment Lines" +msgstr "Alte Zahlungslinien" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id +msgid "Order" +msgstr "Auftrag" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy +msgid "Payment Change Policy" +msgstr "Richtlinie für Zahlungsänderungen" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy +msgid "" +"Payment Change Policy when users want to change the payment lines of a given " +"PoS Order.\n" +"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, " +"and create a new PoS Order with the correct payment lines.\n" +"* 'Update Payments': Odoo will change payment lines.\n" +"\n" +"Note : In some countries the 'Update Payments' Option is not allowed by law, " +"because orders history shouldn't not be altered." +msgstr "" +"Richtlinie für Zahlungsänderungen, wenn Benutzer die Zahlungszeilen eines " +"bestimmten PoS-Auftrags ändern möchten.\n" +"* 'Rückerstattung und Wiederverkauf': Odoo erstattet den aktuellen PoS-" +"Auftrag zurück, um ihn zu stornieren, und erstellt einen neuen PoS-Auftrag " +"mit den korrekten Zahlungszeilen.\n" +"* 'Zahlungen aktualisieren': Odoo wird die Zahlungszeilen ändern.\n" +"\n" +"Hinweis: In einigen Ländern ist die Option 'Zahlungen aktualisieren' " +"gesetzlich nicht erlaubt, da die Bestellhistorie nicht verändert werden darf." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id +msgid "Payment Method" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard +msgid "PoS Payment Change Wizard" +msgstr "PoS-Zahlungsänderungs-Assistent" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line +msgid "PoS Payment Change Wizard New Line" +msgstr "PoS-Zahlungsänderungsassistent Neue Zeile" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line +msgid "PoS Payment Change Wizard Old Line" +msgstr "PoS-Zahlungsänderungsassistent Alte Zeile" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Konfiguration der Verkaufsstelle" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_order +msgid "Point of Sale Orders" +msgstr "Bestellungen am Point of Sale" + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund +msgid "Refund and Resale" +msgstr "Rückerstattung und Wiederverkauf" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"The payments of the Order %(order)s (Ref: %(ref)s have been changed by " +"%(user_name)s on %(today)s" +msgstr "" +"Die Zahlungen des Auftrags %(order)s (Ref: %(ref)s) wurden von %(user_name)s " +"bei %(today)s geändert." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Total" +msgstr "Gesamt" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_config.py:0 +#, python-format +msgid "" +"Unable to use the 'Update Payments' options for companies that have " +"unalterable accounting." +msgstr "" +"Die Optionen 'Zahlungen aktualisieren' können nicht für Firmen mit " +"unveränderlicher Buchhaltung verwendet werden." + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update +msgid "Update Payments" +msgstr "Zahlungen aktualisieren" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Utility field to express amount currency" +msgstr "Utility-Feld zur Angabe der Betragswährung" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id +msgid "Wizard" +msgstr "Assistent" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"You can not change payments of the POS '%(name)s' because the associated " +"session '%(session)s' has been closed!" +msgstr "" +"Sie können Zahlungen der Kasse '%(name)s' nicht ändern, da die zugehörige " +"Sitzung '%(session)s' geschlossen wurde!" diff --git a/pos_payment_change/i18n/es.po b/pos_payment_change/i18n/es.po new file mode 100644 index 0000000000..8212e50d46 --- /dev/null +++ b/pos_payment_change/i18n/es.po @@ -0,0 +1,256 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-12 13:36+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid " (Refund Order: %(refund_order)s ; Resale Order: %(resale_order)s)" +msgstr "" +" (Orden de reembolso: %(refund_order)s ; Orden de reventa: %(resale_order)s)" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form +msgid "Payment Change Policy" +msgstr "Política de cambio de pago" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount +msgid "Amount" +msgstr "Importe" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Cancel" +msgstr "Cancelar" + +#. module: pos_payment_change +#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Change Payments" +msgstr "Cambiar pagos" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Company Currency" +msgstr "Moneda de la compañía" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0 +#, python-format +msgid "" +"Differences between the two values for the POS Order '%(name)s':\n" +"\n" +" * Total of all the new payments %(total)s;\n" +" * Total of the POS Order %(amount_total)s;\n" +"\n" +"Please change the payments." +msgstr "" +"Diferencias entre los dos valores para el pedido POS '%(name)s':\n" +"\n" +" * Total de todos los nuevos pagos %(total)s;\n" +" * Total del Pedido TPV %(amount_total)s;\n" +"\n" +"Por favor, cambie los pagos." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name +msgid "Display Name" +msgstr "Nombre a mostrar" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id +msgid "ID" +msgstr "ID" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids +msgid "New Payment Lines" +msgstr "Nuevas líneas de pago" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids +msgid "Old Payment Lines" +msgstr "Viejas líneas de pago" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id +msgid "Order" +msgstr "Orden" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy +msgid "Payment Change Policy" +msgstr "Política de cambio de pago" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy +msgid "" +"Payment Change Policy when users want to change the payment lines of a given " +"PoS Order.\n" +"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, " +"and create a new PoS Order with the correct payment lines.\n" +"* 'Update Payments': Odoo will change payment lines.\n" +"\n" +"Note : In some countries the 'Update Payments' Option is not allowed by law, " +"because orders history shouldn't not be altered." +msgstr "" +"Política de cambio de pago cuando los usuarios desean cambiar las líneas de " +"pago de un pedido de TPV determinado.\n" +"* 'Reembolso y reventa': Odoo reembolsará el pedido de posición actual para " +"cancelarlo y creará un nuevo pedido de TPV con las líneas de pago " +"correctas.\n" +"* 'Actualizar pagos': Odoo cambiará las líneas de pago.\n" +"\n" +"Nota: En algunos países, la opción 'Actualizar pagos' no está permitida por " +"ley, ya que el historial de pedidos no debe modificarse." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id +msgid "Payment Method" +msgstr "Método de Pago" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard +msgid "PoS Payment Change Wizard" +msgstr "Asistente de cambio de pago del TPV" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line +msgid "PoS Payment Change Wizard New Line" +msgstr "Asistente de cambio de pago de una nueva línea del PdV" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line +msgid "PoS Payment Change Wizard Old Line" +msgstr "Asistente de cambio de pago de una línea antigua del PdV" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configuración del punto de venta" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_order +msgid "Point of Sale Orders" +msgstr "Pedidos de Punto de Venta" + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund +msgid "Refund and Resale" +msgstr "Reembolso y reventa" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"The payments of the Order %(order)s (Ref: %(ref)s have been changed by " +"%(user_name)s on %(today)s" +msgstr "" +"Los pagos de la orden %(order)s (Ref: %(ref)s) han sido modificados por " +"%(user_name)s en %(today)s" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Total" +msgstr "Total" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_config.py:0 +#, python-format +msgid "" +"Unable to use the 'Update Payments' options for companies that have " +"unalterable accounting." +msgstr "" +"No se pueden usar las opciones de 'Actualizar pagos' para empresas que " +"tienen contabilidad inalterable." + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update +msgid "Update Payments" +msgstr "Actualizar pagos" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Utility field to express amount currency" +msgstr "Campo de utilidad para expresar la cantidad de la moneda" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id +msgid "Wizard" +msgstr "Asistente" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"You can not change payments of the POS '%(name)s' because the associated " +"session '%(session)s' has been closed!" +msgstr "" +"¡No puede cambiar los pagos del TPV '%(name)s' porque la sesión asociada " +"'%(session)s' se ha cerrado!" diff --git a/pos_payment_change/i18n/fr.po b/pos_payment_change/i18n/fr.po new file mode 100644 index 0000000000..ab8f641852 --- /dev/null +++ b/pos_payment_change/i18n/fr.po @@ -0,0 +1,295 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-05-18 17:33+0000\n" +"PO-Revision-Date: 2023-11-03 00:48+0000\n" +"Last-Translator: Alexis de Lattre \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid " (Refund Order: %(refund_order)s ; Resale Order: %(resale_order)s)" +msgstr " (Remboursement: %(refund_order)s ; Revente : %(resale_order)s)" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "" +"'Refund and Resale': Odoo will refund the current Pos Order to cancel it, " +"and create a new PoS Order with the correct payment lines." +msgstr "" +"'Retourner et revendre': Odoo va réaliser un retour de la vente pour " +"l'annuler, puis recréera une nouvelle vente, avec les paiements corrects." + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "'Update Payments': Odoo will change payment lines." +msgstr "'Modifier les paiements': Odoo va changer les lignes de paiements." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount +msgid "Amount" +msgstr "Montant" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Cancel" +msgstr "Annuler" + +#. module: pos_payment_change +#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Change Payments" +msgstr "Modifier les paiements" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Company Currency" +msgstr "Devise de la société" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_res_config_settings +msgid "Config Settings" +msgstr "Paramètres de configuration" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0 +#, python-format +msgid "" +"Differences between the two values for the POS Order '%(name)s':\n" +"\n" +" * Total of all the new payments %(total)s;\n" +" * Total of the POS Order %(amount_total)s;\n" +"\n" +"Please change the payments." +msgstr "" +"Différences entre les deux valeurs pour la commande au comptoir " +"\"%(name)s\" :\n" +"\n" +" * Total de tous les nouveaux paiements %(total)s ;\n" +" * Total de la commande du point de vente %(amount_total)s ;\n" +"\n" +"Veuillez modifier les paiements." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id +msgid "ID" +msgstr "ID" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids +msgid "New Payment Lines" +msgstr "Nouveaux paiements" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "" +"Note : In some countries the 'Update Payments' option is not allowed by law, " +"because orders history shouldn't not be altered." +msgstr "" +"Note : Dans certains pays, l'option 'Modifier les paiements' n'est pas " +"autorisé par la loi, parce que l'historique des ventes ne doit pas être " +"altéré." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids +msgid "Old Payment Lines" +msgstr "Anciens paiements" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id +msgid "Order" +msgstr "Commande" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy +#: model:ir.model.fields,field_description:pos_payment_change.field_res_config_settings__pos_payment_change_policy +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "Payment Change Policy" +msgstr "Méthode de changement des paiements" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "" +"Payment Change Policy when users want to change the payment lines of a given " +"PoS Order." +msgstr "" +"Méthode de changement des paiements quand les utilisateurs veulent changer " +"des lignes de paiement d'une vente au comptoir." + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy +#: model:ir.model.fields,help:pos_payment_change.field_res_config_settings__pos_payment_change_policy +msgid "" +"Payment Change Policy when users want to change the payment lines of a given " +"PoS Order.\n" +"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, " +"and create a new PoS Order with the correct payment lines.\n" +"* 'Update Payments': Odoo will change payment lines.\n" +"\n" +"Note : In some countries the 'Update Payments' Option is not allowed by law, " +"because orders history shouldn't not be altered." +msgstr "" +"Méthode de changement des paiements quand les utilisateurs veulent changer " +"des lignes de paiement d'une vente au comptoir.\n" +"* 'Retourner et revendre': Odoo va réaliser un retour de la vente pour " +"l'annuler, puis recréera une nouvelle vente, avec les paiements corrects.\n" +"* 'Modifier les paiements': Odoo va changer les lignes de paiements.\n" +"\n" +"Note : dans certains pays, l'option 'Modifier les paiements' n'est pas " +"autorisé par la loi, parce que l'historique des ventes ne doit pas être " +"altéré." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id +msgid "Payment Method" +msgstr "Méthode de paiement" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard +msgid "PoS Payment Change Wizard" +msgstr "Assistant de changement des paiements du Point de Vente" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line +msgid "PoS Payment Change Wizard New Line" +msgstr "" +"Nouvelle ligne de l'assistant de changement des paiements du point de vente" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line +msgid "PoS Payment Change Wizard Old Line" +msgstr "" +"Ancienne ligne de l'assistant de changement des paiements du point de vente" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Paramétrage du point de vente" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_order +msgid "Point of Sale Orders" +msgstr "Commandes du point de vente" + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund +msgid "Refund and Resale" +msgstr "Retourner et revendre" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"The payments of the Order %(order)s (Ref: %(ref)s have been changed by " +"%(user_name)s on %(today)s" +msgstr "" +"Les paiements de la commande %(order)s (Réf : %(ref)s) ont été changés par " +"%(user_name)s le %(today)s." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Total" +msgstr "Total" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_config.py:0 +#, python-format +msgid "" +"Unable to use the 'Update Payments' options for companies that have " +"unalterable accounting." +msgstr "" +"Impossible d'utiliser l'option 'Modifier les paiements' pour les sociétés " +"qui ont une comptabilité inaltérable." + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update +msgid "Update Payments" +msgstr "Modifier les paiements" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Utility field to express amount currency" +msgstr "Champ utilitaire pour exprimer le montant en devise" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id +msgid "Wizard" +msgstr "Assistant" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"You can not change payments of the POS '%(name)s' because the associated " +"session '%(session)s' has been closed!" +msgstr "" +"Vous ne pouvez pas modifier les paiements de la commande '%(name)s' car la " +"session associée '%(session)s' a été clôturée !" diff --git a/pos_payment_change/i18n/it.po b/pos_payment_change/i18n/it.po new file mode 100644 index 0000000000..cf3000ef31 --- /dev/null +++ b/pos_payment_change/i18n/it.po @@ -0,0 +1,255 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-05-22 12:10+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid " (Refund Order: %(refund_order)s ; Resale Order: %(resale_order)s)" +msgstr "" +" (Ordine rimborsato: %(refund_order)s ; Ordine rivenduto: %(resale_order)s)" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form +msgid "Payment Change Policy" +msgstr "Politica modifica pagamento" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount +msgid "Amount" +msgstr "Valore" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Cancel" +msgstr "Annulla" + +#. module: pos_payment_change +#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Change Payments" +msgstr "Modifica pagamenti" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Company Currency" +msgstr "Valuta azienda" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0 +#, python-format +msgid "" +"Differences between the two values for the POS Order '%(name)s':\n" +"\n" +" * Total of all the new payments %(total)s;\n" +" * Total of the POS Order %(amount_total)s;\n" +"\n" +"Please change the payments." +msgstr "" +"Differenze tra i due valori per l'ordine POS '%(name)s':\n" +"\n" +" * Totale di tutti i nuovi pagamenti %(total)s;\n" +" * Totale dell'ordine POS %(amount_total)s;\n" +"\n" +"Si prega di modificare i pagamenti." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id +msgid "ID" +msgstr "ID" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids +msgid "New Payment Lines" +msgstr "Righe nuovo pagamento" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids +msgid "Old Payment Lines" +msgstr "Righe vecchio pagamento" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id +msgid "Order" +msgstr "Ordine" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy +msgid "Payment Change Policy" +msgstr "Politica modifica pagamento" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy +msgid "" +"Payment Change Policy when users want to change the payment lines of a given " +"PoS Order.\n" +"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, " +"and create a new PoS Order with the correct payment lines.\n" +"* 'Update Payments': Odoo will change payment lines.\n" +"\n" +"Note : In some countries the 'Update Payments' Option is not allowed by law, " +"because orders history shouldn't not be altered." +msgstr "" +"Politica modifica del pagamento quando gli utenti vogliono modificare le " +"righe del pagamento.\n" +"* 'Rimborsa e rivendi': Odoo rimborserà l'ordine PoS attuale per annullarlo " +"e creerà un nuovo ordine PoS con le righe di pagamento corrette.\n" +"* 'Aggiorna pagamenti': Odoo modificherà le righe pagamento.\n" +"\n" +"Nota : in alcune nazioni l'opzione 'Aggiorna pagamenti' non è consentita " +"dalla legge perché lo storico degli ordini non deve essere modificato." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id +msgid "Payment Method" +msgstr "Metodo di pagamento" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard +msgid "PoS Payment Change Wizard" +msgstr "Procedura guidata modifica pagamento PoS" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line +msgid "PoS Payment Change Wizard New Line" +msgstr "Nuova riga procedura guidata modifica pagamento PoS" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line +msgid "PoS Payment Change Wizard Old Line" +msgstr "Vecchia riga procedura guidata modifica pagamento PoS" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configurazione punto vendita" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_order +msgid "Point of Sale Orders" +msgstr "Ordini punto vendita" + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund +msgid "Refund and Resale" +msgstr "Rimborsa e rivendi" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"The payments of the Order %(order)s (Ref: %(ref)s have been changed by " +"%(user_name)s on %(today)s" +msgstr "" +"Il pagamento dell'ordine %(order)s (Rif: %(ref)s è stato modificato da " +"%(user_name)s il %(today)s" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Total" +msgstr "Totale" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_config.py:0 +#, python-format +msgid "" +"Unable to use the 'Update Payments' options for companies that have " +"unalterable accounting." +msgstr "" +"Impossibile utilizzare l'opzione 'Aggiorna pagamenti' per le nazioni che " +"hanno la contabilità inalterabile." + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update +msgid "Update Payments" +msgstr "Aggiorna pagamenti" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Utility field to express amount currency" +msgstr "Campo utilità per esprimere la valuta del valore" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id +msgid "Wizard" +msgstr "Procedura guidata" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"You can not change payments of the POS '%(name)s' because the associated " +"session '%(session)s' has been closed!" +msgstr "" +"Non si possono modificare i pagamenti del POS '%(name)s' perché la sessione " +"associata '%(session)s' è stata chiusa!" diff --git a/pos_payment_change/i18n/pos_payment_change.pot b/pos_payment_change/i18n/pos_payment_change.pot new file mode 100644 index 0000000000..de6f3d6bcd --- /dev/null +++ b/pos_payment_change/i18n/pos_payment_change.pot @@ -0,0 +1,255 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid " (Refund Order: %(refund_order)s ; Resale Order: %(resale_order)s)" +msgstr "" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "" +"'Refund and Resale': Odoo will refund the current Pos Order to cancel it, " +"and create a new PoS Order with the correct payment lines." +msgstr "" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "'Update Payments': Odoo will change payment lines." +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount +msgid "Amount" +msgstr "" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Cancel" +msgstr "" + +#. module: pos_payment_change +#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Change Payments" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Company Currency" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid +msgid "Created by" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date +msgid "Created on" +msgstr "" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0 +#, python-format +msgid "" +"Differences between the two values for the POS Order '%(name)s':\n" +"\n" +" * Total of all the new payments %(total)s;\n" +" * Total of the POS Order %(amount_total)s;\n" +"\n" +"Please change the payments." +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name +msgid "Display Name" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id +msgid "ID" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date +msgid "Last Updated on" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids +msgid "New Payment Lines" +msgstr "" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "" +"Note : In some countries the 'Update Payments' option is not allowed by law," +" because orders history shouldn't not be altered." +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids +msgid "Old Payment Lines" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id +msgid "Order" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy +#: model:ir.model.fields,field_description:pos_payment_change.field_res_config_settings__pos_payment_change_policy +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "Payment Change Policy" +msgstr "" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_res_config_settings_form +msgid "" +"Payment Change Policy when users want to change the payment lines of a given" +" PoS Order." +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy +#: model:ir.model.fields,help:pos_payment_change.field_res_config_settings__pos_payment_change_policy +msgid "" +"Payment Change Policy when users want to change the payment lines of a given PoS Order.\n" +"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, and create a new PoS Order with the correct payment lines.\n" +"* 'Update Payments': Odoo will change payment lines.\n" +"\n" +"Note : In some countries the 'Update Payments' Option is not allowed by law, because orders history shouldn't not be altered." +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id +msgid "Payment Method" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__available_payment_method_ids +msgid "Payment Methods" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard +msgid "PoS Payment Change Wizard" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line +msgid "PoS Payment Change Wizard New Line" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line +msgid "PoS Payment Change Wizard Old Line" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_config +msgid "Point of Sale Configuration" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_order +msgid "Point of Sale Orders" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund +msgid "Refund and Resale" +msgstr "" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"The payments of the Order %(order)s (Ref: %(ref)s have been changed by " +"%(user_name)s on %(today)s" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Total" +msgstr "" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_config.py:0 +#, python-format +msgid "" +"Unable to use the 'Update Payments' options for companies that have " +"unalterable accounting." +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update +msgid "Update Payments" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Utility field to express amount currency" +msgstr "" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id +msgid "Wizard" +msgstr "" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"You can not change payments of the POS '%(name)s' because the associated " +"session '%(session)s' has been closed!" +msgstr "" diff --git a/pos_payment_change/i18n/pt_PT.po b/pos_payment_change/i18n/pt_PT.po new file mode 100644 index 0000000000..41dc5f463f --- /dev/null +++ b/pos_payment_change/i18n/pt_PT.po @@ -0,0 +1,253 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_change +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-05-29 10:30+0000\n" +"Last-Translator: Su \n" +"Language-Team: none\n" +"Language: pt_PT\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 5.15.2\n" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid " (Refund Order: %(refund_order)s ; Resale Order: %(resale_order)s)" +msgstr "" +" (Ordem de Reembolso: %(refund_order)s ; Ordem de Revenda: %(resale_order)s)" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_config_form +msgid "Payment Change Policy" +msgstr "Política de Alteração de Pagamentos" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__amount +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__amount +msgid "Amount" +msgstr "Montante" + +#. module: pos_payment_change +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Cancel" +msgstr "Cancelar" + +#. module: pos_payment_change +#: model:ir.actions.act_window,name:pos_payment_change.action_pos_payment_change_wizard +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_order_form +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Change Payments" +msgstr "Alterar Pagamentos" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Company Currency" +msgstr "Moeda da Empresa" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_uid +msgid "Created by" +msgstr "Criado por" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__create_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/wizards/pos_payment_change_wizard.py:0 +#, python-format +msgid "" +"Differences between the two values for the POS Order '%(name)s':\n" +"\n" +" * Total of all the new payments %(total)s;\n" +" * Total of the POS Order %(amount_total)s;\n" +"\n" +"Please change the payments." +msgstr "" +"Diferenças entre os dois valores para a Ordem do TPV '%(name)s':\n" +"\n" +" * Total de todos os novos pagamentos %(total)s;\n" +" * Total da Ordem do TPV %(amount_total)s;\n" +"\n" +"Por favor, altere os pagamentos." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__display_name +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__display_name +msgid "Display Name" +msgstr "Nome a Apresentar" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__id +msgid "ID" +msgstr "ID" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line____last_update +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_uid +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_uid +msgid "Last Updated by" +msgstr "Última Atualização por" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__write_date +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__write_date +msgid "Last Updated on" +msgstr "Última Atualização em" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__new_line_ids +msgid "New Payment Lines" +msgstr "Novas Linhas de Pagamento" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__old_line_ids +msgid "Old Payment Lines" +msgstr "Linhas de Pagamento Anteriores" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__order_id +msgid "Order" +msgstr "Ordem" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_config__payment_change_policy +msgid "Payment Change Policy" +msgstr "Política de Alteração de Pagamentos" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_config__payment_change_policy +msgid "" +"Payment Change Policy when users want to change the payment lines of a given PoS Order.\n" +"* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, and create a new PoS Order with the correct payment lines.\n" +"* 'Update Payments': Odoo will change payment lines.\n" +"\n" +"Note : In some countries the 'Update Payments' Option is not allowed by law, because orders history shouldn't not be altered." +msgstr "" +"Política de Alteração de Pagamentos quando os utilizadores querem alterar as " +"linhas de pagamento de uma dada Ordem do TPV.\n" +"* 'Reembolso e Revenda': O Odoo reembolsará a Ordem do TPV atual para a " +"cancelar, e criará uma nova Ordem do TPV com as linhas de pagamento " +"corretas.\n" +"* 'Atualizar Pagamentos': O Odoo alterará as linhas de pagamento.\n" +"\n" +"Nota: Em alguns países a opção 'Atualizar Pagamentos' não é permitida por " +"lei, porque o histórico das ordens não deve ser alterado." + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__new_payment_method_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__old_payment_method_id +msgid "Payment Method" +msgstr "Método de Pagamento" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard +msgid "PoS Payment Change Wizard" +msgstr "Assistente de Alteração de Pagamentos do TPV" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_new_line +msgid "PoS Payment Change Wizard New Line" +msgstr "Assistente de Alteração de Pagamentos do TPV - Nova Linha" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_payment_change_wizard_old_line +msgid "PoS Payment Change Wizard Old Line" +msgstr "Assistente de Alteração de Pagamentos do TPV - Linha Anterior" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configuração do Ponto de Venda" + +#. module: pos_payment_change +#: model:ir.model,name:pos_payment_change.model_pos_order +msgid "Point of Sale Orders" +msgstr "Ordens do Ponto de Venda" + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__refund +msgid "Refund and Resale" +msgstr "Reembolso e Revenda" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"The payments of the Order %(order)s (Ref: %(ref)s have been changed by " +"%(user_name)s on %(today)s" +msgstr "" +"Os pagamentos da Ordem %(order)s (Ref: %(ref)s foram alterados por %" +"(user_name)s em %(today)s" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard__amount_total +#: model_terms:ir.ui.view,arch_db:pos_payment_change.view_pos_payment_change_wizard_form +msgid "Total" +msgstr "Total" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_config.py:0 +#, python-format +msgid "" +"Unable to use the 'Update Payments' options for companies that have " +"unalterable accounting." +msgstr "" +"Não é possível utilizar a opção 'Atualizar Pagamentos' para empresas com " +"contabilidade inalterável." + +#. module: pos_payment_change +#: model:ir.model.fields.selection,name:pos_payment_change.selection__pos_config__payment_change_policy__update +msgid "Update Payments" +msgstr "Atualizar Pagamentos" + +#. module: pos_payment_change +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_new_line__company_currency_id +#: model:ir.model.fields,help:pos_payment_change.field_pos_payment_change_wizard_old_line__company_currency_id +msgid "Utility field to express amount currency" +msgstr "Campo utilitário para expressar a moeda do montante" + +#. module: pos_payment_change +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_new_line__wizard_id +#: model:ir.model.fields,field_description:pos_payment_change.field_pos_payment_change_wizard_old_line__wizard_id +msgid "Wizard" +msgstr "Assistente" + +#. module: pos_payment_change +#. odoo-python +#: code:addons/pos_payment_change/models/pos_order.py:0 +#, python-format +msgid "" +"You can not change payments of the POS '%(name)s' because the associated " +"session '%(session)s' has been closed!" +msgstr "" +"Não é possível alterar os pagamentos do TPV '%(name)s' porque a sessão " +"associada '%(session)s' foi fechada!" diff --git a/pos_payment_change/models/__init__.py b/pos_payment_change/models/__init__.py new file mode 100644 index 0000000000..b2f3b28373 --- /dev/null +++ b/pos_payment_change/models/__init__.py @@ -0,0 +1,4 @@ +from . import pos_config +from . import pos_order +from . import pos_payment +from . import res_config_settings diff --git a/pos_payment_change/models/pos_config.py b/pos_payment_change/models/pos_config.py new file mode 100644 index 0000000000..2f4659dad3 --- /dev/null +++ b/pos_payment_change/models/pos_config.py @@ -0,0 +1,51 @@ +# 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 api, fields, models +from odoo.exceptions import ValidationError + + +class PosConfig(models.Model): + _inherit = "pos.config" + + _PAYMENT_CHANGE_POLICY_SELECTION = [ + ("refund", "Refund and Resale"), + ("update", "Update Payments"), + ] + + payment_change_policy = fields.Selection( + selection=_PAYMENT_CHANGE_POLICY_SELECTION, + default="refund", + required=True, + help="Payment Change Policy when users want" + " to change the payment lines of a given PoS Order.\n" + "* 'Refund and Resale': Odoo will refund the current" + " Pos Order to cancel it, and create a new PoS Order" + " with the correct payment lines.\n" + "* 'Update Payments': Odoo will change payment lines.\n\n" + "Note : In some countries the 'Update Payments' Option" + " is not allowed by law, because orders history shouldn't" + " not be altered.", + ) + + @api.constrains("payment_change_policy") + def _check_payment_change_policy(self): + # Check if certification module is installed + # and if yes, if 'update payments' option is allowed + module_states = ( + self.env["ir.module.module"] + .sudo() + .search([("name", "=", "l10n_fr_pos_cert")]) + .mapped("state") + ) + if "installed" not in module_states: + return + for config in self.filtered(lambda x: x.payment_change_policy == "update"): + if config.company_id._is_accounting_unalterable(): + raise ValidationError( + self.env._( + "Unable to use the 'Update Payments' options" + " for companies that have unalterable accounting." + ) + ) diff --git a/pos_payment_change/models/pos_order.py b/pos_payment_change/models/pos_order.py new file mode 100644 index 0000000000..f318076f7b --- /dev/null +++ b/pos_payment_change/models/pos_order.py @@ -0,0 +1,122 @@ +# Copyright (C) 2015 - Today: GRAP (http://www.grap.coop) +# @author: Julien WESTE +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from datetime import datetime + +from odoo import fields, models +from odoo.exceptions import UserError +from odoo.tools import float_is_zero + + +class PosOrder(models.Model): + _inherit = "pos.order" + + payment_change_policy = fields.Selection(related="config_id.payment_change_policy") + + def change_payment(self, payment_lines): + """ + Change payment of a given order. + payment_lines should be a list of data that are + the argument of the Odoo Core function add_payment() + Return a list of order ids, depending on the + payment_change_policy of the related pos_config. + """ + self.ensure_one() + orders = self + + # Removing zero lines + precision = self.pricelist_id.currency_id.decimal_places + payment_lines = [ + x + for x in payment_lines + if not float_is_zero(x["amount"], precision_digits=precision) + ] + + self._check_payment_change_allowed() + comment = self.env._( + "The payments of the Order %(order)s (Ref: %(ref)s have" + " been changed by %(user_name)s on %(today)s", + order=self.name, + ref=self.pos_reference, + user_name=self.env.user.name, + today=datetime.today(), + ) + + if self.config_id.payment_change_policy == "update": + payments = self.payment_ids + account_moves = payments.account_move_id + if account_moves: + account_moves.button_draft() + account_moves.unlink() + payments.unlink() + + # Create new payment + for line in payment_lines: + self.with_context( + skip_pos_payment_invoiced_check_amount=True + ).add_payment(line) + + if self.state == "invoiced": + self._apply_invoice_payments(self.session_id.state == "closed") + elif self.config_id.payment_change_policy == "refund": + # Refund order and mark it as paid + # with same payment method as the original one + refund_result = self.refund() + refund_order = self.browse(refund_result["res_id"]) + for payment in self.payment_ids: + refund_order.add_payment( + { + "pos_order_id": refund_order.id, + "payment_method_id": payment.payment_method_id.id, + "amount": -payment.amount, + "payment_date": fields.Date.context_today(self), + } + ) + + if self.state == "invoiced": + refund_order._generate_pos_order_invoice() + else: + refund_order.action_pos_order_paid() + # Resale order and mark it as paid + # with the new payment + resale_order = self.copy(default=self._prepare_resale_order_vals()) + for line in payment_lines: + line.update({"pos_order_id": resale_order.id}) + resale_order.add_payment(line) + if self.state == "invoiced": + resale_order._generate_pos_order_invoice() + else: + resale_order.action_pos_order_paid() + orders += refund_order + resale_order + comment += self.env._( + " (Refund Order: %(refund_order)s ; Resale Order: %(resale_order)s)", + refund_order=refund_order.name, + resale_order=resale_order.name, + ) + + for order in orders: + order.general_note = "{}\n{}".format(order.general_note or "", comment) + return orders + + def _check_payment_change_allowed(self): + """Return True if the user can change the payment of a POS, depending + of the state of the current session.""" + closed_orders = self.filtered(lambda x: x.session_id.state == "closed") + if len(closed_orders): + raise UserError( + self.env._( + "You can not change payments of the POS '%(name)s' because" + " the associated session '%(session)s' has been closed!", + name=", ".join(closed_orders.mapped("name")), + session=", ".join(closed_orders.mapped("session_id.name")), + ) + ) + + def _prepare_resale_order_vals(self): + self.ensure_one() + return { + "pos_reference": self.pos_reference, + "session_id": self.session_id.id, + } diff --git a/pos_payment_change/models/pos_payment.py b/pos_payment_change/models/pos_payment.py new file mode 100644 index 0000000000..bde7790fd3 --- /dev/null +++ b/pos_payment_change/models/pos_payment.py @@ -0,0 +1,12 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class PosPayment(models.Model): + _inherit = "pos.payment" + + def _check_amount(self): + if self.env.context.get("skip_pos_payment_invoiced_check_amount"): + self -= self.filtered(lambda x: x.state == "invoiced") + return super()._check_amount() diff --git a/pos_payment_change/models/res_config_settings.py b/pos_payment_change/models/res_config_settings.py new file mode 100644 index 0000000000..87a3fc9910 --- /dev/null +++ b/pos_payment_change/models/res_config_settings.py @@ -0,0 +1,13 @@ +# Copyright (C) 2026 - Today: GRAP (http://www.grap.coop) +# @author: Sylvain LE GAL +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + pos_payment_change_policy = fields.Selection( + related="pos_config_id.payment_change_policy", readonly=False + ) diff --git a/pos_payment_change/pyproject.toml b/pos_payment_change/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/pos_payment_change/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/pos_payment_change/readme/CONFIGURE.md b/pos_payment_change/readme/CONFIGURE.md new file mode 100644 index 0000000000..6151ecdd0e --- /dev/null +++ b/pos_payment_change/readme/CONFIGURE.md @@ -0,0 +1,19 @@ +- Go to Point of Sale > Configuration > Settings +- Edit your point of sale, and select a value for the field + 'Payment Change Policy'. + +Two options are available: + +- 'Refund and Resale': Odoo will refund the current Pos Order to cancel + it, and create a new PoS Order with the correct payment lines +- 'Update Payments': Odoo will change payment lines. + +![pos_config_form](../static/description/res_config_settings_form.png) + +**Note** In some countries the 'Update Payments' Option is not allowed +by law, because orders history shouldn't not be altered. + +For that purpose, a constrains is present to check the value of this +field. If the module `l10n_fr_certification` is installed and if the +current company has an inalterable accounting, it will not be possible +to select the value 'Update Payments'. diff --git a/pos_payment_change/readme/CONTRIBUTORS.md b/pos_payment_change/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..6be98ff3a6 --- /dev/null +++ b/pos_payment_change/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Sylvain LE GAL \<\> +- Julien WESTE +- Foram Shah \<\> +- Manuel Regidor \<\> diff --git a/pos_payment_change/readme/CREDITS.md b/pos_payment_change/readme/CREDITS.md new file mode 100644 index 0000000000..7c8befb9ce --- /dev/null +++ b/pos_payment_change/readme/CREDITS.md @@ -0,0 +1,4 @@ +The development of this module has been financially supported by: + +- GRAP, Groupement Régional Alimentaire de proximité (www.grap.coop) +- Vracoop (www.vracoop.fr) diff --git a/pos_payment_change/readme/DESCRIPTION.md b/pos_payment_change/readme/DESCRIPTION.md new file mode 100644 index 0000000000..86879e5c48 --- /dev/null +++ b/pos_payment_change/readme/DESCRIPTION.md @@ -0,0 +1,4 @@ +This module extends the functionnality of the Odoo Point of Sale to +allow the cashier to change the payments of a invoiced PoS order. + +This feature is usefull when the user realized that he did a mistake after invoice. diff --git a/pos_payment_change/readme/USAGE.md b/pos_payment_change/readme/USAGE.md new file mode 100644 index 0000000000..6b1c096b46 --- /dev/null +++ b/pos_payment_change/readme/USAGE.md @@ -0,0 +1,19 @@ +- Go to a PoS Order +- Click on the button 'Change Payments' + +![pos_order_form](../static/description/pos_order_form.png) + +- In the pop up wizard, select the real payment(s) that have been used + to pay the order + +![pos_payment_change_wizard_form](../static/description/pos_payment_change_wizard_form.png) + +- Then click on the button 'Change Payments' + +**Note** + +If the option 'Refund and Resale' is selected, changing the payments +will display the three PoS orders. the oringal one, the refund one, and +the new one. + +![pos_order_tree](../static/description/pos_order_tree.png) diff --git a/pos_payment_change/security/ir.model.access.csv b/pos_payment_change/security/ir.model.access.csv new file mode 100644 index 0000000000..913b1232b5 --- /dev/null +++ b/pos_payment_change/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_payment_change_wizard,access_pos_payment_change_wizard,model_pos_payment_change_wizard,base.group_user,1,1,1,1 +access_pos_payment_change_wizard_new_line,access_pos_payment_change_wizard_new_line,model_pos_payment_change_wizard_new_line,base.group_user,1,1,1,1 +access_pos_payment_change_wizard_old_line,access_pos_payment_change_wizard_old_line,model_pos_payment_change_wizard_old_line,base.group_user,1,1,1,1 diff --git a/pos_payment_change/static/description/icon.png b/pos_payment_change/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/pos_payment_change/static/description/icon.png differ diff --git a/pos_payment_change/static/description/index.html b/pos_payment_change/static/description/index.html new file mode 100644 index 0000000000..53e09548bb --- /dev/null +++ b/pos_payment_change/static/description/index.html @@ -0,0 +1,485 @@ + + + + + +Point Of Sale - Change Payments + + + +
+

Point Of Sale - Change Payments

+ + +

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

+

This module extends the functionnality of the Odoo Point of Sale to +allow the cashier to change the payments of a invoiced PoS order.

+

This feature is usefull when the user realized that he did a mistake +after invoice.

+

Table of contents

+ +
+

Configuration

+
    +
  • Go to Point of Sale > Configuration > Settings
  • +
  • Edit your point of sale, and select a value for the field ‘Payment +Change Policy’.
  • +
+

Two options are available:

+
    +
  • ‘Refund and Resale’: Odoo will refund the current Pos Order to cancel +it, and create a new PoS Order with the correct payment lines
  • +
  • ‘Update Payments’: Odoo will change payment lines.
  • +
+

pos_config_form

+

Note In some countries the ‘Update Payments’ Option is not allowed +by law, because orders history shouldn’t not be altered.

+

For that purpose, a constrains is present to check the value of this +field. If the module l10n_fr_certification is installed and if the +current company has an inalterable accounting, it will not be possible +to select the value ‘Update Payments’.

+
+
+

Usage

+
    +
  • Go to a PoS Order
  • +
  • Click on the button ‘Change Payments’
  • +
+

pos_order_form

+
    +
  • In the pop up wizard, select the real payment(s) that have been used +to pay the order
  • +
+

pos_payment_change_wizard_form

+
    +
  • Then click on the button ‘Change Payments’
  • +
+

Note

+

If the option ‘Refund and Resale’ is selected, changing the payments +will display the three PoS orders. the oringal one, the refund one, and +the new one.

+

pos_order_tree

+
+
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • GRAP
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The development of this module has been financially supported by:

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

legalsylvain

+

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_payment_change/static/description/pos_order_form.png b/pos_payment_change/static/description/pos_order_form.png new file mode 100644 index 0000000000..f7565d67b0 Binary files /dev/null and b/pos_payment_change/static/description/pos_order_form.png differ diff --git a/pos_payment_change/static/description/pos_order_tree.png b/pos_payment_change/static/description/pos_order_tree.png new file mode 100644 index 0000000000..71236fc7a1 Binary files /dev/null and b/pos_payment_change/static/description/pos_order_tree.png differ diff --git a/pos_payment_change/static/description/pos_payment_change_wizard_form.png b/pos_payment_change/static/description/pos_payment_change_wizard_form.png new file mode 100644 index 0000000000..5f0a44a44b Binary files /dev/null and b/pos_payment_change/static/description/pos_payment_change_wizard_form.png differ diff --git a/pos_payment_change/static/description/res_config_settings_form.png b/pos_payment_change/static/description/res_config_settings_form.png new file mode 100644 index 0000000000..be8a10b6bc Binary files /dev/null and b/pos_payment_change/static/description/res_config_settings_form.png differ diff --git a/pos_payment_change/tests/__init__.py b/pos_payment_change/tests/__init__.py new file mode 100644 index 0000000000..c2983ad535 --- /dev/null +++ b/pos_payment_change/tests/__init__.py @@ -0,0 +1 @@ +from . import test_pos_payment_change diff --git a/pos_payment_change/tests/test_pos_payment_change.py b/pos_payment_change/tests/test_pos_payment_change.py new file mode 100644 index 0000000000..7f5770c3db --- /dev/null +++ b/pos_payment_change/tests/test_pos_payment_change.py @@ -0,0 +1,347 @@ +# Copyright (C) 2018 - 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 Command, fields +from odoo.exceptions import UserError +from odoo.tests import new_test_user, tagged +from odoo.tests.common import users +from odoo.tools import mute_logger + +from odoo.addons.point_of_sale.tests.common import TestPoSCommon + + +@tagged("post_install", "-at_install") +class TestPosPaymentChange(TestPoSCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.PosOrder = cls.env["pos.order"] + cls.product = cls.create_product("Test POS Product", cls.categ_basic, 10) + cls.pos_config = cls.basic_config + cls.bank_payment_method = cls.bank_pm1 + cls.cash_payment_method = cls.cash_pm1 + + # create new session and open it + cls.pos_config.open_ui() + cls.session = cls.pos_config.current_session_id + new_test_user( + cls.env, + login="test-pos-manager", + groups="point_of_sale.group_pos_manager", + ) + + def _sale(self, payment_method_1, price_1, payment_method_2=False, price_2=0.0): + price = price_1 + price_2 + order = self.PosOrder.create( + { + "session_id": self.session.id, + "amount_tax": 0, + "amount_total": price, + "amount_paid": price, + "amount_return": 0, + "lines": [ + Command.create( + { + "name": "OL/0001", + "product_id": self.product.id, + "qty": 1.0, + "price_unit": price, + "price_subtotal": price, + "price_subtotal_incl": price, + } + ) + ], + } + ) + order.add_payment( + { + "pos_order_id": order.id, + "amount": price_1, + "payment_date": fields.Date.today(), + "payment_method_id": payment_method_1.id, + } + ) + if payment_method_2: + order.add_payment( + { + "pos_order_id": order.id, + "amount": price_2, + "payment_date": fields.Date.today(), + "payment_method_id": payment_method_2.id, + } + ) + order.action_pos_order_paid() + return order + + def _change_payment( + self, order, payment_method_1, amount_1, payment_method_2=False, amount_2=0.0 + ): + # Switch to check journal + new_line_vals = [ + Command.create( + { + "new_payment_method_id": payment_method_1.id, + "amount": amount_1, + } + ) + ] + if payment_method_2: + new_line_vals += [ + Command.create( + { + "new_payment_method_id": payment_method_2.id, + "amount": amount_2, + } + ) + ] + wizard = ( + self.env["pos.payment.change.wizard"] + .with_context(active_id=order.id) + .create({"new_line_ids": new_line_vals}) + ) + wizard.button_change_payment() + + # Test Section + def test_03_payment_change_closed_orders(self): + self.pos_config.payment_change_policy = "update" + + # Make a sale with 35 in cash journal and 65 in check + order = self._sale(self.cash_payment_method, 35, self.bank_payment_method, 65) + + self.session.state = "closed" + + with self.assertRaises(UserError): + self._change_payment( + order, self.cash_payment_method, 10, self.bank_payment_method, 90 + ) + + @users("test-pos-manager") + def test_04_payment_change_security_01(self): + self.pos_config.payment_change_policy = "refund" + order = self._sale(self.cash_payment_method, 35, self.bank_payment_method, 65) + + self.assertEqual(order.state, "paid") + self.assertEqual(len(order.payment_ids), 2) + self.assertEqual(order.amount_paid, 100) + self._change_payment(order, self.cash_payment_method, 100) + refund = order.mapped("lines.refund_orderline_ids.order_id") + self.assertEqual(refund.state, "paid") + self.assertEqual(len(refund.payment_ids), 2) + self.assertEqual(refund.amount_paid, -100) + cash_refund_payment = refund.payment_ids.filtered( + lambda x: x.payment_method_id == self.cash_payment_method + ) + self.assertEqual(cash_refund_payment.amount, -35) + bank_refund_payment = refund.payment_ids.filtered( + lambda x: x.payment_method_id == self.bank_payment_method + ) + self.assertEqual(bank_refund_payment.amount, -65) + resale_order = self.env["pos.order"].search( + [ + ("pos_reference", "=", order.pos_reference), + ("session_id", "=", order.session_id.id), + ("id", "not in", (order + refund).ids), + ] + ) + self.assertEqual(resale_order.state, "paid") + self.assertEqual(resale_order.amount_paid, 100) + self.assertEqual(len(resale_order.payment_ids), 1) + self.assertEqual( + resale_order.payment_ids.payment_method_id, self.cash_payment_method + ) + + @users("test-pos-manager") + def test_04_payment_change_security_02(self): + self.pos_config.payment_change_policy = "refund" + order = self._sale(self.cash_payment_method, 100) + self.assertEqual(order.state, "paid") + self.assertEqual(len(order.payment_ids), 1) + self.assertEqual(order.amount_paid, 100) + self._change_payment(order, self.bank_payment_method, 100) + refund = order.mapped("lines.refund_orderline_ids.order_id") + self.assertEqual(refund.state, "paid") + self.assertEqual(len(refund.payment_ids), 1) + self.assertEqual(refund.amount_paid, -100) + self.assertEqual(refund.payment_ids.payment_method_id, self.cash_payment_method) + resale_order = self.env["pos.order"].search( + [ + ("pos_reference", "=", order.pos_reference), + ("session_id", "=", order.session_id.id), + ("id", "not in", (order + refund).ids), + ] + ) + self.assertEqual(resale_order.state, "paid") + self.assertEqual(resale_order.amount_paid, 100) + self.assertEqual(len(resale_order.payment_ids), 1) + self.assertEqual( + resale_order.payment_ids.payment_method_id, self.bank_payment_method + ) + + @mute_logger("odoo.models.unlink") + def test_05_payment_change_update_invoiced_orders(self): + self.pos_config.payment_change_policy = "update" + customer = self.env["res.partner"].create({"name": "Test customer"}) + price = 100 + order = self.PosOrder.create( + { + "session_id": self.session.id, + "partner_id": customer.id, + "amount_tax": 0, + "amount_total": price, + "amount_paid": price, + "amount_return": 0, + "to_invoice": True, + "lines": [ + Command.create( + { + "name": "OL/0001", + "product_id": self.product.id, + "qty": 1.0, + "price_unit": price, + "price_subtotal": price, + "price_subtotal_incl": price, + } + ) + ], + } + ) + order.add_payment( + { + "pos_order_id": order.id, + "amount": price, + "payment_date": "2026-01-01", + "payment_method_id": self.cash_payment_method.id, + } + ) + order.action_pos_order_invoice() + self.assertEqual(order.state, "invoiced") + invoice = order.account_move + self.assertEqual(len(order.payment_ids), 1) + old_move = order.payment_ids.account_move_id + # Change payment (from cash to bank) + self._change_payment(order, self.bank_payment_method, 100) + self.assertEqual(len(order.payment_ids), 1) + payment = order.payment_ids + self.assertEqual(payment.payment_method_id, self.bank_payment_method) + self.assertEqual(payment.amount, 100) + self.assertEqual(payment.payment_date.date(), fields.Date.today()) + self.assertFalse(old_move.exists()) + self.assertEqual(order.state, "invoiced") + self.assertEqual(invoice.state, "posted") + self.assertEqual(invoice.payment_state, "paid") + new_move = order.payment_ids.account_move_id + self.assertEqual(new_move.state, "posted") + self.assertEqual(new_move.date, fields.Date.today()) + # Change payment_again (80 cash, 20 bank) + self._change_payment( + order, self.cash_payment_method, 80, self.bank_payment_method, 20 + ) + self.assertFalse(new_move.exists()) + self.assertEqual(len(order.payment_ids), 2) + cash_payment = order.payment_ids.filtered( + lambda x: x.payment_method_id == self.cash_payment_method + ) + self.assertEqual(cash_payment.amount, 80) + cash_payment_move = cash_payment.account_move_id + self.assertEqual(cash_payment_move.state, "posted") + self.assertEqual(cash_payment_move.amount_total, 80) + bank_payment = order.payment_ids.filtered( + lambda x: x.payment_method_id == self.bank_payment_method + ) + self.assertEqual(bank_payment.amount, 20) + bank_payment_move = bank_payment.account_move_id + self.assertEqual(bank_payment_move.state, "posted") + self.assertEqual(bank_payment_move.amount_total, 20) + self.assertEqual(invoice.state, "posted") + self.assertEqual(invoice.payment_state, "paid") + + @mute_logger("odoo.models.unlink") + def test_06_payment_change_refund_invoiced_orders(self): + self.pos_config.payment_change_policy = "refund" + customer = self.env["res.partner"].create({"name": "Test customer"}) + price = 100 + order = self.PosOrder.create( + { + "session_id": self.session.id, + "partner_id": customer.id, + "amount_tax": 0, + "amount_total": price, + "amount_paid": price, + "amount_return": 0, + "to_invoice": True, + "lines": [ + Command.create( + { + "name": "OL/0001", + "product_id": self.product.id, + "qty": 1.0, + "price_unit": price, + "price_subtotal": price, + "price_subtotal_incl": price, + } + ) + ], + } + ) + order.add_payment( + { + "pos_order_id": order.id, + "amount": price, + "payment_date": "2026-01-01", + "payment_method_id": self.cash_payment_method.id, + } + ) + order.action_pos_order_invoice() + self.assertEqual(order.state, "invoiced") + invoice = order.account_move + self.assertEqual(len(order.payment_ids), 1) + old_move = order.payment_ids.account_move_id + # Change payment (from cash to bank) + self._change_payment(order, self.bank_payment_method, 100) + self.assertEqual(order.amount_paid, 100) + self.assertEqual(len(order.payment_ids), 1) + payment = order.payment_ids + self.assertEqual(payment.payment_method_id, self.cash_payment_method) + self.assertEqual(payment.amount, 100) + self.assertEqual( + payment.payment_date.date(), fields.Date.from_string("2026-01-01") + ) + self.assertTrue(old_move.exists()) + self.assertEqual(old_move.state, "posted") + self.assertEqual(order.state, "invoiced") + self.assertEqual(invoice.state, "posted") + self.assertEqual(invoice.payment_state, "paid") + refund = order.mapped("lines.refund_orderline_ids.order_id") + self.assertEqual(refund.state, "invoiced") + self.assertEqual(len(refund.payment_ids), 1) + refund_payment = refund.payment_ids + self.assertTrue(refund_payment.account_move_id) + self.assertEqual(refund_payment.account_move_id.state, "posted") + self.assertEqual(refund_payment.payment_method_id, self.cash_payment_method) + self.assertEqual(refund_payment.amount, -100) + self.assertEqual(refund.amount_paid, -100) + self.assertEqual(refund.state, "invoiced") + refund_invoice = refund.account_move + self.assertEqual(refund_invoice.move_type, "out_refund") + self.assertEqual(refund_invoice.state, "posted") + self.assertEqual(refund_invoice.payment_state, "reversed") + resale_order = self.env["pos.order"].search( + [ + ("pos_reference", "=", order.pos_reference), + ("session_id", "=", order.session_id.id), + ("id", "not in", (order + refund).ids), + ] + ) + self.assertEqual(resale_order.state, "invoiced") + self.assertEqual(resale_order.amount_paid, 100) + self.assertEqual(len(resale_order.payment_ids), 1) + resale_payment = resale_order.payment_ids + self.assertTrue(resale_payment.account_move_id) + self.assertEqual(resale_payment.account_move_id.state, "posted") + self.assertEqual(resale_payment.payment_method_id, self.bank_payment_method) + self.assertEqual(resale_payment.amount, 100) + extra_invoice = resale_order.account_move + self.assertEqual(extra_invoice.move_type, "out_invoice") + self.assertEqual(extra_invoice.state, "posted") + self.assertEqual(extra_invoice.payment_state, "paid") diff --git a/pos_payment_change/views/view_pos_order.xml b/pos_payment_change/views/view_pos_order.xml new file mode 100644 index 0000000000..450fcf19c2 --- /dev/null +++ b/pos_payment_change/views/view_pos_order.xml @@ -0,0 +1,23 @@ + + + + + pos.order + + + + + + diff --git a/pos_payment_change/views/view_res_config_settings.xml b/pos_payment_change/views/view_res_config_settings.xml new file mode 100644 index 0000000000..009830a22d --- /dev/null +++ b/pos_payment_change/views/view_res_config_settings.xml @@ -0,0 +1,32 @@ + + + + + res.config.settings + + + + +
+ +
+
+ Payment Change Policy when users want to change the payment lines of a given PoS Order. +
    +
  • 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, and create a new PoS Order with the correct payment lines. +
  • +
  • 'Update Payments': Odoo will change payment lines. +
  • +
+ Note : In some countries the 'Update Payments' option is not allowed by law, because orders history shouldn't not be altered. +
+
+
+
+
+
diff --git a/pos_payment_change/wizards/__init__.py b/pos_payment_change/wizards/__init__.py new file mode 100644 index 0000000000..6aff511ae0 --- /dev/null +++ b/pos_payment_change/wizards/__init__.py @@ -0,0 +1,3 @@ +from . import pos_payment_change_wizard +from . import pos_payment_change_wizard_new_line +from . import pos_payment_change_wizard_old_line diff --git a/pos_payment_change/wizards/pos_payment_change_wizard.py b/pos_payment_change/wizards/pos_payment_change_wizard.py new file mode 100644 index 0000000000..58b218849a --- /dev/null +++ b/pos_payment_change/wizards/pos_payment_change_wizard.py @@ -0,0 +1,108 @@ +# Copyright (C) 2015-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 Command, api, fields, models +from odoo.exceptions import UserError +from odoo.tools import float_compare + + +class PosPaymentChangeWizard(models.TransientModel): + _name = "pos.payment.change.wizard" + _description = "PoS Payment Change Wizard" + + # Column Section + order_id = fields.Many2one(comodel_name="pos.order", string="Order", readonly=True) + + old_line_ids = fields.One2many( + comodel_name="pos.payment.change.wizard.old.line", + inverse_name="wizard_id", + string="Old Payment Lines", + readonly=True, + ) + + new_line_ids = fields.One2many( + comodel_name="pos.payment.change.wizard.new.line", + inverse_name="wizard_id", + string="New Payment Lines", + ) + + amount_total = fields.Float(string="Total", readonly=True) + + # View Section + @api.model + def default_get(self, fields): + PosOrder = self.env["pos.order"] + res = super().default_get(fields) + order = PosOrder.browse(self._context.get("active_id")) + old_lines_vals = [ + Command.create( + { + "payment_date": payment.payment_date, + "old_payment_method_id": payment.payment_method_id.id, + "amount": payment.amount, + }, + ) + for payment in order.payment_ids + ] + res.update( + { + "order_id": order.id, + "amount_total": order.amount_total, + "old_line_ids": old_lines_vals, + } + ) + return res + + # View section + def button_change_payment(self): + self.ensure_one() + order = self.order_id + + # Check if the total is correct + total = sum(self.mapped("new_line_ids.amount")) + if ( + float_compare( + total, + self.amount_total, + precision_rounding=order.currency_id.rounding, + ) + != 0 + ): + raise UserError( + self.env._( + "Differences between the two values for the POS" + " Order '%(name)s':\n\n" + " * Total of all the new payments %(total)s;\n" + " * Total of the POS Order %(amount_total)s;\n\n" + "Please change the payments.", + name=order.name, + total=total, + amount_total=order.amount_total, + ) + ) + + # Change payment + new_payments = [ + { + "pos_order_id": order.id, + "payment_method_id": line.new_payment_method_id.id, + "amount": line.amount, + "payment_date": line.payment_date, + } + for line in self.new_line_ids + ] + + orders = order.change_payment(new_payments) + + if len(orders) == 1: + # if policy is 'update', only close the pop up + return {"type": "ir.actions.act_window_close"} + else: + # otherwise (refund policy), displays the 3 orders + action = self.env["ir.actions.act_window"]._for_xml_id( + "point_of_sale.action_pos_pos_form" + ) + action["domain"] = [("id", "in", orders.ids)] + + return action diff --git a/pos_payment_change/wizards/pos_payment_change_wizard_new_line.py b/pos_payment_change/wizards/pos_payment_change_wizard_new_line.py new file mode 100644 index 0000000000..fb2cf25782 --- /dev/null +++ b/pos_payment_change/wizards/pos_payment_change_wizard_new_line.py @@ -0,0 +1,57 @@ +# Copyright (C) 2015 - 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 api, fields, models + + +class PosPaymentChangeWizardLine(models.TransientModel): + _name = "pos.payment.change.wizard.new.line" + _description = "PoS Payment Change Wizard New Line" + + wizard_id = fields.Many2one( + comodel_name="pos.payment.change.wizard", + required=True, + ondelete="cascade", + ) + payment_date = fields.Datetime( + required=True, + default=lambda self: fields.Datetime.now(), + ) + new_payment_method_id = fields.Many2one( + comodel_name="pos.payment.method", + string="Payment Method", + required=True, + domain="[('id', 'in', available_payment_method_ids)]", + ) + available_payment_method_ids = fields.Many2many( + comodel_name="pos.payment.method", + related="wizard_id.order_id.session_id.payment_method_ids", + ) + + company_currency_id = fields.Many2one( + comodel_name="res.currency", + store=True, + related="new_payment_method_id.company_id.currency_id", + string="Company Currency", + readonly=True, + help="Utility field to express amount currency", + ) + + amount = fields.Monetary( + required=True, + default=0.0, + currency_field="company_currency_id", + ) + + # View Section + @api.model + def default_get(self, fields): + res = super().default_get(fields) + if "new_line_ids" not in self._context: + return res + balance = self._context.get("amount_total", 0.0) + for line in self.wizard_id.old_line_ids: + balance -= line.get("amount") + res.update({"amount": balance}) + return res diff --git a/pos_payment_change/wizards/pos_payment_change_wizard_old_line.py b/pos_payment_change/wizards/pos_payment_change_wizard_old_line.py new file mode 100644 index 0000000000..b3f42af1b7 --- /dev/null +++ b/pos_payment_change/wizards/pos_payment_change_wizard_old_line.py @@ -0,0 +1,41 @@ +# Copyright (C) 2015 - 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 PosPaymentChangeWizardOldLine(models.TransientModel): + _name = "pos.payment.change.wizard.old.line" + _description = "PoS Payment Change Wizard Old Line" + + wizard_id = fields.Many2one( + comodel_name="pos.payment.change.wizard", + required=True, + ondelete="cascade", + ) + payment_date = fields.Datetime( + readonly=True, + ) + old_payment_method_id = fields.Many2one( + comodel_name="pos.payment.method", + string="Payment Method", + required=True, + readonly=True, + ) + + company_currency_id = fields.Many2one( + comodel_name="res.currency", + store=True, + related="old_payment_method_id.company_id.currency_id", + string="Company Currency", + readonly=True, + help="Utility field to express amount currency", + ) + + amount = fields.Monetary( + required=True, + readonly=True, + default=0.0, + currency_field="company_currency_id", + ) diff --git a/pos_payment_change/wizards/view_pos_payment_change_wizard.xml b/pos_payment_change/wizards/view_pos_payment_change_wizard.xml new file mode 100644 index 0000000000..f8e9c54e2f --- /dev/null +++ b/pos_payment_change/wizards/view_pos_payment_change_wizard.xml @@ -0,0 +1,62 @@ + + + + + pos.payment.change.wizard + +
+ + + + +
+
+
+
+
+ + + Change Payments + pos.payment.change.wizard + form + new + +
diff --git a/pos_user_restriction/tests/test_hacks.py b/pos_user_restriction/tests/test_hacks.py index e031041457..4b63e410a2 100644 --- a/pos_user_restriction/tests/test_hacks.py +++ b/pos_user_restriction/tests/test_hacks.py @@ -1,4 +1,4 @@ -from odoo.tests import tagged +from odoo.tests import new_test_user, tagged from odoo.addons.point_of_sale.tests.common import TestPoSCommon @@ -8,29 +8,10 @@ class TestHacks(TestPoSCommon): @classmethod def setUpClass(cls): super().setUpClass() - cls.env = cls.env( - context=dict( - cls.env.context, - tracking_disable=True, - no_reset_password=True, - ) - ) - cls.pos_user_assigned_pos = cls.env["res.users"].create( - { - "login": "pos_user_assigned_pos", - "name": "pos_user_assigned_pos", - "groups_id": [ - ( - 6, - 0, - [ - cls.env.ref( - "pos_user_restriction.group_assigned_points_of_sale_user" - ).id - ], - ) - ], - } + cls.pos_user_assigned_pos = new_test_user( + cls.env, + login="pos_user_assigned_pos", + groups="pos_user_restriction.group_assigned_points_of_sale_user", ) cls.config = cls.basic_config @@ -56,7 +37,7 @@ def test_validate_session(self): { "company_id": self.env.company.id, "session_id": session.id, - "partner_id": self.env.user.id, + "partner_id": self.customer.id, "lines": [ ( 0, diff --git a/pos_user_restriction/tests/test_pos_user_restriction.py b/pos_user_restriction/tests/test_pos_user_restriction.py index 2d7764de51..1460bd88f3 100644 --- a/pos_user_restriction/tests/test_pos_user_restriction.py +++ b/pos_user_restriction/tests/test_pos_user_restriction.py @@ -1,40 +1,21 @@ -from odoo.tests.common import TransactionCase +from odoo.tests import new_test_user +from odoo.addons.base.tests.common import BaseCommon -class TestUserRestriction(TransactionCase): + +class TestUserRestriction(BaseCommon): @classmethod def setUpClass(cls): super().setUpClass() - cls.env = cls.env( - context=dict( - cls.env.context, - tracking_disable=True, - no_reset_password=True, - ) - ) - cls.pos_user = cls.env["res.users"].create( - { - "login": "pos_user", - "name": "pos_user", - "groups_id": [(6, 0, [cls.env.ref("point_of_sale.group_pos_user").id])], - } + cls.pos_user = new_test_user( + cls.env, + login="pos_user", + groups="point_of_sale.group_pos_user", ) - cls.pos_user_assigned_pos = cls.env["res.users"].create( - { - "login": "pos_user_assigned_pos", - "name": "pos_user_assigned_pos", - "groups_id": [ - ( - 6, - 0, - [ - cls.env.ref( - "pos_user_restriction.group_assigned_points_of_sale_user" - ).id - ], - ) - ], - } + cls.pos_user_assigned_pos = new_test_user( + cls.env, + login="pos_user_assigned_pos", + groups="pos_user_restriction.group_assigned_points_of_sale_user", ) cls.pos_config_main = cls.env.ref("point_of_sale.pos_config_main") cls.pos_config_model = cls.env["pos.config"]