Skip to content

Commit b525db6

Browse files
committed
[IMP] account_cash_deposit: pre-commit fixes
1 parent b7848bf commit b525db6

22 files changed

+237
-168
lines changed

account_cash_deposit/README.rst

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,22 @@ Account Cash Deposit
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github
20-
:target: https://github.com/OCA/account-financial-tools/tree/16.0/account_cash_deposit
20+
:target: https://github.com/OCA/account-financial-tools/tree/18.0/account_cash_deposit
2121
:alt: OCA/account-financial-tools
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_cash_deposit
23+
:target: https://translation.odoo-community.org/projects/account-financial-tools-18-0/account-financial-tools-18-0-account_cash_deposit
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

31-
This module adds support for **cash deposits at the bank**. It also supports the other way around: **ordering cash at the bank**. It allows to declare the kind of cash you want to deposit (or order): bank notes, coins and coin rolls and the quantity for each of them. Coins are rarely used, because most banks only allow to deposit/order coin rolls.
31+
This module adds support for **cash deposits at the bank**. It also
32+
supports the other way around: **ordering cash at the bank**. It allows
33+
to declare the kind of cash you want to deposit (or order): bank notes,
34+
coins and coin rolls and the quantity for each of them. Coins are rarely
35+
used, because most banks only allow to deposit/order coin rolls.
3236

3337
**Table of contents**
3438

@@ -38,60 +42,85 @@ This module adds support for **cash deposits at the bank**. It also supports the
3842
Configuration
3943
=============
4044

41-
First, for each currency of your cash boxes, you must define the bank notes and coin rolls for that currency (coin rolls are often standardised by the Central Bank). You can also definie the coins, but it's not useful if your bank only accept coin rolls and not coins.
45+
First, for each currency of your cash boxes, you must define the bank
46+
notes and coin rolls for that currency (coin rolls are often
47+
standardised by the Central Bank). You can also definie the coins, but
48+
it's not useful if your bank only accept coin rolls and not coins.
4249

43-
.. figure:: https://raw.githubusercontent.com/OCA/account-financial-tools/16.0/account_cash_deposit/static/description/currency_form_view.png
44-
:scale: 100 %
45-
:alt: Currency form view
50+
|image1|
4651

47-
To save time for new users, this module provides the bank notes, coins and coin rolls for several currencies (EUR, USD, CAD, etc.). If it is not the case for your currency, it would be very nice of you to contribute it (you can use the file *account_cash_deposit/data/cash_unit_eur.xml* as an example).
52+
To save time for new users, this module provides the bank notes, coins
53+
and coin rolls for several currencies (EUR, USD, CAD, etc.). If it is
54+
not the case for your currency, it would be very nice of you to
55+
contribute it (you can use the file
56+
*account_cash_deposit/data/cash_unit_eur.xml* as an example).
4857

49-
To save time when encoding the cash deposits/orders, you can set the parameter *Auto Create* on the bank notes and/or coin rolls that you use very often.
58+
To save time when encoding the cash deposits/orders, you can set the
59+
parameter *Auto Create* on the bank notes and/or coin rolls that you use
60+
very often.
5061

51-
On the Accounting configuration page, in the section *Bank & Cash*, the *Inter-Banks Transfer Account* must be configured.
62+
On the Accounting configuration page, in the section *Bank & Cash*, the
63+
*Inter-Banks Transfer Account* must be configured.
64+
65+
.. |image1| image:: https://raw.githubusercontent.com/OCA/account-financial-tools/18.0/account_cash_deposit/static/description/currency_form_view.png
5266

5367
Usage
5468
=====
5569

56-
To create a new cash **deposit**, go to the menu *Invoicing > Accounting > Miscellaneous > Cash Deposits* and click on *Create*: select the currency, the cash box from which you will take the cash out and the bank journal corresponding to the bank account on which you want to deposit the cash. Then create/edit lines to enter the quantity for each kind of bank note and coin rolls. Then, you can print a PDF report designed to be a kind of delivery report for the cash. Upon validation, Odoo will generate a journal entry in the cash journal that:
70+
To create a new cash **deposit**, go to the menu *Invoicing > Accounting
71+
> Miscellaneous > Cash Deposits* and click on *Create*: select the
72+
currency, the cash box from which you will take the cash out and the
73+
bank journal corresponding to the bank account on which you want to
74+
deposit the cash. Then create/edit lines to enter the quantity for each
75+
kind of bank note and coin rolls. Then, you can print a PDF report
76+
designed to be a kind of delivery report for the cash. Upon validation,
77+
Odoo will generate a journal entry in the cash journal that:
78+
79+
- credits the cash account,
80+
- debits the inter-banks transfer account.
5781

58-
* credits the cash account,
59-
* debits the inter-banks transfer account.
82+
|Screenshot|
6083

61-
.. figure:: https://raw.githubusercontent.com/OCA/account-financial-tools/16.0/account_cash_deposit/static/description/cash_deposit_form.png
62-
:scale: 100 %
63-
:alt: Cash Deposit form view
84+
The process is very similar when **ordering** cash but you have to use
85+
another menu entry: menu *Invoicing > Accounting > Miscellaneous > Cash
86+
Orders*. Select the currency, the cash box that will receive the cash
87+
and the bank account from which the bank will take the money.
88+
Create/edit lines to enter the details of your order (bank notes, coin
89+
rolls). Then, you can confirm the order and print a PDF report designed
90+
to be sent to your bank as a cash order. Eventually, when the bank
91+
delivers the cash to you, you should validate the cash order and Odoo
92+
will generate a journal entry in the cash journal that:
6493

65-
The process is very similar when **ordering** cash but you have to use another menu entry: menu *Invoicing > Accounting > Miscellaneous > Cash Orders*. Select the currency, the cash box that will receive the cash and the bank account from which the bank will take the money. Create/edit lines to enter the details of your order (bank notes, coin rolls). Then, you can confirm the order and print a PDF report designed to be sent to your bank as a cash order. Eventually, when the bank delivers the cash to you, you should validate the cash order and Odoo will generate a journal entry in the cash journal that:
94+
- debits the cash account,
95+
- credits the inter-banks transfer account.
6696

67-
* debits the cash account,
68-
* credits the inter-banks transfer account.
97+
.. |Screenshot| image:: https://raw.githubusercontent.com/OCA/account-financial-tools/18.0/account_cash_deposit/static/description/cash_deposit_form.png
6998

7099
Bug Tracker
71100
===========
72101

73102
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/issues>`_.
74103
In case of trouble, please check there if your issue has already been reported.
75104
If you spotted it first, help us to smash it by providing a detailed and welcomed
76-
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_cash_deposit%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
105+
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_cash_deposit%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
77106

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

80109
Credits
81110
=======
82111

83112
Authors
84-
~~~~~~~
113+
-------
85114

86115
* Akretion
87116

88117
Contributors
89-
~~~~~~~~~~~~
118+
------------
90119

91-
* Alexis de Lattre <[email protected]>
120+
- Alexis de Lattre <[email protected]>
92121

93122
Maintainers
94-
~~~~~~~~~~~
123+
-----------
95124

96125
This module is maintained by the OCA.
97126

@@ -103,6 +132,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
103132
mission is to support the collaborative development of Odoo features and
104133
promote its widespread use.
105134

106-
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/16.0/account_cash_deposit>`_ project on GitHub.
135+
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/18.0/account_cash_deposit>`_ project on GitHub.
107136

108137
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

account_cash_deposit/data/cash_unit_cad.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
66
-->
77
<odoo noupdate="1">
8-
98
<record id="cad_note_100" model="cash.unit">
109
<field name="currency_id" ref="base.CAD" />
1110
<field name="cash_type">note</field>

account_cash_deposit/data/cash_unit_chf.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
66
-->
77
<odoo noupdate="1">
8-
98
<record id="chf_note_1000" model="cash.unit">
109
<field name="currency_id" ref="base.CHF" />
1110
<field name="cash_type">note</field>
@@ -118,5 +117,4 @@
118117
<field name="value">0.05</field>
119118
<field name="coinroll_qty">50</field>
120119
</record>
121-
122120
</odoo>

account_cash_deposit/data/cash_unit_eur.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
66
-->
77
<odoo noupdate="1">
8-
98
<record id="eur_note_500" model="cash.unit">
109
<field name="currency_id" ref="base.EUR" />
1110
<field name="cash_type">note</field>
@@ -135,5 +134,4 @@
135134
<field name="value">0.01</field>
136135
<field name="coinroll_qty">50</field>
137136
</record>
138-
139137
</odoo>

account_cash_deposit/data/cash_unit_usd.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
66
-->
77
<odoo noupdate="1">
8-
98
<record id="usd_note_100" model="cash.unit">
109
<field name="currency_id" ref="base.USD" />
1110
<field name="cash_type">note</field>
@@ -34,21 +33,19 @@
3433
<field name="cash_type">note</field>
3534
<field name="value">5</field>
3635
<field name="auto_create">deposit</field>
37-
</record>
36+
</record>
3837
<record id="usd_note_2" model="cash.unit">
3938
<field name="currency_id" ref="base.USD" />
4039
<field name="cash_type">note</field>
4140
<field name="value">2</field>
4241
<field name="auto_create">deposit</field>
43-
</record>
42+
</record>
4443
<record id="usd_note_1" model="cash.unit">
4544
<field name="currency_id" ref="base.USD" />
4645
<field name="cash_type">note</field>
4746
<field name="value">1</field>
4847
<field name="auto_create">deposit</field>
49-
</record>
50-
51-
48+
</record>
5249

5350
<record id="usd_coin_1" model="cash.unit">
5451
<field name="currency_id" ref="base.USD" />
@@ -118,5 +115,4 @@
118115
<field name="value">0.01</field>
119116
<field name="coinroll_qty">50</field>
120117
</record>
121-
122118
</odoo>

account_cash_deposit/models/cash_unit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ def _get_value_label(self, value):
9191
if self.currency_id.compare_amounts(value, int_value) == 0:
9292
amount_label = str(int_value)
9393
if symbol_position == "before":
94-
value_label = "%s %s" % (symbol, amount_label)
94+
value_label = f"{symbol} {amount_label}"
9595
else:
96-
value_label = "%s %s" % (amount_label, symbol)
96+
value_label = f"{amount_label} {symbol}"
9797
else:
9898
value_label = format_amount(self.env, value, self.currency_id)
9999
return value_label
@@ -115,7 +115,7 @@ def name_get(self):
115115
total_value_label,
116116
)
117117
else:
118-
label = "%s %s" % (cash_type_label, value_label)
118+
label = f"{cash_type_label} {value_label}"
119119
res.append((rec.id, label))
120120
return res
121121

account_cash_deposit/pyproject.toml

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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
First, for each currency of your cash boxes, you must define the bank
2+
notes and coin rolls for that currency (coin rolls are often
3+
standardised by the Central Bank). You can also definie the coins, but
4+
it's not useful if your bank only accept coin rolls and not coins.
5+
6+
![](static/description/currency_form_view.png)
7+
8+
To save time for new users, this module provides the bank notes, coins
9+
and coin rolls for several currencies (EUR, USD, CAD, etc.). If it is
10+
not the case for your currency, it would be very nice of you to
11+
contribute it (you can use the file
12+
*account_cash_deposit/data/cash_unit_eur.xml* as an example).
13+
14+
To save time when encoding the cash deposits/orders, you can set the
15+
parameter *Auto Create* on the bank notes and/or coin rolls that you use
16+
very often.
17+
18+
On the Accounting configuration page, in the section *Bank & Cash*, the
19+
*Inter-Banks Transfer Account* must be configured.

account_cash_deposit/readme/CONFIGURE.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Alexis de Lattre \<<[email protected]>\>

0 commit comments

Comments
 (0)