Repository
OCA/vertical-travel · module folder · Try on Runboat
Module version
1.0.0
Category
Customer Relationship Management
Folder size
0.05 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
http://www.savoirfairelinux.com
Last tracking update
2026-08-07 07:17:53
Authors
Savoir-faire Linux, Odoo Community Association (OCA)
Maintainers
Savoir-faire Linux
Committers
Pedro M. Baeza, Stéphane Bidoul (ACSONE)
Odoo dependencies
OCA/partner-contact:
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
travel_accommodation, travel_hr, travel_journey, travel_passport, travel_purchase, travel_rental_car, travel_rental_service
Description
Travel
======

Travel management with passengers.

Contributors
------------
* Sandy Carter (sandy.carter@savoirfairelinux.com)

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
travel_calendar_view Travel Calendar View travel.travel calendar New
travel_form_view Travel Form View travel.travel form New
travel_passenger_form_view Travel Passenger Form View travel.passenger form New
travel_tree_view Travel Tree View travel.travel tree New
view_travel_configuration travel settings travel.config.settings form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (1)
  • basic_passenger_limit Integer
    default=<expr> help='Limit number of passengers to organize travels by non-managers.' args: 'Basic Passenger Limit'
Public methods (2)
  • get_basic_passenger_limit(self)
    @api.model
    Return set passenger limit if it set, otherwise get default
  • set_basic_passenger_limit(self)
    @api.one
    Set passenger limit in config params

New fields (4)
  • partner_id Many2one → res.partner
    help='Name of Passenger.' ondelete='cascade' required=True args: 'res.partner', 'Passenger'
  • travel_id Many2one → travel.travel
    help='Travel for which the passenger is participating.' args: 'travel.travel', 'Travel'
  • travel_name Char
    related='travel_id.name' string='Travel'
  • travel_state Selection
    related='travel_id.state' string='State'
Public methods (3)
  • action_passenger_form_view(self)
    @api.multi
    Call action, if there is a travel, put it in the name. Insert default dates in context
  • name_get(self)
    @api.multi
    Get name of partner
  • on_change_partner_id(self)
    @api.onchange('partner_id')
    Placeholder function to be inherited

New fields (7)
  • city_ids Many2many → res.better.zip
    help='Destination cities of travel.' string='Locations' args: 'res.better.zip'
  • date_start Date
    required=True args: 'Start Date'
  • date_stop Date
    required=True args: 'End Date'
  • manager_only Boolean
    function='is_manager_only' help='Can only be edited by a manager' args: 'Manager'
  • name Char
    required=True args: 'Name of travel'
  • passenger_ids One2many → travel.passenger
    help='List of passengers.' args: 'travel.passenger', 'travel_id', 'Passengers'
  • state Selection
    default='draft' readonly=True args: [('draft', 'Draft'), ('open', 'Saved'), ('booking', 'In Reservation'), ('reserved', 'Reserved'), ('confirmed', 'Confirmed'), ('done', 'Closed')], 'Status'
Public methods (10)
  • check_date(self)
    @api.constrains('date_start', 'date_stop')
  • create(self, vals)
    @api.model
    Warn if user tried to create travel with too many passengers for according to his security role.
  • is_manager_only(self)
    @api.multi
  • travel_book(self)
    @api.multi
    Put the state of the travel into booking
  • travel_close(self)
    @api.multi
    Put the state of the travel into done
  • travel_confirm(self)
    @api.multi
    Put the state of the travel into confirmed
  • travel_open(self)
    @api.multi
    Put the state of the travel into open
  • travel_reserve(self)
    @api.multi
    Put the state of the travel into reserved
  • unlink(self)
    @api.multi
    Prevent deletion if travel isn't in draft Warn if ids being deleted contain a travel which has too many passengers for the current user to delete.
  • write(self, vals)
    @api.multi
    Warn if user does not have rights to modify travel with current number of passengers or to add more than the limit.

Loading…

Loading…

Loading…