Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ addon | version | maintainers | summary
[pos_margin](pos_margin/) | 18.0.1.0.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Margin on PoS Order
[pos_order_remove_line](pos_order_remove_line/) | 18.0.1.0.0 | <a href='https://github.com/robyf70'><img src='https://github.com/robyf70.png' width='32' height='32' style='border-radius:50%;' alt='robyf70'/></a> | Add button to remove POS order line.
[pos_order_to_sale_order](pos_order_to_sale_order/) | 18.0.1.0.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | PoS Order To Sale Order
[pos_payment_method_cashdro](pos_payment_method_cashdro/) | 18.0.1.0.1 | | Allows to pay with CashDro Terminals on the Point of Sale
[pos_product_display_default_code](pos_product_display_default_code/) | 18.0.1.0.0 | | pos: display product default code before product name
[pos_product_multi_barcode](pos_product_multi_barcode/) | 18.0.1.0.0 | | Make product multi barcodes usable in the point of sale
[pos_report_session_summary](pos_report_session_summary/) | 18.0.1.0.0 | | Adds a Session Summary PDF report on the POS session
Expand Down
133 changes: 133 additions & 0 deletions pos_payment_method_cashdro/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========================
PoS Payment Method CashDro
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f15a0167b57fe8cf8a3cb61c33b1f9731c54ab8f613e8ccc572773550c949c32
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-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_method_cashdro
: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_method_cashdro
: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 allows to make payments with a Cashdro
(https://www.cashdro.com) terminal on the Point of Sale frontend.

**Table of contents**

.. contents::
:local:

Configuration
=============

To add a Cashdro payment terminal:

1. Go to *Point of Sale > Configuration > Payment Methods*
2. Choose a cash payment method or create a new one.
3. Select *Cashdro* in the *Use a Payment Terminal* field.
4. Configure the Cashdro terminal hostname and credentials.
5. Configure the desired, Cashdro terminal in the proper PoS
configurations.

Note that if a single payment method was used for cash in different
stores, it should be splitted in as many phisical stores there are.

Usage
=====

With the proper configuration made:

1. Make a new PoS order and choose the cash payment method configured
with the Cashdro settings.
2. Click on *Send* to send the request to the Cashdro terminal that will
ask the customer for the amount to pay.
3. The cashier can cancel the amount request discarding the line
clicking on the (x) symbol.
4. When the customer pays the sale amount in the terminal, the Cashdro
reports the amount received and change delivered back.
5. The Point of Sale reflects it in the payment line and thus the order
can be validated now.

Known issues / Roadmap
======================

- Integrate cash control (money inputs / outputs).
- This module should be evaluated during the migration to 19.0, since
Odoo has integrated similar functionality into the core (pos_cashdro
addon). It may no longer be necessary to maintain this module
separately, and deprecation or consolidation should be considered.
https://github.com/odoo/odoo/tree/19.0/addons/pos_cashdro

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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 <https://github.com/OCA/pos/issues/new?body=module:%20pos_payment_method_cashdro%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Acysos S.L. <https://www.acysos.com>`__:

- Ignacio Ibeas

- `Tecnativa <https://www.tecnativa.com>`__

- David Vidal
- Eduardo Ezerouali

- `ACSONE SA/NV <https://acsone.eu>`__:

- Bejaoui Souheil

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.

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/18.0/pos_payment_method_cashdro>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions pos_payment_method_cashdro/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions pos_payment_method_cashdro/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "PoS Payment Method CashDro",
"summary": "Allows to pay with CashDro Terminals on the Point of Sale",
"version": "18.0.1.0.1",
"category": "Point Of Sale",
"website": "https://github.com/OCA/pos",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"point_of_sale",
],
"data": [
"views/pos_payment_method_views.xml",
],
"assets": {
"point_of_sale._assets_pos": ["pos_payment_method_cashdro/static/src/**/*"],
},
}
56 changes: 56 additions & 0 deletions pos_payment_method_cashdro/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_method_cashdro
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-05 14:40+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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_method_cashdro
#: model:ir.model.fields,field_description:pos_payment_method_cashdro.field_pos_payment_method__cashdro_password
msgid "Cashdro Password"
msgstr "Password Cashdro"

#. module: pos_payment_method_cashdro
#: model:ir.model.fields,field_description:pos_payment_method_cashdro.field_pos_payment_method__cashdro_host
msgid "Cashdro Terminal Host Name or IP address"
msgstr "Nome host terminale Cashdro o indirizzo IP"

#. module: pos_payment_method_cashdro
#: model:ir.model.fields,field_description:pos_payment_method_cashdro.field_pos_payment_method__cashdro_user
msgid "Cashdro User"
msgstr "Utente Cashdro"

#. module: pos_payment_method_cashdro
#: model:ir.model.fields,help:pos_payment_method_cashdro.field_pos_payment_method__cashdro_host
msgid "It must be reachable by the PoS in the store"
msgstr "Deve essere raggiungibile dal POS nel negozio"

#. module: pos_payment_method_cashdro
#: model:ir.model,name:pos_payment_method_cashdro.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr "Metodi di pagamento punto vendita"

#. module: pos_payment_method_cashdro
#: model:ir.model,name:pos_payment_method_cashdro.model_pos_session
msgid "Point of Sale Session"
msgstr "Sessione punto vendita"

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
56 changes: 56 additions & 0 deletions pos_payment_method_cashdro/i18n/pos_payment_method_cashdro.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_payment_method_cashdro
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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_method_cashdro
#. odoo-javascript
#: code:addons/pos_payment_method_cashdro/static/src/js/payment_cashdro.esm.js:0
msgid "An error occurred while connecting to the cashdro."
msgstr ""

