Skip to content

Commit

Permalink
[MIG] l10n_fr_pos_caisse_ap_ip from v17 to v18
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Dec 10, 2024
1 parent 72729ea commit 826de72
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 32 deletions.
18 changes: 9 additions & 9 deletions l10n_fr_pos_caisse_ap_ip/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ This module adds support for the **Caisse AP** protocol over IP in the
Odoo Point of Sale.

The `Caisse AP
protocol <https://www.associationdupaiement.fr/protocoles/protocole-caisse/>`__
protocol <https://associationdupaiement.fr/protocoles/protocole-caisse/>`__
is a vendor-independent protocol used in France to communicate between a
point of sale and a payment terminal. It is implemented by
`Ingenico <https://ingenico.com/fr/produits-et-services/terminaux-de-paiement>`__
payment terminals, `Verifone <https://www.verifone.com/>`__ payment
terminal and other brands of payment terminals. This protocol is
designed by a French association called `Association du
paiement <https://www.associationdupaiement.fr/>`__, abbreviated as
**AP**. Note that the Caisse-AP protocol is used by Ingenico payment
terminals deployed in France, but not by the same model of Ingenico
payment terminals deployed in other countries!
paiement <https://associationdupaiement.fr/>`__, abbreviated as **AP**.
Note that the Caisse-AP protocol is used by Ingenico payment terminals
deployed in France, but not by the same model of Ingenico payment
terminals deployed in other countries!

This module support a bi-directionnal link with the payment terminal:

Expand Down Expand Up @@ -77,14 +77,14 @@ payment terminal.
Configuration
=============

In the menu *Point of sale > Configuration > Payment Method*, on the
In the menu *Point of sale > Configuration > Payment Methods*, on the
payment method that correspond to a payment by card:

- select the appropriate journal, which should be a bank journal (and
not a cash journa, otherwise the field *Use a payment terminal* is
not a cash journal, otherwise the field *Integrate with* is
invisible)
- field *Use a payment terminal*: select **Caisse AP over IP (France
only)**
- field *Integration*: selection **Terminal**
- field *Integrate with*: select **Caisse AP over IP (France only)**
- field *Caisse-AP Payment Terminal IP Address*: set the IP address of
the payment terminal,
- field *Caisse-AP Payment Terminal Port*: set the TCP port of the
Expand Down
7 changes: 4 additions & 3 deletions l10n_fr_pos_caisse_ap_ip/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
In the menu *Point of sale \> Configuration \> Payment Method*, on the
In the menu *Point of sale \> Configuration \> Payment Methods*, on the
payment method that correspond to a payment by card:

