From 3c6a83f02f436e2253bd51484032ac5d9d63af74 Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Wed, 20 Nov 2024 09:44:54 +0100 Subject: [PATCH] [IMP] pos_sale_order: Warn about paying an invoice of a pos order --- pos_sale_order/__manifest__.py | 1 + pos_sale_order/i18n/fr.po | 180 ++++++++++-------- pos_sale_order/i18n/pos_sale_order.pot | 77 ++++++-- pos_sale_order/wizards/__init__.py | 1 + .../wizards/account_payment_register.py | 25 +++ .../account_payment_register_views.xml | 34 ++++ 6 files changed, 220 insertions(+), 98 deletions(-) create mode 100644 pos_sale_order/wizards/account_payment_register.py create mode 100644 pos_sale_order/wizards/account_payment_register_views.xml diff --git a/pos_sale_order/__manifest__.py b/pos_sale_order/__manifest__.py index b3f7324..a2c2e5b 100644 --- a/pos_sale_order/__manifest__.py +++ b/pos_sale_order/__manifest__.py @@ -29,6 +29,7 @@ "security/ir.model.access.csv", "wizards/pos_payment_wizard_view.xml", "wizards/pos_delivery_wizard_view.xml", + "wizards/account_payment_register_views.xml", "views/sale_view.xml", "views/pos_payment_method_views.xml", "views/point_of_sale_view.xml", diff --git a/pos_sale_order/i18n/fr.po b/pos_sale_order/i18n/fr.po index 65226f1..77f00ff 100644 --- a/pos_sale_order/i18n/fr.po +++ b/pos_sale_order/i18n/fr.po @@ -4,24 +4,33 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-26 17:34+0000\n" -"PO-Revision-Date: 2015-02-26 18:41+0100\n" -"Last-Translator: David BEAL \n" -"Language-Team: Akretion \n" -"Language: fr_FR\n" +"POT-Creation-Date: 2024-11-20 08:38+0000\n" +"PO-Revision-Date: 2024-11-20 08:38+0000\n" +"Last-Translator: \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" -"X-Poedit-SourceCharset: UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_sale_order +#: model:ir.model,name:pos_sale_order.model_account_move +msgid "Account Move" +msgstr "Pièces Comptables" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__amount msgid "Amount" msgstr "Montant" +#. module: pos_sale_order +#: code:addons/pos_sale_order/wizards/pos_payment_wizard.py:0 +#, python-format +msgid "Amount must be superior to 0" +msgstr "Le montant doit être supérieur à 0" + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__anonymous_partner_id msgid "Anonymous Partner" @@ -30,27 +39,29 @@ msgstr "Client Anonyme" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__iface_print_auto msgid "Automatic Receipt Printing" -msgstr "" +msgstr "Impression automatique du reçu" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__available_payment_method_ids msgid "Available Payment Method" -msgstr "" +msgstr "Méthode de paiement disponible " #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_account_bank_statement msgid "Bank Statement" -msgstr "" +msgstr "Relevé bancaire" #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_account_bank_statement_line msgid "Bank Statement Line" -msgstr "" +msgstr "Ligne de relevé bancaire" #. module: pos_sale_order #: model:ir.model.fields,help:pos_sale_order.field_pos_config__iface_print_via_proxy msgid "Bypass browser printing and prints via the hardware proxy." msgstr "" +"Contourner l'impression via le navigateur pour imprimer via le proxy " +"matériel." #. module: pos_sale_order #: model_terms:ir.ui.view,arch_db:pos_sale_order.pos_delivery_wizard_view_form @@ -58,10 +69,15 @@ msgstr "" msgid "Cancel" msgstr "Annuler" +#. module: pos_sale_order +#: model:ir.model,name:pos_sale_order.model_cash_box_out +msgid "Cash Box Out" +msgstr "Sortie de caisse" + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__company_id msgid "Company" -msgstr "" +msgstr "Société" #. module: pos_sale_order #: model_terms:ir.ui.view,arch_db:pos_sale_order.pos_delivery_wizard_view_form @@ -71,37 +87,38 @@ msgstr "Valider" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__currency_rate msgid "Conversion Rate" -msgstr "" +msgstr "Taux de conversion" #. module: pos_sale_order #: model:ir.model.fields,help:pos_sale_order.field_pos_payment__currency_rate msgid "Conversion rate from company currency to order currency." msgstr "" +"Taux de conversion de la devise de la société vers la devise de la commande." #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__create_uid #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__create_uid #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__create_uid msgid "Created by" -msgstr "" +msgstr "Créé par" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__create_date #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__create_date #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__create_date msgid "Created on" -msgstr "" +msgstr "Créé le" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__currency_id msgid "Currency" -msgstr "" +msgstr "Devise" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__partner_id #: model:ir.ui.menu,name:pos_sale_order.menu_pos_customer msgid "Customer" -msgstr "" +msgstr "Client" #. module: pos_sale_order #: model_terms:ir.ui.view,arch_db:pos_sale_order.pos_delivery_wizard_view_form @@ -121,6 +138,8 @@ msgstr "Retrait" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_account_move__display_name +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__display_name +#: model:ir.model.fields,field_description:pos_sale_order.field_cash_box_out__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__display_name @@ -132,7 +151,7 @@ msgstr "Retrait" #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order_line__display_name msgid "Display Name" -msgstr "" +msgstr "Nom affiché" #. module: pos_sale_order #: model:ir.model.fields.selection,name:pos_sale_order.selection__sale_order__pos_payment_state__done @@ -142,7 +161,7 @@ msgstr "Fait" #. module: pos_sale_order #: code:addons/pos_sale_order/wizards/pos_delivery_wizard.py:0 -#, fuzzy, python-format +#, python-format msgid "" "Fail to deliver picking have been split, please do it from delivery menu" msgstr "" @@ -166,15 +185,36 @@ msgid "Following order have a draft invoice, please fix it %s" msgstr "" "Les commandes suivant ont des factures brouillons, merci de corriger %s" +#. module: pos_sale_order +#: code:addons/pos_sale_order/models/pos_session.py:0 +#, python-format +msgid "" +"Following sales are not invoiced, please invoice it: \n" +"- %s" +msgstr "" +"Les commandes suivantes ne sont pas facturées, merci de les facturer: \n" +"- %s" + #. module: pos_sale_order #: model:res.groups,name:pos_sale_order.group_show_pos_order msgid "Group to show pos order (do not use)" msgstr "" "Groupe pour afficher le menu natif du points de vente (ne pas utiliser)" +#. module: pos_sale_order +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__pos_warning_confirmed +msgid "" +"I read and understood the above warning and I confirm that I want to proceed" +" with the payment anyway." +msgstr "" +"J'ai lu et compris l'avertissement ci-dessus et je confirme que je souhaite " +"procéder au paiement tout de même." + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__id #: model:ir.model.fields,field_description:pos_sale_order.field_account_move__id +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__id +#: model:ir.model.fields,field_description:pos_sale_order.field_cash_box_out__id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__id @@ -186,27 +226,13 @@ msgstr "" #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__id #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order_line__id msgid "ID" -msgstr "" +msgstr "Identifiant" #. module: pos_sale_order #: model:ir.model.fields,help:pos_sale_order.field_pos_payment_method__split_transactions msgid "If ticked, each payment will generate a separated journal item." msgstr "" -#. module: pos_sale_order -#: code:addons/pos_sale_order/models/pos_session.py:0 -#, python-format -msgid "" -"Impossible to reconcile all the entries.\n" -"Please check that the following ones are invoiced:\n" -"\n" -"%s" -msgstr "" -"Impossible de lettrer les écritures.\n" -"Veuillez vérifier que les commandes suivantes sont bien facturé:\n" -"\n" -"%s" - #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_account_invoice #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__account_move @@ -220,18 +246,12 @@ msgstr "Factures" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__is_invoiced -#, fuzzy msgid "Is Invoiced" msgstr "Facture" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_method__cash_journal_id msgid "Journal" -msgstr "Journal" - -#. module: pos_sale_order -#: model:ir.model,name:pos_sale_order.model_account_move -msgid "Journal Entry" msgstr "" #. module: pos_sale_order @@ -242,6 +262,8 @@ msgstr "" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_account_move____last_update +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register____last_update +#: model:ir.model.fields,field_description:pos_sale_order.field_cash_box_out____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line____last_update @@ -253,21 +275,21 @@ msgstr "" #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order_line____last_update msgid "Last Modified on" -msgstr "" +msgstr "Dernière modification le" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__write_uid #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__write_uid #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__write_uid msgid "Last Updated by" -msgstr "" +msgstr "Mis à jour par" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__write_date #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__write_date #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__write_date msgid "Last Updated on" -msgstr "" +msgstr "Mis à jour le" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__line_ids @@ -294,7 +316,7 @@ msgstr "" #. module: pos_sale_order #: code:addons/pos_sale_order/models/pos_invoice.py:0 -#, fuzzy, python-format +#, python-format msgid "No link to an invoice for %s." msgstr "Aucune facture pour %s., " @@ -307,11 +329,10 @@ msgstr "Non nécessaire" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__picking_type_id msgid "Operation Type" -msgstr "" +msgstr "Type d'opération" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__pos_order_id -#, fuzzy msgid "Order" msgstr "Commandes" @@ -337,7 +358,7 @@ msgstr "Montant point de vente à payer" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__amount_paid msgid "Paid" -msgstr "" +msgstr "Payé" #. module: pos_sale_order #: code:addons/pos_sale_order/models/sale_order.py:0 @@ -358,13 +379,11 @@ msgstr "Paiement" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__payment_method_id -#, fuzzy msgid "Payment Method" msgstr "Mode de paiement" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__payment_method_id -#, fuzzy msgid "Payment method" msgstr "Mode de paiement" @@ -393,7 +412,6 @@ msgstr "Merci de choisir le journal et le saisir le montant à payer" #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__session_id #: model:ir.model.fields,field_description:pos_sale_order.field_account_move__session_id #: model:ir.model.fields,field_description:pos_sale_order.field_account_payment__session_id -#, fuzzy msgid "PoS Session" msgstr "Session" @@ -406,39 +424,33 @@ msgstr "Point de vente" #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_pos_config -#, fuzzy msgid "Point of Sale Configuration" -msgstr "Point de vente" +msgstr "" #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_report_point_of_sale_report_invoice -#, fuzzy msgid "Point of Sale Invoice Report" -msgstr "Point de vente" +msgstr "" #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_pos_order -#, fuzzy msgid "Point of Sale Orders" -msgstr "Point de vente" +msgstr "" #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_pos_payment_method -#, fuzzy msgid "Point of Sale Payment Methods" msgstr "Point de vente" #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_pos_payment -#, fuzzy msgid "Point of Sale Payments" msgstr "Point de vente" #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_pos_session -#, fuzzy msgid "Point of Sale Session" -msgstr "Point de vente" +msgstr "" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__pos_anonyme_invoice @@ -470,7 +482,7 @@ msgstr "Assitant de paiement" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__iface_print_via_proxy msgid "Print via Proxy" -msgstr "" +msgstr "Imprimer via un proxy" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__product_id @@ -492,27 +504,25 @@ msgstr "Devis" msgid "Receipt Ref" msgstr "Réf PdV" +#. module: pos_sale_order +#: model:ir.model,name:pos_sale_order.model_account_payment_register +msgid "Register Payment" +msgstr "Enregistrer un paiement" + #. module: pos_sale_order #: model:ir.actions.act_window,name:pos_sale_order.action_sale_order_pos +#: model:ir.model,name:pos_sale_order.model_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__pos_sale_order_id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__pos_sale_order_id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__sale_order_id #: model_terms:ir.ui.view,arch_db:pos_sale_order.sale_order_view_tree -#, fuzzy msgid "Sale Order" msgstr "Commandes de Vente" -#. module: pos_sale_order -#: model:ir.model,name:pos_sale_order.model_sale_order -#, fuzzy -msgid "Sales Order" -msgstr "Commandes de Vente" - #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_sale_order_line -#, fuzzy msgid "Sales Order Line" -msgstr "Ligne de commandes de Vente" +msgstr "Ligne de bons de commande" #. module: pos_sale_order #: model_terms:ir.ui.view,arch_db:pos_sale_order.pos_delivery_wizard_view_form @@ -523,17 +533,22 @@ msgstr "Choisir les produits à livrer" #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__session_id #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__session_id msgid "Session" -msgstr "Session" +msgstr "" + +#. module: pos_sale_order +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__should_display_pos_warning +msgid "Should Display Pos Warning" +msgstr "Afficher l'avertissement du point de vente" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__iface_print_skip_screen msgid "Skip Preview Screen" -msgstr "" +msgstr "Passer l'écran Aperçu" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_method__split_transactions msgid "Split Transactions" -msgstr "" +msgstr "Diviser les transactions" #. module: pos_sale_order #: code:addons/pos_sale_order/models/pos_session.py:0 @@ -564,11 +579,12 @@ msgid "" "The receipt screen will be skipped if the receipt can be printed " "automatically." msgstr "" +"L'écran de reçu sera passé si le reçu peut être imprimé automatiquement. " #. module: pos_sale_order #: model:ir.model.fields,help:pos_sale_order.field_pos_config__iface_print_auto msgid "The receipt will automatically be printed at the end of each order." -msgstr "" +msgstr "Le reçu sera automatiquement imprimé à la fin de chaque commande." #. module: pos_sale_order #: code:addons/pos_sale_order/wizards/pos_payment_wizard.py:0 @@ -580,13 +596,13 @@ msgstr "" #. module: pos_sale_order #: code:addons/pos_sale_order/models/pos_session.py:0 +#: code:addons/pos_sale_order/models/pos_session.py:0 #, python-format msgid "This session is already closed." -msgstr "" +msgstr "Cette session est déjà fermée." #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__to_invoice -#, fuzzy msgid "To invoice" msgstr "Facture" @@ -600,6 +616,14 @@ msgstr "Unité à livrer" msgid "Warehouse" msgstr "Entrepots" +#. module: pos_sale_order +#: model_terms:ir.ui.view,arch_db:pos_sale_order.view_account_payment_register_form +msgid "" +"Warning: This payment will be done on an invoice for a point of sale order." +msgstr "" +"Attention: Ce paiement sera effectué sur une facture pour une commande de " +"point de vente." + #. module: pos_sale_order #: code:addons/pos_sale_order/models/sale_order.py:0 #, python-format diff --git a/pos_sale_order/i18n/pos_sale_order.pot b/pos_sale_order/i18n/pos_sale_order.pot index ec530a4..37c3ff0 100644 --- a/pos_sale_order/i18n/pos_sale_order.pot +++ b/pos_sale_order/i18n/pos_sale_order.pot @@ -6,6 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-20 08:39+0000\n" +"PO-Revision-Date: 2024-11-20 08:39+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -13,11 +15,22 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: pos_sale_order +#: model:ir.model,name:pos_sale_order.model_account_move +msgid "Account Move" +msgstr "" + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__amount msgid "Amount" msgstr "" +#. module: pos_sale_order +#: code:addons/pos_sale_order/wizards/pos_payment_wizard.py:0 +#, python-format +msgid "Amount must be superior to 0" +msgstr "" + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__anonymous_partner_id msgid "Anonymous Partner" @@ -54,6 +67,11 @@ msgstr "" msgid "Cancel" msgstr "" +#. module: pos_sale_order +#: model:ir.model,name:pos_sale_order.model_cash_box_out +msgid "Cash Box Out" +msgstr "" + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__company_id msgid "Company" @@ -117,6 +135,8 @@ msgstr "" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_account_move__display_name +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__display_name +#: model:ir.model.fields,field_description:pos_sale_order.field_cash_box_out__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__display_name #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__display_name @@ -157,14 +177,31 @@ msgstr "" msgid "Following order have a draft invoice, please fix it %s" msgstr "" +#. module: pos_sale_order +#: code:addons/pos_sale_order/models/pos_session.py:0 +#, python-format +msgid "" +"Following sales are not invoiced, please invoice it: \n" +"- %s" +msgstr "" + #. module: pos_sale_order #: model:res.groups,name:pos_sale_order.group_show_pos_order msgid "Group to show pos order (do not use)" msgstr "" +#. module: pos_sale_order +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__pos_warning_confirmed +msgid "" +"I read and understood the above warning and I confirm that I want to proceed" +" with the payment anyway." +msgstr "" + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__id #: model:ir.model.fields,field_description:pos_sale_order.field_account_move__id +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__id +#: model:ir.model.fields,field_description:pos_sale_order.field_cash_box_out__id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard__id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line__id @@ -183,16 +220,6 @@ msgstr "" msgid "If ticked, each payment will generate a separated journal item." msgstr "" -#. module: pos_sale_order -#: code:addons/pos_sale_order/models/pos_session.py:0 -#, python-format -msgid "" -"Impossible to reconcile all the entries.\n" -"Please check that the following ones are invoiced:\n" -"\n" -"%s" -msgstr "" - #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_account_invoice #: model:ir.model.fields,field_description:pos_sale_order.field_sale_order__account_move @@ -214,11 +241,6 @@ msgstr "" msgid "Journal" msgstr "" -#. module: pos_sale_order -#: model:ir.model,name:pos_sale_order.model_account_move -msgid "Journal Entry" -msgstr "" - #. module: pos_sale_order #: model:ir.model.fields,help:pos_sale_order.field_pos_payment_method__cash_journal_id msgid "Journal used for generating payment" @@ -227,6 +249,8 @@ msgstr "" #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_account_move____last_update +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register____last_update +#: model:ir.model.fields,field_description:pos_sale_order.field_cash_box_out____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard____last_update #: model:ir.model.fields,field_description:pos_sale_order.field_pos_delivery_wizard_line____last_update @@ -467,8 +491,14 @@ msgstr "" msgid "Receipt Ref" msgstr "" +#. module: pos_sale_order +#: model:ir.model,name:pos_sale_order.model_account_payment_register +msgid "Register Payment" +msgstr "" + #. module: pos_sale_order #: model:ir.actions.act_window,name:pos_sale_order.action_sale_order_pos +#: model:ir.model,name:pos_sale_order.model_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_account_bank_statement_line__pos_sale_order_id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment__pos_sale_order_id #: model:ir.model.fields,field_description:pos_sale_order.field_pos_payment_wizard__sale_order_id @@ -476,11 +506,6 @@ msgstr "" msgid "Sale Order" msgstr "" -#. module: pos_sale_order -#: model:ir.model,name:pos_sale_order.model_sale_order -msgid "Sales Order" -msgstr "" - #. module: pos_sale_order #: model:ir.model,name:pos_sale_order.model_sale_order_line msgid "Sales Order Line" @@ -497,6 +522,11 @@ msgstr "" msgid "Session" msgstr "" +#. module: pos_sale_order +#: model:ir.model.fields,field_description:pos_sale_order.field_account_payment_register__should_display_pos_warning +msgid "Should Display Pos Warning" +msgstr "" + #. module: pos_sale_order #: model:ir.model.fields,field_description:pos_sale_order.field_pos_config__iface_print_skip_screen msgid "Skip Preview Screen" @@ -549,6 +579,7 @@ msgstr "" #. module: pos_sale_order #: code:addons/pos_sale_order/models/pos_session.py:0 +#: code:addons/pos_sale_order/models/pos_session.py:0 #, python-format msgid "This session is already closed." msgstr "" @@ -568,6 +599,12 @@ msgstr "" msgid "Warehouse" msgstr "" +#. module: pos_sale_order +#: model_terms:ir.ui.view,arch_db:pos_sale_order.view_account_payment_register_form +msgid "" +"Warning: This payment will be done on an invoice for a point of sale order." +msgstr "" + #. module: pos_sale_order #: code:addons/pos_sale_order/models/sale_order.py:0 #, python-format diff --git a/pos_sale_order/wizards/__init__.py b/pos_sale_order/wizards/__init__.py index 57aca96..27e3d8c 100644 --- a/pos_sale_order/wizards/__init__.py +++ b/pos_sale_order/wizards/__init__.py @@ -1,3 +1,4 @@ +from . import account_payment_register from . import pos_payment_wizard from . import pos_delivery_wizard from . import pos_box diff --git a/pos_sale_order/wizards/account_payment_register.py b/pos_sale_order/wizards/account_payment_register.py new file mode 100644 index 0000000..646d13e --- /dev/null +++ b/pos_sale_order/wizards/account_payment_register.py @@ -0,0 +1,25 @@ +# Copyright 2024 Akretion (http://www.akretion.com). +# @author Florian Mounier +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class AccountPaymentRegister(models.TransientModel): + _inherit = "account.payment.register" + + should_display_pos_warning = fields.Boolean( + compute="_compute_should_display_pos_warning" + ) + pos_warning_confirmed = fields.Boolean( + string="I read and understood the above warning and I confirm that " + "I want to proceed with the payment anyway." + ) + + @api.depends("line_ids") + def _compute_should_display_pos_warning(self): + for wizard in self: + # Warn if at least one line move is a POS order + current_moves = self.line_ids.move_id + current_sale_orders = current_moves.line_ids.sale_line_ids.order_id + wizard.should_display_pos_warning = bool(current_sale_orders.session_id) diff --git a/pos_sale_order/wizards/account_payment_register_views.xml b/pos_sale_order/wizards/account_payment_register_views.xml new file mode 100644 index 0000000..f4f8eff --- /dev/null +++ b/pos_sale_order/wizards/account_payment_register_views.xml @@ -0,0 +1,34 @@ + + + + account.payment.register + + +
+ + +
+

Warning: This payment will be done on an invoice for a point of sale order.

+ +
+
+
+ +
+
+