Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 19.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.18 MB
Module directory on disk
Code analysis 0 migration notes 5 models 9 views 0 HTTP endpoints

Description

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.

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 9

XML IDNameModelTypeStatus
hr_expense_view_form_trip hr.expense.view.form.trip hr.expense form Inherits hr_expense.hr_expense_view_form
hr_expense_view_search_trip hr.expense.view.search.trip hr.expense search Inherits hr_expense.hr_expense_view_search
hr_expense_view_tree_trip hr.expense.view.tree.trip hr.expense tree Inherits hr_expense.hr_expense_view_expenses_analysis_tree
hr_trip_view_form hr.trip.view.form hr.trip form New
hr_trip_view_list hr.trip.view.list hr.trip list New
hr_trip_view_search hr.trip.view.search hr.trip search New
report_hr_trip report_hr_trip ir.ui.view qweb New
report_hr_trip_document report_hr_trip_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.hr.expense.trip res.config.settings form Inherits hr_expense.res_config_settings_view_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 5

New fields (4)
  • trip_end_date Datetime
    related='trip_id.end_date' store=False
  • trip_id Many2one → hr.trip
    comodel_name='hr.trip' copy=False domain="[('employee_id', '=', employee_id)]" index=True ondelete='set null'
  • trip_start_date Datetime
    related='trip_id.start_date' store=False
  • trip_state Selection
    related='trip_id.state' store=False
Public methods (5)
  • action_add_existing_expenses(self)
  • action_create_trip(self)
  • action_post(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (0)

No new fields.

Public methods (1)
  • action_post_entry(self)

New fields (14)
  • account_move_ids Many2many → account.move
    comodel_name='account.move' compute='_compute_account_move_ids' compute_sudo=True string='Journal Entries'
  • can_create_bill Boolean
    compute='_compute_can_create_bill'
  • can_edit_trip_info Boolean
    compute='_compute_can_edit_trip_info' help='Whether the current user may edit the trip information (name, dates, employee, partner) in the current state.'
  • code Char
    copy=False readonly=True
  • employee_id Many2one → hr.employee
    comodel_name='hr.employee' default=<expr> domain=[('filter_for_expense', '=', True)]
  • end_date Datetime
    required=True tracking=True
  • expense_ids One2many → hr.expense
    comodel_name='hr.expense' domain="[('employee_id', '=', employee_id), ('trip_id', 'in', [False, id]), ('state', 'in', ['draft', 'submitted', 'approved'])]" inverse_name='trip_id'
  • name Text
  • note Html
    help='Internal note on the trip, printed below the expenses on the trip report.'
  • overlapping_trip_ids Many2many → hr.trip
    comodel_name='hr.trip' compute='_compute_overlapping_trip_ids' help="Other trips of the same employee that overlap this trip's period." string='Overlapping Trips'
  • partner_id Many2one → res.partner
    comodel_name='res.partner'
  • report_attachment_id Many2one → ir.attachment
    comodel_name='ir.attachment' copy=False readonly=True string='Trip Report'
  • start_date Datetime
    required=True tracking=True
  • state Selection
    compute='_compute_state' copy=False default='draft' help='A done trip becomes paid once all its journal entries are paid, and returns to done when one of them is no longer paid.' readonly=False selection=[('draft', 'Draft'), ('request', 'Requested'), ('receipts', 'Collect Receipts'), ('done', 'Done'), ('paid', 'Paid')] store=True tracking=True
Public methods (9)
  • action_add_more_receipts(self)
  • action_approve(self)
  • action_done(self)
  • action_open_account_move(self)
  • action_post(self)
    Post approved expenses and attach trip-related attachments to resulting moves. For company-paid expenses, moves are created immediately and can be attached synchronously. For employee-paid expenses, attachment is deferred via wizard-side integration.
  • action_print_trip(self)
  • action_request_approval(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (0)

No new fields.

Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • setup_company_trip_sequences(self)
    @api.model
    Create the trip sequence for every company that has none yet.

New fields (1)
  • hr_trip_require_approval Boolean
    config_parameter='hr_expense_trip.require_approval' string='Require Trip Approval'
Public methods (0)

No public methods.