Hibou Odoo Suite: Human Resources (HR) Modules: HR Expense Change

Repository Versions:

Modules:

Author:

Hibou Corp.

License:

AGPL-3

Purpose

This documentation outlines the use case and processes associated with Hibou's HR Expense Change module for Odoo 12.

The HR Expense Change module serves as a technical foundation for changing expense details. The wizard provided by HR Expense Change allows you to change the Expense Date after the expense is approved or posted.

Getting Started

First thing's first, we want to install the module! Navigate to the Apps application.


Once there, remove the 'Apps' filter, then search for 'HR Expense Change'. When ready, click Install

Odoo CMS - a big picture

Good to Know!

The HR Expense Change module requires Odoo's Expenses app. However, if you do not already have this app installed, Odoo will install it for you during this module's installation!

Processes

To get started, navigate to the Expenses application.

Odoo - Sample 1 for three columns


Changing an Approved Expense

Once there, go to expense reports > To ApproveThis will bring you to a list of expense sheets to approve. Click on an expense sheet to open it.


Move to the Expense tab. Click the new  change icon next to the expense line on which you wish to change the Expense Date.


This will present a pop-up modal for the expense change wizard. Change the Expense Date. When finished, click  Change.



On the expense sheet, you will see that the Expense Date has been updated accordingly.


Changing a Posted Expense

To change an already-posted expense, click Expense Reports > To Post. Once there, remove the 'To Post' filter. (You may also use the other two sub-menu items to access this view.)


This will provide you with a list of all expense sheets, regardless of status. You may also select and change Approved expense sheets from this list. Click on a Posted expense sheet to open it.


Move to the EXPENSE tab. Click the new  change icon next to the expense line on which you wish to change the Expense Date.


This will present a pop-up modal for the expense change wizard. Change the Expense Date. When finished, hit Change.


On the expense sheet, you will see that the Expense Date has been updated accordingly.


To see how this modified the journal entry, select the Other Info tab and click on the linked journal entry.


On the journal entry, you will see that the dates have been updated.


Technical

The HR Expense Change module is the technical foundation for modifying expenses. It creates a wizard and permissions for making expense changes that can be handled by other modules. This particular module implements the ability to change the Expense Date field.

There is a new Transient Model (Wizard) `hr.expense.change` with the following fields:

  • `expense_id` Many2one field for the Expense to be changed

  • `expense_company_id` Many2one field related to the `expense_id`'s company id

  • `date` Expense Date field for the expense and subsequent Accounting Moves

An action button Change  is added to the expense sheet form view on every expense line.