Expense Trip
hr_expense_trip · OCA/hr-expense
Health
60/100
fair
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 19.0
Heuristic over the facts below, not an audit · How it's computed
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
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 9
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_dateDatetimerelated='trip_id.end_date'store=False -
trip_idMany2one → hr.tripcomodel_name='hr.trip'copy=Falsedomain="[('employee_id', '=', employee_id)]"index=Trueondelete='set null' -
trip_start_dateDatetimerelated='trip_id.start_date'store=False -
trip_stateSelectionrelated='trip_id.state'store=False
-
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_idsMany2many → account.movecomodel_name='account.move'compute='_compute_account_move_ids'compute_sudo=Truestring='Journal Entries' -
can_create_billBooleancompute='_compute_can_create_bill' -
can_edit_trip_infoBooleancompute='_compute_can_edit_trip_info'help='Whether the current user may edit the trip information (name, dates, employee, partner) in the current state.' -
codeCharcopy=Falsereadonly=True -
employee_idMany2one → hr.employeecomodel_name='hr.employee'default=<expr>domain=[('filter_for_expense', '=', True)] -
end_dateDatetimerequired=Truetracking=True -
expense_idsOne2many → hr.expensecomodel_name='hr.expense'domain="[('employee_id', '=', employee_id), ('trip_id', 'in', [False, id]), ('state', 'in', ['draft', 'submitted', 'approved'])]"inverse_name='trip_id' -
nameText -
noteHtmlhelp='Internal note on the trip, printed below the expenses on the trip report.' -
overlapping_trip_idsMany2many → hr.tripcomodel_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_idMany2one → res.partnercomodel_name='res.partner' -
report_attachment_idMany2one → ir.attachmentcomodel_name='ir.attachment'copy=Falsereadonly=Truestring='Trip Report' -
start_dateDatetimerequired=Truetracking=True -
stateSelectioncompute='_compute_state'copy=Falsedefault='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=Falseselection=[('draft', 'Draft'), ('request', 'Requested'), ('receipts', 'Collect Receipts'), ('done', 'Done'), ('paid', 'Paid')]store=Truetracking=True
-
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.modelCreate the trip sequence for every company that has none yet.
New fields (1)
-
hr_trip_require_approvalBooleanconfig_parameter='hr_expense_trip.require_approval'string='Require Trip Approval'
No public methods.