1 (206) 800-7778 [email protected]

Hibou Odoo Suite: HR Expense Lead

Repository Versions:

Modules:

Author:

Hibou Corp.

License:

AGPL-3


Purpose

The purpose of this documentation is to outline the use case and processes associated with Hibou's HR Expense Lead module for Odoo.

The HR Expense Lead module allows you to assign Opportunities and Leads to expenses for reporting purposes, allowing you to better calculate the cost of closing a sale.

Getting Started

First thing's first, we want to install the module! Navigate to the Apps application and search for 'HR Expense Lead'. When ready, click Install .

Odoo CMS - a big picture

  Good to Know!

This module requires both the HR Expense and CRM applications. However, if you do not already have these applications 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


Adding an Opportunity/Lead to Expenses

Once there, select an existing Expense or create one by clicking Create .

You will see a new Lead field below the Employee field. Select an existing Lead from the dropdown menu or create a new one by clicking Create and Edit... Fill in the rest of the fields on the expense, as you normally would.

When ready, hit Save .

Odoo CMS - a big picture

Accessing Lead Expenses

Navigate to the CRM application.

Odoo - Sample 1 for three columns


Click on the Lead you selected for your recent Expense. You will now see a smart button with the total monetary value of expenses for this lead!

Odoo CMS - a big picture

Click the Expenses smart button to continue to a new list view of all expenses for this lead.

Odoo CMS - a big picture

Technical

This module adds a new Expenses smart button to the Lead form view that dynamically displays the monetary value of expenses for that lead. The smart button leads to a new view for the corresponding lead's expenses. Additionally, there is a new Lead field `lead_if` on expenses `hr.expense`.

The CRM Lead `crm.lead` model gets two new fields:

  • expense_total_amount` computed Float field, used in the Expenses smart button on the Lead form view

  • `expense_ids` One2many field for expenses with the lead's id

The Expense form view get's the new `lead_id` field and it is also added to the Expense filter view.