Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.0 mig hr expense advance clearing #191

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
7b54880
[12.0][ADD] hr_expense_advance_clearing
kittiu Apr 26, 2019
96732b6
[12.0][FIX] hr_expense_advance_clearing
kittiu Dec 9, 2019
174ff72
[IMP] : black, isort
kittiu Mar 20, 2020
b0022c1
[13.0][MIG] hr_expense_advance_clearing
kittiu Mar 20, 2020
6688810
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Jun 12, 2020
5a47fcc
[UPD] README.rst
OCA-git-bot Jun 12, 2020
69d4508
[FIX] hr_expense_advance_clearing: analytic account visibility
chienandalu Sep 24, 2020
14271cc
[13.0][UPD] Add Contributors
newtratip Oct 1, 2020
3388235
hr_expense_advance_clearing 13.0.1.0.1
OCA-git-bot Oct 1, 2020
5f1488b
[IMP] hr_expense_advance_clearing: hide analytics tags as well
chienandalu Nov 5, 2020
8707710
hr_expense_advance_clearing 13.0.1.1.0
OCA-git-bot Nov 6, 2020
99c5950
[FIX] rename fields residual
Saran440 Jan 7, 2021
fd5665e
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Jan 11, 2021
318089e
hr_expense_advance_clearing 13.0.1.2.0
OCA-git-bot Jan 11, 2021
ad303fa
[14.0][MIG] hr_expense_advance_clearing
Saran440 Jan 18, 2021
bef2731
[UPD] README.rst
OCA-git-bot May 1, 2021
6c2dd49
[FIX] hr_expense_advance_clearing: default_get return advance
Saran440 Jul 19, 2021
d435256
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Jul 20, 2021
9938db0
hr_expense_advance_clearing 14.0.1.0.1
OCA-git-bot Jul 20, 2021
784deb0
[14.0][IMP] hr_expense_advance_clearing, add invisible fields
kittiu Jul 20, 2021
97954e6
hr_expense_advance_clearing 14.0.1.0.2
OCA-git-bot Jul 20, 2021
a2148ef
[14.0][IMP] hr_expense_advance_clearing, allow predefined clearing pr…
kittiu Jul 20, 2021
27c92c8
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Jul 21, 2021
7156109
[UPD] README.rst
OCA-git-bot Jul 21, 2021
05774ea
hr_expense_advance_clearing 14.0.1.1.0
OCA-git-bot Jul 21, 2021
93d04ce
[IMP] clearing tab on advance sheet
Saran440 Jul 21, 2021
c3e9f37
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Jul 21, 2021
28bc728
hr_expense_advance_clearing 14.0.1.2.0
OCA-git-bot Jul 21, 2021
b5f428f
[14.0][IMP] hr_expense_advance_clearing, add invisible fields on tree…
kittiu Jul 25, 2021
cfcca23
hr_expense_advance_clearing 14.0.1.2.1
OCA-git-bot Jul 25, 2021
b0e377d
[14.0][FIX] hr_expense_advance_clearing, fix access right on .read()
kittiu Jul 29, 2021
205319f
hr_expense_advance_clearing 14.0.1.2.2
OCA-git-bot Aug 19, 2021
e45d960
[IMP] hr_expense_advance_cleaing: show advance on employee view
Saran440 Aug 18, 2021
ad1a2a0
[FIX] update context
Saran440 Oct 29, 2021
3924e52
hr_expense_advance_clearing 14.0.1.2.3
OCA-git-bot Oct 29, 2021
f779bae
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Oct 30, 2021
be8c8d7
hr_expense_advance_clearing 14.0.1.3.0
OCA-git-bot Oct 30, 2021
0cdd015
[14.0][IMP] hr_expense_advance_clearing, add menus Advance/Expense
kittiu Nov 2, 2021
8b117cc
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Nov 3, 2021
fdfecad
hr_expense_advance_clearing 14.0.1.4.0
OCA-git-bot Nov 3, 2021
c449321
[FIX] constrains with advance clearing
Saran440 Nov 9, 2021
958127e
[FIX] return advance multi line advance
Saran440 Nov 9, 2021
7275cb2
[14.0][ENH] hr_expense_advance_clearing, better expense_post_return_a…
kittiu Nov 11, 2021
4714ace
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Nov 12, 2021
d173917
hr_expense_advance_clearing 14.0.1.4.1
OCA-git-bot Nov 12, 2021
f0ef3a4
[FIX] hr_expense_advance_clearing: add Clear Advance on tree view
ps-tubtim Nov 11, 2021
95f05a3
hr_expense_advance_clearing 14.0.1.4.2
OCA-git-bot Nov 16, 2021
7d82219
[FIX] skip_account_move_synchronization on post journal entries
Saran440 Nov 18, 2021
8ea066e
hr_expense_advance_clearing 14.0.1.4.3
OCA-git-bot Nov 19, 2021
220c35c
[14.0][FIX] hr_expense_advance_clearing, make expense_line_ids readon…
kittiu Nov 10, 2021
bfeaa9c
hr_expense_advance_clearing 14.0.1.4.4
OCA-git-bot Nov 22, 2021
96f2845
[FIX] onchange clearing advance for hooks
Saran440 Nov 22, 2021
7e544f6
hr_expense_advance_clearing 14.0.1.5.0
OCA-git-bot Nov 24, 2021
f26bba7
hr_expense_advance_clearing 14.0.1.5.1
OCA-git-bot Nov 24, 2021
4884db4
[FIX] hr_expense_advance_clearing: add context for clearing
ps-tubtim Nov 26, 2021
d89a4fa
[FIX] default return advance
Saran440 Dec 21, 2021
9ec1f57
hr_expense_advance_clearing 14.0.1.5.2
OCA-git-bot Dec 23, 2021
8d2e6ae
[FIX] return advance - redirect payment message
Saran440 Dec 28, 2021
1a158c0
[UPD] Update hr_expense_advance_clearing.pot
oca-travis Dec 29, 2021
486e3e8
hr_expense_advance_clearing 14.0.1.5.3
OCA-git-bot Dec 29, 2021
cca21dd
hr_expense_advance_clearing 14.0.1.5.4
OCA-git-bot Jan 19, 2022
1316a7e
[IMP] hr_expense_advance_clearing: black, isort, prettier
kittiu Mar 3, 2022
b7ece09
[15.0][MIG] hr_expense_advance_clearing]
kittiu Mar 3, 2022
83b5f89
[UPD] hr_expense_advance_clearing, use smart button instead of self o…
kittiu Mar 3, 2022
6ea58f0
[14.0][ENH] hr_expense_advance_clearing, not allow over return
kittiu May 28, 2022
fb3698d
[FIX] do not allow cancel PV related clearing or return
Saran440 Mar 26, 2022
83300c9
[FIX] test script - tax include price https://github.com/odoo/odoo/co…
Saran440 Oct 5, 2022
bff16a3
[FIX] payment return advance can related to advance
Saran440 Oct 17, 2022
b77b867
[UPD] Update hr_expense_advance_clearing.pot
Oct 28, 2022
b1a2c48
[UPD] README.rst
OCA-git-bot Oct 28, 2022
4726daf
[14.0][FIX] hr_expense_advance_clearing: allow general user to create…
ps-tubtim Nov 14, 2022
6a452b8
hr_expense_advance_clearing 15.0.1.0.1
OCA-git-bot Nov 28, 2022
b871ea8
[15.0][FIX] hr_expense_advance_clearing: zero unit price
ps-tubtim Feb 16, 2023
72e2d57
hr_expense_advance_clearing 15.0.1.1.0
OCA-git-bot Mar 9, 2023
b625c90
[FIX] update readme
Saran440 Feb 22, 2023
a9cd35d
[FIX] hr_expense_advance_clearing: change field not compute advance
Saran440 Mar 16, 2023
a8c2d49
hr_expense_advance_clearing 15.0.1.2.0
OCA-git-bot Apr 28, 2023
f63bb1f
[UPD] README.rst
OCA-git-bot Apr 28, 2023
93e46f9
[IMP] hr_expense_advance_clearing: pre-commit stuff
jumeldi74 Jun 26, 2023
f4a8c99
[MIG] hr_expense_advance_clearing: Migration to 16.0
jumeldi74 Jun 26, 2023
5abeaf6
[MIG] hr_expense_advance_clearing: Migration to 16.0 (revision of uni…
jumeldi74 Jun 26, 2023
2613783
[MIG] hr_expense_advance_clearing: Migration to 16.0 (revision 2 of u…
jumeldi74 Jun 26, 2023
578add5
[MIG] hr_expense_advance_clearing: Migration to 16.0 (revision 3 of u…
jumeldi74 Jun 26, 2023
221558b
[MIG] hr_expense_advance_clearing: Migration to 16.0 - revision workf…
jumeldi74 Jul 6, 2023
989a9ae
[MIG] hr_expense_advance_clearing: Migration to 16.0 - revision 4: cl…
jumeldi74 Jul 7, 2023
77d3633
[MIG] hr_expense_advance_clearing: Migration to 16.0 - revision 5: cl…
jumeldi74 Jul 13, 2023
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
154 changes: 154 additions & 0 deletions hr_expense_advance_clearing/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
=============================
Employee Advance and Clearing
=============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/licence-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%2Fhr--expense-lightgray.png?logo=github
:target: https://github.com/OCA/hr-expense/tree/15.0/hr_expense_advance_clearing
:alt: OCA/hr-expense
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_advance_clearing
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/289/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

Standard Expenses module allow employee to do the expense reimbursement only after the expense has been made.
In other world, employee will need to pay first and reimburse later.

This module, allow company to advance an amount to the employee.
Employee can then use that advance amount to purchase product/service first, then back to company and do the clearing.

There can be 3 scenarios for advance and clearing

* When clearing amount = advance amount, no other operation is required.
* When clearing amount > advance amount, company will pay the extra to employee.
* When clearing amount < advance amount, employee will return the remain to company.

**Table of contents**

.. contents::
:local:

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

This module will create a new product "Employee Advance" automatically.
You will need to setup the Expense Account of this product to your Employee Advance account manually.

* Open Product window and search for "Employee Advance"
* On Accounting tab, select appropriate employee advance account from your chart of account

Note:

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

Usage
=====

To use this module, you must configure product "Employee Advance" with account type = Current Asset and check Allow Reconciliation.
After that, you can step following:

**Create an Employee Advance**

#. Go to Expenses > My Expenses > Advances
#. Create sheet and add a line with advance
#. As an option, the user can also set the "Clearing Product". If this is set, on the clear advance step, the clearing product will create a default product line.
#. Set the unit price to advance amount > Save
#. As normal, do Submit to Manager > Approve > Post Journal Entries > Register Payment.
#. As this is Advance, you will see a new field "Amount to clear".

**Clear Advance**

you can do 2 ways,

#. Create clearing from advance document
#. Go to Expenses > My Expenses > Advances
#. Search for the Advance you want to clear, or use filter "Advance (not cleared)" to see all uncleared advance.
#. Open an Advance which is now in paid status with some Amount to be cleared.
#. Click button "Clear Advance", system will create new Expense Report with reference to the previous step Advance.
#. Create name clearing and Save (must save first)
#. Edit > Add or create Expense line(s) as normal.
#. As normal, do Approve > Post Journal Entries
#. Create clearing from new expense
#. Go to Expenses > My Expenses > Expenses
#. Create sheet and reference advance with field "Clear Advance" > Save (must save first)
#. Edit > Add or create Expense line(s) as normal.
#. As normal, do Approve > Post Journal Entries

Note:

* If the total expense amount less than or equal to the advance amount, the status will be set to Paid right after post journal entries.
* If the total expense amount more than the advance amount, Register Payment will pay the extra amount then set state to Paid.

**Return Advance**

#. Go to Expenses > My Expenses > Advances
#. Search for the Advance you want to clear, or use filter "Advance (not cleared)" to see all uncleared advance.
#. Open an Advance which is now in paid status with some Amount to be cleared.
#. Click button "Return Advance" will open Register Payment wizard with Amount to clear.
#. Click button "Create Payment" to return that amount back
#. All returned, Amount to clear is now equal to 0.0

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-expense/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_advance_clearing%0Aversion:%2015.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
~~~~~~~

* Ecosoft

Contributors
~~~~~~~~~~~~

* Kitti Upariphutthiphong <[email protected]>
* Tharathip Chaweewongphan <[email protected]>
* Saran Lim. <[email protected]>

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.

.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px
:target: https://github.com/kittiu
:alt: kittiu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-kittiu|

This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/15.0/hr_expense_advance_clearing>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions hr_expense_advance_clearing/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from . import wizard
21 changes: 21 additions & 0 deletions hr_expense_advance_clearing/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2019 Kitti Upariphutthiphong <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Employee Advance and Clearing",
"version": "16.0.1.0.0",
"category": "Human Resources",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/hr-expense",
"depends": ["hr_expense"],
"data": [
"data/advance_product.xml",
"views/account_payment_view.xml",
"views/hr_expense_views.xml",
"views/hr_employee_views.xml",
"views/hr_employee_public_views.xml",
],
"installable": True,
"maintainers": ["kittiu"],
}
13 changes: 13 additions & 0 deletions hr_expense_advance_clearing/data/advance_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="product_emp_advance" model="product.product">
<field name="name">Employee Advance</field>
<field name="default_code" />
<field name="type">service</field>
<field name="sale_ok" eval="False" />
<field name="purchase_ok" eval="False" />
<field name="can_be_expensed" eval="False" />
<field name="supplier_taxes_id" eval="False" />
<field name="taxes_id" eval="False" />
</record>
</odoo>
Loading