Metadata-Version: 2.1
Name: odoo-addon-hr_expense_trip
Version: 19.0.1.0.0.2
Requires-Dist: odoo==19.0.*
Summary: Add trip management to HR Expenses
Home-page: https://github.com/OCA/hr-expense
License: LGPL-3
Author: Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

============
Expense Trip
============

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:f195193fd0ce2e11ce399b4380d027a4b59641437cf9a72e03a084a23bdff333
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github
    :target: https://github.com/OCA/hr-expense/tree/19.0/hr_expense_trip
    :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-19-0/hr-expense-19-0-hr_expense_trip
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=19.0
    :alt: Try me on Runboat

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

This module introduces **Trips** in Expenses so employees can group
related expense lines under a single business trip.

Key features:

- Create trips with employee, date range, partner, and reason.
- Per-company trip numbering (``TP-<year>-0001``), created automatically
  for existing and newly created companies.
- Link existing expense lines to a trip from the trip form.
- Open linked expenses directly from the trip to review details.
- Optional manager approval flow before collecting receipts.
- Role-based access for employees, approvers, and administrators.
- Dedicated "Trip to Process" workspace for managers/approvers.
- Generate and attach a trip PDF report when the trip is marked done.
- Automatic bill creation from approved expenses with trip PDF
  attachment.

**Table of contents**

.. contents::
   :local:

Usage
=====

1. Go to *Expenses > My Trips* and create a new trip.
2. Fill in the trip name, dates, employee, and optional partner/reason.
3. Click *Request Approval*: In this step, pre-trip approvals can be
   handled, and additional workflows can be triggered after approval
   (for example an A1 certificate process).

   - If **Require Trip Approval** is disabled (default), the trip moves
     directly to *Collect Receipts*.
   - Otherwise, if the requester is already an allowed approver for that
     trip, it is approved immediately without creating an activity.
   - Otherwise, a *Trip Approval Request* activity is created for the
     employee's manager (or the expense approver if no manager is set).
     The activity is marked as done when the trip is approved.

4. In the *Expenses* tab, use *Add* to select existing draft expenses
   for the same employee, then save.
5. Click an expense line to open the *hr.expense* form when you need to
   review or edit that expense.
6. When all expenses are complete, click *Mark as Done* to finalize the
   trip and attach the generated trip report in chatter. If you click
   *Add More Receipts* and mark the trip as done again, the report is
   updated.
7. To create bills from approved expenses, click *Create Bill* (visible
   only when trip is in state done all expenses are in approved state).
   This will post all expenses and attach the trip PDF to each resulting
   bill.
8. Once all journal entries of the trip are paid, the trip moves to
   *Paid*. If a payment is removed again and a journal entry is no
   longer paid, the trip returns to *Done*.

Use the *Note* tab to add remarks to the trip, for example about missing
receipts. The note is printed on the trip report below the expenses.

Role behavior
-------------

- Employees can create and edit their own trips.
- Managers/approvers can view and approve trips they are responsible
  for.
- Expense administrators can edit all trips.
- After a trip is approved, only managers/administrators can edit trip
  information.
- The *Expenses* tab remains editable until the trip reaches *Done*.
- A trip in state *Done* or *Paid* is locked for everyone, including
  administrators: neither the trip information nor its expenses can be
  changed and the trip cannot be deleted. Expenses can no longer be
  linked to or unlinked from the trip. Click *Add More Receipts* to
  reopen the trip.

Manager processing menu
-----------------------

Managers can open *Expenses > Trip to Process* to review requested trips
where they are responsible as manager.

Create Bill feature
-------------------

The *Create Bill* button is automatically displayed when all expenses
linked to the trip are in approved state and the trip is in state done.
Clicking this button will:

1. Post all approved expenses and create bills.
2. Automatically attach the trip PDF report to each created bill in the
   chatter.
3. Navigate to the created bill(s) for review.

This streamlines the billing process by ensuring the trip documentation
is automatically associated with the financial records.

Configuration
-------------

To require a manager approval for trips, go to *Expenses > Configuration
> Settings* and in the *Trips* section enable *Require Trip Approval*.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_trip%0Aversion:%2019.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
=======

Contributors
------------

- `glueckkanja AG <https://www.glueckkanja.com>`__:

  - Christopher Rogos

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-CRogos| image:: https://github.com/CRogos.png?size=40px
    :target: https://github.com/CRogos
    :alt: CRogos

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

|maintainer-CRogos| 

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

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