Skip to content

Commit d6cb145

Browse files
author
phucph
committed
[IMP] pos_automatic_cashdrawer: pre-commit auto fixes
1 parent 446004f commit d6cb145

27 files changed

+1158
-728
lines changed

pos_automatic_cashdrawer/README.rst

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,31 @@
22
POS Automatic Cashdrawer
33
========================
44

5-
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
!! This file is generated by oca-gen-addon-readme !!
78
!! changes will be overwritten. !!
89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e73ed38d380e8af85d3a877abc3182d0fe2bf1ca0972506b861e1255689596da
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
912
1013
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1114
:target: https://odoo-community.org/page/development-status
1215
:alt: Beta
1316
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
1417
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1518
:alt: License: AGPL-3
16-
.. |badge3| image:: https://img.shields.io/badge/github-druidoo%2FFoodCoops-lightgray.png?logo=github
17-
:target: https://github.com/druidoo/FoodCoops/tree/12.0/pos_automatic_cashdrawer
18-
:alt: druidoo/FoodCoops
19-
20-
|badge1| |badge2| |badge3|
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
20+
:target: https://github.com/OCA/pos/tree/18.0/pos_automatic_cashdrawer
21+
:alt: OCA/pos
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/pos-18-0/pos-18-0-pos_automatic_cashdrawer
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
2130

2231
This module adds support for automatic cashdrawers in the Point of Sale.
2332

@@ -29,54 +38,67 @@ This module adds support for automatic cashdrawers in the Point of Sale.
2938
Installation
3039
============
3140

32-
This module is designed to be installed on the
33-
*main Odoo server*. On the *POSbox*, you should install the module
34-
*hw_x* depending on the protocol implemented in your device.
35-
`Cashlogy <http://www.cashlogy.com>` are implemented in the
36-
*hw_cashlogy* module and also in pywebdriver <https://github.com/akretion/pywebdriver>.
41+
This module is designed to be installed on the *main Odoo server*. On
42+
the *POSbox*, you should install the module *hw_x* depending on the
43+
protocol implemented in your device. Cashlogy
44+
<`http://www.cashlogy.com\\> <http://www.cashlogy.com\>>`__ are
45+
implemented in the *hw_cashlogy* module and also in pywebdriver
46+
<`https://github.com/akretion/pywebdriver\\> <https://github.com/akretion/pywebdriver\>>`__.
3747

3848
Configuration
3949
=============
4050

41-
The cashlogyConnector adddress and port should be configured on the main Odoo server,
42-
in the menu *Pointof Sale > Configuration > Payment Methods*,under the *Point of Sale* tab.
51+
The cashlogyConnector adddress and port should be configured on the main
52+
Odoo server, in the menu *Pointof Sale > Configuration > Payment
53+
Methods*,under the *Point of Sale* tab.
4354

4455
Usage
4556
=====
4657

47-
In the frontend of the POS, when you select a payment method CASH you will have a *Start Transaction* button :
48-
if you click on that button, the amount will be sent to the POSbox.
58+
In the frontend of the POS, when you select a payment method CASH you
59+
will have a *Start Transaction* button : if you click on that button,
60+
the amount will be sent to the POSbox.
4961

5062
Bug Tracker
5163
===========
5264

53-
Bugs are tracked on `GitHub Issues <https://github.com/druidoo/FoodCoops/issues>`_.
65+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
5466
In case of trouble, please check there if your issue has already been reported.
55-
If you spotted it first, help us smashing it by providing a detailed and welcomed
56-
`feedback <https://github.com/druidoo/FoodCoops/issues/new?body=module:%20pos_automatic_cashdrawer%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
67+
If you spotted it first, help us to smash it by providing a detailed and welcomed
68+
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_automatic_cashdrawer%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5769

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

6072
Credits
6173
=======
6274

6375
Authors
64-
~~~~~~~
76+
-------
6577

6678
* Aurélien DUMAINE
6779
* Druidoo
6880

6981
Contributors
70-
~~~~~~~~~~~~
82+
------------
7183

72-
* Aurelien Dumaine
73-
* Mathieu Vatel
74-
* Iván Todorovich
75-
* Druidoo <https://www.druidoo.io>
84+
- Aurelien Dumaine
85+
- Mathieu Vatel
86+
- Iván Todorovich
87+
- Druidoo <`https://www.druidoo.io\\> <https://www.druidoo.io\>>`__
7688