- select the appropriate journal, which should be a bank journal (and
not a cash journa, otherwise the field *Use a payment terminal* is
not a cash journal, otherwise the field *Integrate with* is
invisible)
- field *Use a payment terminal*: select **Caisse AP over IP (France
- field *Integration*: selection **Terminal**
- field *Integrate with*: select **Caisse AP over IP (France
only)**
- field *Caisse-AP Payment Terminal IP Address*: set the IP address of
the payment terminal,
Expand Down
4 changes: 2 additions & 2 deletions l10n_fr_pos_caisse_ap_ip/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ This module adds support for the **Caisse AP** protocol over IP in the
Odoo Point of Sale.

The [Caisse AP
protocol](https://www.associationdupaiement.fr/protocoles/protocole-caisse/)
protocol](https://associationdupaiement.fr/protocoles/protocole-caisse/)
is a vendor-independent protocol used in France to communicate between a
point of sale and a payment terminal. It is implemented by
[Ingenico](https://ingenico.com/fr/produits-et-services/terminaux-de-paiement)
payment terminals, [Verifone](https://www.verifone.com/) payment
terminal and other brands of payment terminals. This protocol is
designed by a French association called [Association du
paiement](https://www.associationdupaiement.fr/), abbreviated as **AP**.
paiement](https://associationdupaiement.fr/), abbreviated as **AP**.
Note that the Caisse-AP protocol is used by Ingenico payment terminals
deployed in France, but not by the same model of Ingenico payment
terminals deployed in other countries!
Expand Down
20 changes: 10 additions & 10 deletions l10n_fr_pos_caisse_ap_ip/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,18 +372,18 @@ <h1 class="title">POS: Caisse-AP payment protocol for France</h1>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-france/tree/18.0/l10n_fr_pos_caisse_ap_ip"><img alt="OCA/l10n-france" src="https://img.shields.io/badge/github-OCA%2Fl10n--france-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-france-18-0/l10n-france-18-0-l10n_fr_pos_caisse_ap_ip"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds support for the <strong>Caisse AP</strong> protocol over IP in the
Odoo Point of Sale.</p>
<p>The <a class="reference external" href="https://www.associationdupaiement.fr/protocoles/protocole-caisse/">Caisse AP
<p>The <a class="reference external" href="https://associationdupaiement.fr/protocoles/protocole-caisse/">Caisse AP
protocol</a>
is a vendor-independent protocol used in France to communicate between a
point of sale and a payment terminal. It is implemented by
<a class="reference external" href="https://ingenico.com/fr/produits-et-services/terminaux-de-paiement">Ingenico</a>
payment terminals, <a class="reference external" href="https://www.verifone.com/">Verifone</a> payment
terminal and other brands of payment terminals. This protocol is
designed by a French association called <a class="reference external" href="https://www.associationdupaiement.fr/">Association du
paiement</a>, abbreviated as
<strong>AP</strong>. Note that the Caisse-AP protocol is used by Ingenico payment
terminals deployed in France, but not by the same model of Ingenico
payment terminals deployed in other countries!</p>
designed by a French association called <a class="reference external" href="https://associationdupaiement.fr/">Association du
paiement</a>, abbreviated as <strong>AP</strong>.
Note that the Caisse-AP protocol is used by Ingenico payment terminals
deployed in France, but not by the same model of Ingenico payment
terminals deployed in other countries!</p>
<p>This module support a bi-directionnal link with the payment terminal:</p>
<ol class="arabic simple">
<li>it sends the amount to the payment terminal</li>
Expand Down Expand Up @@ -423,14 +423,14 @@ <h1 class="title">POS: Caisse-AP payment protocol for France</h1>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>In the menu <em>Point of sale &gt; Configuration &gt; Payment Method</em>, on the
<p>In the menu <em>Point of sale &gt; Configuration &gt; Payment Methods</em>, on the
payment method that correspond to a payment by card:</p>
<ul class="simple">
<li>select the appropriate journal, which should be a bank journal (and
not a cash journa, otherwise the field <em>Use a payment terminal</em> is
not a cash journal, otherwise the field <em>Integrate with</em> is
invisible)</li>
<li>field <em>Use a payment terminal</em>: select <strong>Caisse AP over IP (France
only)</strong></li>
<li>field <em>Integration</em>: selection <strong>Terminal</strong></li>
<li>field <em>Integrate with</em>: select <strong>Caisse AP over IP (France only)</strong></li>
<li>field <em>Caisse-AP Payment Terminal IP Address</em>: set the IP address of
the payment terminal,</li>
<li>field <em>Caisse-AP Payment Terminal Port</em>: set the TCP port of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
*/

import {ErrorPopup} from "@point_of_sale/app/errors/popups/error_popup";
import {AlertDialog} from "@web/core/confirmation_dialog/confirmation_dialog";
import {PaymentInterface} from "@point_of_sale/app/payment/payment_interface";
import {_t} from "@web/core/l10n/translation";

Expand Down Expand Up @@ -44,22 +44,22 @@ export class PaymentCaisseAPIP extends PaymentInterface {
return Promise.reject();
}

async send_payment_request(cid) {
async send_payment_request(uuid) {
await super.send_payment_request(...arguments);
const order = this.pos.get_order();
const pay_line = order.selected_paymentline;
const pay_line = order.get_selected_paymentline();
// Define the timout used in the POS and in the back-end (in ms)
const timeout = 180000;
const data = {
amount: pay_line.amount,
currency_id: this.pos.currency.id,
payment_method_id: this.payment_method.id,
payment_id: cid,
payment_method_id: this.payment_method_id.id,
payment_id: uuid,
timeout: timeout,
};
pay_line.set_payment_status("waitingCard");
return this.env.services.orm.silent
.call("pos.payment.method", "fr_caisse_ap_ip_send_payment", [data])
return this.pos.data
.silentCall("pos.payment.method", "fr_caisse_ap_ip_send_payment", [data])
.then((response) => {
if (response instanceof Object && "payment_status" in response) {
// The response is a valid object
Expand All @@ -82,7 +82,7 @@ export class PaymentCaisseAPIP extends PaymentInterface {
}

_show_error(msg, title) {
this.env.services.popup.add(ErrorPopup, {
this.env.services.dialog.add(AlertDialog, {
title: title || _t("Payment Terminal Error"),
body: msg,
});
Expand Down

0 comments on commit 826de72

Please sign in to comment.