From de07f837dff9508a06de68c91e553770ccb4ba20 Mon Sep 17 00:00:00 2001 From: Mitul Dave Date: Thu, 16 Apr 2026 10:47:07 +0530 Subject: [PATCH 1/7] [19.0][ADD] New module pos_payment_force_done_confirm --- pos_payment_force_done_confirm/README.rst | 54 +++++++++++++++++++ pos_payment_force_done_confirm/__init__.py | 0 .../__manifest__.py | 32 +++++++++++ pos_payment_force_done_confirm/i18n/fr.po | 35 ++++++++++++ .../screens/payment_screen/payment_screen.js | 24 +++++++++ 5 files changed, 145 insertions(+) create mode 100644 pos_payment_force_done_confirm/README.rst create mode 100644 pos_payment_force_done_confirm/__init__.py create mode 100644 pos_payment_force_done_confirm/__manifest__.py create mode 100644 pos_payment_force_done_confirm/i18n/fr.po create mode 100644 pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js diff --git a/pos_payment_force_done_confirm/README.rst b/pos_payment_force_done_confirm/README.rst new file mode 100644 index 0000000000..11446fecc5 --- /dev/null +++ b/pos_payment_force_done_confirm/README.rst @@ -0,0 +1,54 @@ +=============================== +POS Payment Force Done Confirm +=============================== + +.. |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/license-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +|badge1| |badge2| + +**POS Payment Force Done Confirmation** asks the cashier to confirm before using +**Force Done** on a payment line in the Point of Sale (for example when the +terminal flow was interrupted but the card was actually charged). The goal is to +limit accidental clicks that can desynchronize the POS with real card capture. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Install the module and open the POS. When you click **Force Done** on a payment +line, a dialog appears. Choose **No, go back** to cancel, or **Yes** to apply +**Force Done** as in standard Odoo. + +Bug Tracker +=========== + +Bugs are tracked on GitHub Issues. In case of problems, please check there if +your issue has already been reported. + +Credits +======= + +Authors +~~~~~~~ + +* CHEF PIXEL + +Maintainers +~~~~~~~~~~~ + +This module is maintained by its authors. + +License +======= + +This project is licensed under LGPL-3.0 or later +(`see `_). diff --git a/pos_payment_force_done_confirm/__init__.py b/pos_payment_force_done_confirm/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pos_payment_force_done_confirm/__manifest__.py b/pos_payment_force_done_confirm/__manifest__.py new file mode 100644 index 0000000000..bed28d2c7f --- /dev/null +++ b/pos_payment_force_done_confirm/__manifest__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Copyright 2026 CHEF PIXEL +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) + +{ + "name": "POS Payment Force Done Confirmation", + "version": "19.0.0.0", + "category": "Point of Sale", + "summary": "Ask for confirmation before marking a terminal payment as done from the POS.", + "description": """ + POS Payment Force Done Confirmation + =================================== + + When a cashier uses **Force Done** on a payment line (typically card / terminal), + this module shows a confirmation dialog to reduce mistakes that can desynchronize + the point of sale with actual card capture. + + The primary action is to go back; confirming proceeds with **Force Done**. + """, + "author": "CHEF PIXEL", + "website": "https://chef-pixel.fr", + "license": "LGPL-3", + "depends": ["point_of_sale"], + "assets": { + "point_of_sale._assets_pos": [ + "pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js", + ], + }, + "installable": True, + "application": False, + "auto_install": False, +} diff --git a/pos_payment_force_done_confirm/i18n/fr.po b/pos_payment_force_done_confirm/i18n/fr.po new file mode 100644 index 0000000000..8acf19aa31 --- /dev/null +++ b/pos_payment_force_done_confirm/i18n/fr.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_payment_force_done_confirm +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-04-10 00:00+0000\n" +"PO-Revision-Date: 2026-04-10 00:00+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: pos_payment_force_done_confirm +#. odoo-javascript +#: static/src/app/screens/payment_screen/payment_screen.js:0 +msgid "Warning: are you sure you have collected payment from the customer by card? You risk desynchronizing the point of sale." +msgstr "Attention, êtes-vous certain d'avoir encaissé le client par carte ? Vous risquez de désynchroniser le point de caisse." + +#. module: pos_payment_force_done_confirm +#. odoo-javascript +#: static/src/app/screens/payment_screen/payment_screen.js:0 +msgid "No, go back" +msgstr "Non, je reviens en arrière" + +#. module: pos_payment_force_done_confirm +#. odoo-javascript +#: static/src/app/screens/payment_screen/payment_screen.js:0 +msgid "Yes" +msgstr "Oui" diff --git a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js new file mode 100644 index 0000000000..a77d1f663f --- /dev/null +++ b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js @@ -0,0 +1,24 @@ +/** @odoo-module **/ + +import { _t } from "@web/core/l10n/translation"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { patch } from "@web/core/utils/patch"; + +const originalSendForceDone = PaymentScreen.prototype.sendForceDone; + +patch(PaymentScreen.prototype, { + async sendForceDone(line) { + this.dialog.add(ConfirmationDialog, { + body: _t( + "Warning: are you sure you have collected payment from the customer by card? You risk desynchronizing the point of sale." + ), + confirmLabel: _t("No, go back"), + confirm: () => {}, + cancelLabel: _t("Yes"), + cancel: async () => { + await originalSendForceDone.call(this, line); + }, + }); + }, +}); From 66d0b570a02699954207e904314f4c584f2c19de Mon Sep 17 00:00:00 2001 From: Mitul Dave Date: Thu, 16 Apr 2026 10:56:24 +0530 Subject: [PATCH 2/7] [19.0][ADD] New module pos_payment_force_done_confirm --- pos_payment_force_done_confirm/__manifest__.py | 15 +++------------ .../app/screens/payment_screen/payment_screen.js | 8 ++++---- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/pos_payment_force_done_confirm/__manifest__.py b/pos_payment_force_done_confirm/__manifest__.py index bed28d2c7f..6f6b902b60 100644 --- a/pos_payment_force_done_confirm/__manifest__.py +++ b/pos_payment_force_done_confirm/__manifest__.py @@ -6,19 +6,9 @@ "name": "POS Payment Force Done Confirmation", "version": "19.0.0.0", "category": "Point of Sale", - "summary": "Ask for confirmation before marking a terminal payment as done from the POS.", - "description": """ - POS Payment Force Done Confirmation - =================================== - - When a cashier uses **Force Done** on a payment line (typically card / terminal), - this module shows a confirmation dialog to reduce mistakes that can desynchronize - the point of sale with actual card capture. - - The primary action is to go back; confirming proceeds with **Force Done**. - """, + "summary": "Ask for confirmation before marking a terminal payment as done.", "author": "CHEF PIXEL", - "website": "https://chef-pixel.fr", + "website": "https://github.com/OCA/pos", "license": "LGPL-3", "depends": ["point_of_sale"], "assets": { @@ -30,3 +20,4 @@ "application": False, "auto_install": False, } + diff --git a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js index a77d1f663f..c92683783c 100644 --- a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js +++ b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js @@ -1,9 +1,9 @@ /** @odoo-module **/ -import { _t } from "@web/core/l10n/translation"; -import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; -import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; -import { patch } from "@web/core/utils/patch"; +import {_t} from "@web/core/l10n/translation"; +import {PaymentScreen} from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import {ConfirmationDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; +import {patch} from "@web/core/utils/patch"; const originalSendForceDone = PaymentScreen.prototype.sendForceDone; From cf2871a4536e4964db2166920c9ee838a443ce02 Mon Sep 17 00:00:00 2001 From: Mitul Dave Date: Thu, 16 Apr 2026 11:05:33 +0530 Subject: [PATCH 3/7] [19.0][ADD] New module pos_payment_force_done_confirm --- pos_payment_force_done_confirm/__manifest__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pos_payment_force_done_confirm/__manifest__.py b/pos_payment_force_done_confirm/__manifest__.py index 6f6b902b60..7dce94db51 100644 --- a/pos_payment_force_done_confirm/__manifest__.py +++ b/pos_payment_force_done_confirm/__manifest__.py @@ -1,13 +1,13 @@ -# -*- coding: utf-8 -*- +# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop) # Copyright 2026 CHEF PIXEL -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "POS Payment Force Done Confirmation", "version": "19.0.0.0", "category": "Point of Sale", "summary": "Ask for confirmation before marking a terminal payment as done.", - "author": "CHEF PIXEL", + "author": "CHEF PIXEL, Odoo Community Association (OCA)", "website": "https://github.com/OCA/pos", "license": "LGPL-3", "depends": ["point_of_sale"], From 46454ec2d748da568446178248af5870f1ce7a91 Mon Sep 17 00:00:00 2001 From: Mitul Dave Date: Thu, 16 Apr 2026 11:07:03 +0530 Subject: [PATCH 4/7] [19.0][ADD] New module pos_payment_force_done_confirm --- pos_payment_force_done_confirm/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos_payment_force_done_confirm/__manifest__.py b/pos_payment_force_done_confirm/__manifest__.py index 7dce94db51..d7f57c3457 100644 --- a/pos_payment_force_done_confirm/__manifest__.py +++ b/pos_payment_force_done_confirm/__manifest__.py @@ -4,7 +4,7 @@ { "name": "POS Payment Force Done Confirmation", - "version": "19.0.0.0", + "version": "19.0.1.0.0", "category": "Point of Sale", "summary": "Ask for confirmation before marking a terminal payment as done.", "author": "CHEF PIXEL, Odoo Community Association (OCA)", From d32408e3e846f8761d7c99e33517e387fd62be30 Mon Sep 17 00:00:00 2001 From: Mitul Dave Date: Thu, 7 May 2026 13:26:45 +0530 Subject: [PATCH 5/7] [19.0][ADD] New module pos_payment_force_done_confirm --- pos_payment_force_done_confirm/__manifest__.py | 3 +-- pos_payment_force_done_confirm/pyproject.toml | 3 +++ .../{payment_screen.js => payment_screen.esm.js} | 10 ++++------ 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 pos_payment_force_done_confirm/pyproject.toml rename pos_payment_force_done_confirm/static/src/app/screens/payment_screen/{payment_screen.js => payment_screen.esm.js} (67%) diff --git a/pos_payment_force_done_confirm/__manifest__.py b/pos_payment_force_done_confirm/__manifest__.py index d7f57c3457..9dd07af52a 100644 --- a/pos_payment_force_done_confirm/__manifest__.py +++ b/pos_payment_force_done_confirm/__manifest__.py @@ -13,11 +13,10 @@ "depends": ["point_of_sale"], "assets": { "point_of_sale._assets_pos": [ - "pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js", + "pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js", ], }, "installable": True, "application": False, "auto_install": False, } - diff --git a/pos_payment_force_done_confirm/pyproject.toml b/pos_payment_force_done_confirm/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/pos_payment_force_done_confirm/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js similarity index 67% rename from pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js rename to pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js index c92683783c..96f453a9d3 100644 --- a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.js +++ b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js @@ -1,9 +1,7 @@ -/** @odoo-module **/ - -import {_t} from "@web/core/l10n/translation"; -import {PaymentScreen} from "@point_of_sale/app/screens/payment_screen/payment_screen"; -import {ConfirmationDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; -import {patch} from "@web/core/utils/patch"; +import { _t } from "@web/core/l10n/translation"; +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { patch } from "@web/core/utils/patch"; const originalSendForceDone = PaymentScreen.prototype.sendForceDone; From a7a4a2382997f935e85fd6e544894b6eb21f5910 Mon Sep 17 00:00:00 2001 From: Mitul Dave Date: Thu, 7 May 2026 13:28:47 +0530 Subject: [PATCH 6/7] [19.0][ADD] New module pos_payment_force_done_confirm --- .../src/app/screens/payment_screen/payment_screen.esm.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js index 96f453a9d3..8462eeab5b 100644 --- a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js +++ b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js @@ -1,7 +1,7 @@ -import { _t } from "@web/core/l10n/translation"; -import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; -import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; -import { patch } from "@web/core/utils/patch"; +import {_t} from "@web/core/l10n/translation"; +import {PaymentScreen} from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import {ConfirmationDialog} from "@web/core/confirmation_dialog/confirmation_dialog"; +import {patch} from "@web/core/utils/patch"; const originalSendForceDone = PaymentScreen.prototype.sendForceDone; From ced6af633b2e846310fe22d8fc6590fe82479ea2 Mon Sep 17 00:00:00 2001 From: Mitul Dave Date: Thu, 7 May 2026 13:30:40 +0530 Subject: [PATCH 7/7] [19.0][ADD] New module pos_payment_force_done_confirm --- .../src/app/screens/payment_screen/payment_screen.esm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js index 8462eeab5b..567dac1f1b 100644 --- a/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js +++ b/pos_payment_force_done_confirm/static/src/app/screens/payment_screen/payment_screen.esm.js @@ -12,7 +12,9 @@ patch(PaymentScreen.prototype, { "Warning: are you sure you have collected payment from the customer by card? You risk desynchronizing the point of sale." ), confirmLabel: _t("No, go back"), - confirm: () => {}, + confirm() { + return; + }, cancelLabel: _t("Yes"), cancel: async () => { await originalSendForceDone.call(this, line);