Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions pos_payment_force_done_confirm/README.rst
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/lgpl-3.0.html>`_).
Empty file.
23 changes: 23 additions & 0 deletions pos_payment_force_done_confirm/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
# Copyright 2026 CHEF PIXEL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "POS Payment Force Done Confirmation",
"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)",
"website": "https://github.com/OCA/pos",
"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,
}

35 changes: 35 additions & 0 deletions pos_payment_force_done_confirm/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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);
},
});
},
});
Loading