#. module: pos_payment_method_cashdro
#: model:ir.model.fields,field_description:pos_payment_method_cashdro.field_pos_payment_method__cashdro_password
msgid "Cashdro Password"
msgstr ""

#. module: pos_payment_method_cashdro
#: model:ir.model.fields,field_description:pos_payment_method_cashdro.field_pos_payment_method__cashdro_host
msgid "Cashdro Terminal Host Name or IP address"
msgstr ""

#. module: pos_payment_method_cashdro
#: model:ir.model.fields,field_description:pos_payment_method_cashdro.field_pos_payment_method__cashdro_user
msgid "Cashdro User"
msgstr ""

#. module: pos_payment_method_cashdro
#. odoo-javascript
#: code:addons/pos_payment_method_cashdro/static/src/js/payment_cashdro.esm.js:0
msgid "Error"
msgstr ""

#. module: pos_payment_method_cashdro
#: model:ir.model.fields,help:pos_payment_method_cashdro.field_pos_payment_method__cashdro_host
msgid "It must be reachable by the PoS in the store"
msgstr ""

#. module: pos_payment_method_cashdro
#: model:ir.model,name:pos_payment_method_cashdro.model_pos_payment_method
msgid "Point of Sale Payment Methods"
msgstr ""

#. module: pos_payment_method_cashdro
#: model:ir.model,name:pos_payment_method_cashdro.model_pos_session
msgid "Point of Sale Session"
msgstr ""
2 changes: 2 additions & 0 deletions pos_payment_method_cashdro/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pos_payment_method
from . import pos_session
35 changes: 35 additions & 0 deletions pos_payment_method_cashdro/models/pos_payment_method.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class PosPaymentMethod(models.Model):
_inherit = "pos.payment.method"

def _get_payment_terminal_selection(self):
return super()._get_payment_terminal_selection() + [("cashdro", "Cashdro")]

cashdro_host = fields.Char(
string="Cashdro Terminal Host Name or IP address",
help="It must be reachable by the PoS in the store",
)
cashdro_user = fields.Char()
cashdro_password = fields.Char()

def _onchange_journal_id(self):
"""Cash payment method force the `use_payment_terminal` to `False` as
it's assumed that a cash journal can't have a payment terminal. Let's keep
the method when it's needed"""
res = super()._onchange_journal_id()
if self.use_payment_terminal != "cashdro" and not self.is_cash_count:
return res
self.use_payment_terminal = "cashdro"

def _compute_hide_use_payment_terminal(self):
"""Now that we have the option to choose a payment terminal for the cashdro
payments, we can show the terminal options for cash payment types."""
cash_payment_types = self.filtered(lambda x: x.type == "cash")
cash_payment_types.hide_use_payment_terminal = False
return super(
PosPaymentMethod, self - cash_payment_types
)._compute_hide_use_payment_terminal()
14 changes: 14 additions & 0 deletions pos_payment_method_cashdro/models/pos_session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models


class PosSession(models.Model):
_inherit = "pos.session"

def _loader_params_pos_payment_method(self):
result = super()._loader_params_pos_payment_method()
result["search_params"]["fields"].extend(
["cashdro_host", "cashdro_user", "cashdro_password"]
)
return result
3 changes: 3 additions & 0 deletions pos_payment_method_cashdro/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
11 changes: 11 additions & 0 deletions pos_payment_method_cashdro/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To add a Cashdro payment terminal:

1. Go to *Point of Sale \> Configuration \> Payment Methods*
2. Choose a cash payment method or create a new one.
3. Select *Cashdro* in the *Use a Payment Terminal* field.
4. Configure the Cashdro terminal hostname and credentials.
5. Configure the desired, Cashdro terminal in the proper PoS
configurations.

Note that if a single payment method was used for cash in different
stores, it should be splitted in as many phisical stores there are.
7 changes: 7 additions & 0 deletions pos_payment_method_cashdro/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- [Acysos S.L.](https://www.acysos.com):
- Ignacio Ibeas
- [Tecnativa](https://www.tecnativa.com)
- David Vidal
- Eduardo Ezerouali
- [ACSONE SA/NV](https://acsone.eu):
- Bejaoui Souheil
2 changes: 2 additions & 0 deletions pos_payment_method_cashdro/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allows to make payments with a Cashdro
(<https://www.cashdro.com>) terminal on the Point of Sale frontend.
2 changes: 2 additions & 0 deletions pos_payment_method_cashdro/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Integrate cash control (money inputs / outputs).
- This module should be evaluated during the migration to 19.0, since Odoo has integrated similar functionality into the core (pos_cashdro addon). It may no longer be necessary to maintain this module separately, and deprecation or consolidation should be considered. https://github.com/odoo/odoo/tree/19.0/addons/pos_cashdro
12 changes: 12 additions & 0 deletions pos_payment_method_cashdro/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
With the proper configuration made:

1. Make a new PoS order and choose the cash payment method configured
with the Cashdro settings.
2. Click on *Send* to send the request to the Cashdro terminal that
will ask the customer for the amount to pay.
3. The cashier can cancel the amount request discarding the line
clicking on the (x) symbol.
4. When the customer pays the sale amount in the terminal, the Cashdro
reports the amount received and change delivered back.
5. The Point of Sale reflects it in the payment line and thus the order
can be validated now.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading