Skip to content

Commit

Permalink
Merge branch '15.0' of https://github.com/OCA/hr-expense into 15.0-mi…
Browse files Browse the repository at this point in the history
…g-hr_expense_substate
  • Loading branch information
Saran440 committed Feb 7, 2023
2 parents 21660e8 + 05aadfd commit 4117d44
Show file tree
Hide file tree
Showing 64 changed files with 2,866 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.11.0
_commit: v1.14.1
_src_path: gh:oca/oca-addons-repo-template
ci: GitHub
dependency_installation_mode: PIP
generate_requirements_txt: true
github_check_license: true
github_ci_extra_env: {}
github_enable_codecov: true
github_enable_makepot: true
github_enable_stale_action: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fi
done
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
name: ${{ matrix.name }}
strategy:
Expand Down
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ repos:
entry: found forbidden files; remove them
language: fail
files: "\\.rej$"
- id: en-po-files
name: en.po files cannot exist
entry: found a en.po file
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/oca/maintainer-tools
rev: dfba427ba03900b69e0a7f2c65890dc48921d36a
hooks:
Expand Down Expand Up @@ -96,15 +101,15 @@ repos:
- id: pyupgrade
args: ["--keep-percent-format"]
- repo: https://github.com/PyCQA/isort
rev: 5.9.3
rev: 5.12.0
hooks:
- id: isort
name: isort except __init__.py
args:
- --settings=.
exclude: /__init__\.py$
- repo: https://github.com/acsone/setuptools-odoo
rev: 3.0.3
rev: 3.1.8
hooks:
- id: setuptools-odoo-make-default
- id: setuptools-odoo-get-requirements
Expand All @@ -113,7 +118,7 @@ repos:
- requirements.txt
- --header
- "# generated from manifests external_dependencies"
- repo: https://gitlab.com/PyCQA/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[hr_expense_advance_clearing](hr_expense_advance_clearing/) | 15.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Employee Advance and Clearing
[hr_expense_advance_clearing](hr_expense_advance_clearing/) | 15.0.1.0.1 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Employee Advance and Clearing
[hr_expense_cancel](hr_expense_cancel/) | 15.0.1.0.0 | | Hr expense cancel
[hr_expense_exception](hr_expense_exception/) | 15.0.1.0.0 | | Custom exceptions on expense report
[hr_expense_invoice](hr_expense_invoice/) | 15.0.1.1.1 | | Supplier invoices on HR expenses
[hr_expense_invoice](hr_expense_invoice/) | 15.0.1.1.2 | | Supplier invoices on HR expenses
[hr_expense_payment](hr_expense_payment/) | 15.0.1.0.0 | | HR Expense Payment
[hr_expense_petty_cash](hr_expense_petty_cash/) | 15.0.1.0.0 | | Petty Cash
[hr_expense_portal](hr_expense_portal/) | 15.0.1.0.0 | | Show current expense in a website.
[hr_expense_sequence](hr_expense_sequence/) | 15.0.1.0.0 | | HR expense sequence
[sale_expense_manual_reinvoice](sale_expense_manual_reinvoice/) | 15.0.1.0.1 | [![ivantodorovich](https://github.com/ivantodorovich.png?size=30px)](https://github.com/ivantodorovich) | Allow to manually re-invoice expenses

[//]: # (end addons)
Expand Down
2 changes: 1 addition & 1 deletion hr_expense_advance_clearing/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Employee Advance and Clearing",
"version": "15.0.1.0.0",
"version": "15.0.1.0.1",
"category": "Human Resources",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
3 changes: 1 addition & 2 deletions hr_expense_advance_clearing/views/hr_expense_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,14 @@
string="Clear Advance"
class="oe_highlight"
attrs="{'invisible': ['|', '|', ('advance', '=', False), ('state', '!=', 'done'), ('clearing_residual', '=', 0.0)]}"
groups="account.group_account_manager"
/>
<button
name="action_register_payment"
type="object"
string="Return Advance"
attrs="{'invisible': ['|', '|', ('advance', '=', False), ('state', '!=', 'done'), ('clearing_residual', '=', 0.0)]}"
context="{'hr_return_advance': True}"
groups="account.group_account_manager"
groups="account.group_account_user"
/>
</field>
<h1 position="after">
Expand Down
2 changes: 1 addition & 1 deletion hr_expense_invoice/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Supplier invoices on HR expenses",
"version": "15.0.1.1.1",
"version": "15.0.1.1.2",
"category": "Human Resources",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
4 changes: 2 additions & 2 deletions hr_expense_invoice/tests/test_hr_expense_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
from odoo.tests.common import Form


class TestHrExpenseInvoice(common.SavepointCase):
class TestHrExpenseInvoice(common.TransactionCase):
@classmethod
def setUpClass(cls):
super(TestHrExpenseInvoice, cls).setUpClass()
super().setUpClass()

cls.account_payment_register = cls.env["account.payment.register"]
cls.payment_obj = cls.env["account.payment"]
Expand Down
131 changes: 131 additions & 0 deletions hr_expense_petty_cash/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
==========
Petty Cash
==========

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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_petty_cash
: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_petty_cash
: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|

This module work about expense that paid by petty cash.

General Process:

#. Create Petty Cash Holder
#. Transfer cash to Petty Cash Holder (by using Vendor Bill)
#. You can create expense paid by petty cash and select petty cash holder.
#. Then balance of petty cash holder less than amount of expense, you must transfer cash to petty cash holder before Submit Report to Manager.

**Table of contents**

.. contents::
:local:

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

**Create a Petty Cash Account**

#. Go to Invoicing > Accounting > Petty Cash
#. Create a new petty cash account
#. Type = Bank and Cash or Account type that is asset

Note:

* You will need the "Show Full Accounting Features" to see accounting data

Usage
=====

**Create a Petty Cash Holder**

#. Go to Invoicing > Accounting > Petty Cash
#. Create a new petty cash holder
#. Select Petty Cash Account and Journal (optional)

**Add Balance for Petty Cash Holder**

#. Go to Invoicing > Vendor > Bill
#. Create a new vendor bill
#. Select Vendor (Petty Cash Holder)
#. Check Petty Cash will auto line with Unit Price = Max Limit - Balance

**Create an Expense paid by Petty Cash**

#. Go to Expenses > My Expenses
#. Create a new expense
#. Select Paid by = Petty Cash and Select Petty Cash Holder

**Create an Expense Report paid by Petty Cash**

#. Go to Expenses > My Expense Reports
#. Create a new expense report
#. Select or Create expenses Paid by Petty Cash and same Petty Cash Holder

Note : Bill and Expense will default journal from petty cash holder,
if you configure journal in petty cash holder.

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_petty_cash%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
~~~~~~~~~~~~

* `Ecosoft <http://ecosoft.co.th>`__:

* Pimolnat Suntian <[email protected]>
* Saran Lim. <[email protected]>

* `Trinityroots <http://trinityroots.co.th>`__:

* Santi Techatoo <[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.

This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/15.0/hr_expense_petty_cash>`_ 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_petty_cash/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2019 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
20 changes: 20 additions & 0 deletions hr_expense_petty_cash/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2019 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Petty Cash",
"version": "15.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": [
"security/ir.model.access.csv",
"views/account_move_views.xml",
"views/hr_expense_sheet_views.xml",
"views/hr_expense_views.xml",
"views/petty_cash_views.xml",
],
"installable": True,
}
Loading

0 comments on commit 4117d44

Please sign in to comment.