7789
Maintainers
78-
~~~~~~~~~~~
90+
-----------
91+
92+
This module is maintained by the OCA.
93+
94+
.. image:: https://odoo-community.org/logo.png
95+
:alt: Odoo Community Association
96+
:target: https://odoo-community.org
97+
98+
OCA, or the Odoo Community Association, is a nonprofit organization whose
99+
mission is to support the collaborative development of Odoo features and
100+
promote its widespread use.
79101

80-
This module is part of the `druidoo/FoodCoops <https://github.com/druidoo/FoodCoops/tree/12.0/pos_automatic_cashdrawer>`_ project on GitHub.
102+
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/18.0/pos_automatic_cashdrawer>`_ project on GitHub.
81103

82-
You are welcome to contribute.
104+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
33
<data noupdate="1">
44
<record id="point_of_sale.pos_config_main" model="pos.config">
5-
<field name="iface_automatic_cashdrawer" eval="True"/>
6-
<field name="iface_automatic_cashdrawer_ip_address" >127.0.0.1</field>
7-
<field name="iface_automatic_cashdrawer_tcp_port" >8092</field>
5+
<field name="iface_automatic_cashdrawer" eval="True" />
6+
<field name="iface_automatic_cashdrawer_ip_address">127.0.0.1</field>
7+
<field name="iface_automatic_cashdrawer_tcp_port">8092</field>
88
</record>
99
</data>
1010
</odoo>

pos_automatic_cashdrawer/models/account_journal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (C) 2016-Today: La Louve <http://www.lalouve.net/>
33
# Copyright (C) 2019 Druidoo <https://www.druidoo.io>
44

5-
from odoo import models, fields
5+
from odoo import fields, models
66

77

88
class AccountJournal(models.Model):

pos_automatic_cashdrawer/models/pos_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (C) 2019 Druidoo <https://www.druidoo.io>
44
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
55

6-
from odoo import fields, models, api
6+
from odoo import api, fields, models
77

88

99
class PosConfig(models.Model):

pos_automatic_cashdrawer/models/pos_session.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import logging
44

5-
from odoo import api, models, _
5+
from odoo import _, api, models
66
from odoo.exceptions import UserError
77

88
_logger = logging.getLogger(__name__)
@@ -104,9 +104,7 @@ def _get_cash_in_out_fields(self):
104104
@api.multi
105105
def action_put_money_in(self, amount, reason):
106106
self.ensure_one()
107-
wizard = self.env["cash.box.in"].create(
108-
{"amount": amount, "name": reason}
109-
)
107+
wizard = self.env["cash.box.in"].create({"amount": amount, "name": reason})
110108
wizard.with_context(active_model=self._name, active_ids=self.ids).run()
111109
# Return the last added line
112110
return (
@@ -123,9 +121,7 @@ def action_put_money_in(self, amount, reason):
123121
@api.multi
124122
def action_take_money_out(self, amount, reason):
125123
self.ensure_one()
126-
wizard = self.env["cash.box.out"].create(
127-
{"amount": amount, "name": reason}
128-
)
124+
wizard = self.env["cash.box.out"].create({"amount": amount, "name": reason})
129125
wizard.with_context(active_model=self._name, active_ids=self.ids).run()
130126
# Return the last added line
131127
return (
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The cashlogyConnector adddress and port should be configured on the main
2+
Odoo server, in the menu *Pointof Sale \> Configuration \> Payment
3+
Methods*,under the *Point of Sale* tab.

pos_automatic_cashdrawer/readme/CONFIGURE.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Aurelien Dumaine
2+
- Mathieu Vatel
3+
- Iván Todorovich
4+
- Druidoo \<https://www.druidoo.io\>

pos_automatic_cashdrawer/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)