Skip to content

Commit 8fdce63

Browse files
committed
[IMP] hr_expense_advance_clearing: pre-commit auto fixes
1 parent 9e088d2 commit 8fdce63

File tree

4 files changed

+37
-38
lines changed

4 files changed

+37
-38
lines changed

hr_expense_advance_clearing/README.rst

+24-25
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Employee Advance and Clearing
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%2Fhr--expense-lightgray.png?logo=github
20-
:target: https://github.com/OCA/hr-expense/tree/17.0/hr_expense_advance_clearing
20+
:target: https://github.com/OCA/hr-expense/tree/18.0/hr_expense_advance_clearing
2121
:alt: OCA/hr-expense
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/hr-expense-17-0/hr-expense-17-0-hr_expense_advance_clearing
23+
:target: https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_advance_clearing
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/hr-expense&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -38,12 +38,11 @@ first, then back to company and do the clearing.
3838

3939
There can be 3 scenarios for advance and clearing
4040

41-
- When clearing amount = advance amount, no other operation is
42-
required.
43-
- When clearing amount > advance amount, company will pay the extra to
44-
employee.
45-
- When clearing amount < advance amount, employee will return the
46-
remain to company.
41+
- When clearing amount = advance amount, no other operation is required.
42+
- When clearing amount > advance amount, company will pay the extra to
43+
employee.
44+
- When clearing amount < advance amount, employee will return the remain
45+
to company.
4746

4847
**Table of contents**
4948

@@ -57,16 +56,16 @@ This module will create a new product "Employee Advance" automatically.
5756
You will need to setup the Expense Account of this product to your
5857
Employee Advance account manually.
5958

60-
- Open Product window and search for "Employee Advance"
61-
- On Accounting tab, select appropriate employee advance account from
62-
your chart of account
59+
- Open Product window and search for "Employee Advance"
60+
- On Accounting tab, select appropriate employee advance account from
61+
your chart of account
6362

6463
Note:
6564

66-
- You will need the "Show Full Accounting Features" to see accounting
67-
data
68-
- Employee Advance account code, if not already exists, you can create
69-
one. Use type = Current Asset and check Allow Reconciliation.
65+
- You will need the "Show Full Accounting Features" to see accounting
66+
data
67+
- Employee Advance account code, if not already exists, you can create
68+
one. Use type = Current Asset and check Allow Reconciliation.
7069

7170
Usage
7271
=====
@@ -114,10 +113,10 @@ you can do 2 ways,
114113

115114
Note:
116115

117-
- If the total expense amount less than or equal to the advance amount,
118-
the status will be set to Paid right after post journal entries.
119-
- If the total expense amount more than the advance amount, Register
120-
Payment will pay the extra amount then set state to Paid.
116+
- If the total expense amount less than or equal to the advance amount,
117+
the status will be set to Paid right after post journal entries.
118+
- If the total expense amount more than the advance amount, Register
119+
Payment will pay the extra amount then set state to Paid.
121120

122121
**Return Advance**
123122

@@ -137,7 +136,7 @@ Bug Tracker
137136
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-expense/issues>`_.
138137
In case of trouble, please check there if your issue has already been reported.
139138
If you spotted it first, help us to smash it by providing a detailed and welcomed
140-
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_advance_clearing%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
139+
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_advance_clearing%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
141140

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

@@ -152,9 +151,9 @@ Authors
152151
Contributors
153152
------------
154153

155-
- Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
156-
- Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
157-
- Saran Lim. <saranl@ecosoft.co.th>
154+
- Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
155+
- Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
156+
- Saran Lim. <saranl@ecosoft.co.th>
158157

159158
Maintainers
160159
-----------
@@ -177,6 +176,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
177176

178177
|maintainer-kittiu|
179178

180-
This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/17.0/hr_expense_advance_clearing>`_ project on GitHub.
179+
This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/18.0/hr_expense_advance_clearing>`_ project on GitHub.
181180

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

hr_expense_advance_clearing/models/hr_expense_sheet.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ def _get_move_line_vals(self):
198198
payable_move_line = move_line_dst.copy()
199199
payable_move_line["credit"] = remain_payable
200200
payable_move_line["amount_currency"] = -remain_payable
201-
payable_move_line[
202-
"account_id"
203-
] = expense.sheet_id._get_expense_account_destination()
201+
payable_move_line["account_id"] = (
202+
expense.sheet_id._get_expense_account_destination()
203+
)
204204
else:
205205
advance_to_clear -= credit
206206
# Add destination first (if credit is not zero)

hr_expense_advance_clearing/static/description/index.html

+6-7
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ <h1 class="title">Employee Advance and Clearing</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:e004a029a70a5f80bf9af5ee81bd0f03cb9870e582169ba24919f68ad492037f
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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/hr-expense/tree/17.0/hr_expense_advance_clearing"><img alt="OCA/hr-expense" src="https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/hr-expense-17-0/hr-expense-17-0-hr_expense_advance_clearing"><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/hr-expense&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<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/hr-expense/tree/18.0/hr_expense_advance_clearing"><img alt="OCA/hr-expense" src="https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/hr-expense-18-0/hr-expense-18-0-hr_expense_advance_clearing"><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/hr-expense&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>Standard Expenses module allow employee to do the expense reimbursement
374374
only after the expense has been made. In other world, employee will need
375375
to pay first and reimburse later.</p>
@@ -378,12 +378,11 @@ <h1 class="title">Employee Advance and Clearing</h1>
378378
first, then back to company and do the clearing.</p>
379379
<p>There can be 3 scenarios for advance and clearing</p>
380380
<ul class="simple">
381-
<li>When clearing amount = advance amount, no other operation is
382-
required.</li>
381+
<li>When clearing amount = advance amount, no other operation is required.</li>
383382
<li>When clearing amount &gt; advance amount, company will pay the extra to
384383
employee.</li>
385-
<li>When clearing amount &lt; advance amount, employee will return the
386-
remain to company.</li>
384+
<li>When clearing amount &lt; advance amount, employee will return the remain
385+
to company.</li>
387386
</ul>
388387
<p><strong>Table of contents</strong></p>
389388
<div class="contents local topic" id="contents">
@@ -484,7 +483,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
484483
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/hr-expense/issues">GitHub Issues</a>.
485484
In case of trouble, please check there if your issue has already been reported.
486485
If you spotted it first, help us to smash it by providing a detailed and welcomed
487-
<a class="reference external" href="https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_advance_clearing%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
486+
<a class="reference external" href="https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_advance_clearing%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
488487
<p>Do not contact contributors directly about support or help with technical issues.</p>
489488
</div>
490489
<div class="section" id="credits">
@@ -514,7 +513,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
514513
promote its widespread use.</p>
515514
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
516515
<p><a class="reference external image-reference" href="https://github.com/kittiu"><img alt="kittiu" src="https://github.com/kittiu.png?size=40px" /></a></p>
517-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr-expense/tree/17.0/hr_expense_advance_clearing">OCA/hr-expense</a> project on GitHub.</p>
516+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr-expense/tree/18.0/hr_expense_advance_clearing">OCA/hr-expense</a> project on GitHub.</p>
518517
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
519518
</div>
520519
</div>

hr_expense_advance_clearing/views/hr_expense_views.xml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
43
<!-- New menus Advance and Expense under My Reports -->
54

65
<record id="action_my_hr_advance_sheet" model="ir.actions.act_window">
@@ -15,7 +14,8 @@
1514
<field name="help" type="html">
1615
<p class="o_view_nocontent_smiling_face">
1716
No advance report found. Let's create one!
18-
</p><p>
17+
</p>
18+
<p>
1919
Once you have created your advance, submit it to your manager who will validate it.
2020
</p>
2121
</field>
@@ -32,7 +32,8 @@
3232
<field name="help" type="html">
3333
<p class="o_view_nocontent_smiling_face">
3434
No expense report found. Let's create one!
35-
</p><p>
35+
</p>
36+
<p>
3637
Once you have created your expense, submit it to your manager who will validate it.
3738
</p>
3839
</field>

0 commit comments

Comments
 (0)