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

Repository Versions:

Modules:

Purpose

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

The HR Expense Change - Analytic module extends the functionality of Hibou's HR Expense Change module, allowing users to change the analytic account on expense lines that have been approved or posted. 

Getting Started

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


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

Odoo CMS - a big picture

Good to Know!

This module requires both Hibou's HR Expense Change and Odoo's Analytic Accounting modules. However, if you do not already have these modules installed, Odoo will install them for you during this module's installation!

Processes

To get started, navigate to the Expenses application.

Odoo - Sample 1 for three columns


Changing the Analytic Account on an Approved Expense

Once there, go to Expense Reports > To Post. This brings you to a list of expense reports that have been approved. Click on an expense report to open it.


Under the Expense tab, click the  icon next to the expense line on which you wish to change the Analytic Account.


This will present a pop-up modal for the expense change wizard. In addition to the ability to change the Expense Date (provided by the HR Expense Change module), there is also now an option to change the Analytic Account. Select the Analytic Account. When finished, hit Change.

Odoo CMS - a big picture

On the expense sheet, you will see that the Analytic Account has been updated accordingly.


Changing the Analytic Account on a Posted Expense

To change the analytic account on a posted expense, go to Expense Reports > To Pay. This brings you to a list of Approved and Posted expenses. Select a Posted expense report from the list.


Under the EXPENSE tab, click the  icon next to the expense line on which you wish to change the Analytic Account.


This will present a pop-up modal for the expense change wizard. In addition to the ability to change the Expense Date (provided by the HR Expense Change module), there is also now an option to change the Analytic Account. Select the Analytic Account. When finished, hit CHANGE.


On the expense sheet, you will see that the Analytic Account 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 Analytic Account has been updated.


Important!

If two, or more, expense lines use the same Analytic Account, then changing one at that point will change all using that account.

For example, in the below scenario, both of the expenses on the posted expense sheet use the Analytic Account of "Travel".


When you use the expenses change wizard, when you select a different Analytic Account, you will receive a warning that notifies you of other expenses that will also be changed.

Technical

The HR Expense Change - Analytic module adds to the existing Expense Change wizard.

  • `account_analytic_id` Many2one field for the Analytic Account to be changed

  • `analytic_account_warning` Char field that is computed to dynamically warn about outcomes.

The dynamic warning will warn if making the analytic account change will need to affect other expenses because of conflicts.  Specifically, this never happens if the Expense Sheet doesn't have a journal entry.  If there is a journal entry, and you have two expenses with the same Analytic account, then both expenses will become the new analytic account.