forked from OCA/field-service
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge OCA changes
- Loading branch information
Showing
11 changed files
with
198 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
fsm_tag, | ||
fsm_location, | ||
fsm_person, | ||
fsm_vehicle, | ||
fsm_order, | ||
fsm_route, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (C) 2018 - TODAY, Brian McMaster | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class FSMVehicle(models.Model): | ||
_name = 'fsm.vehicle' | ||
_description = 'Field Service Vehicle' | ||
|
||
name = fields.Char(string='Name', required='True') | ||
fsm_person_id = fields.Many2one('fsm.person', string='Assigned Driver') | ||
|
||
_sql_constraints = [ | ||
('name_uniq', 'unique (name)', "Vehicle name already exists!"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<!-- Field Service Vehicle --> | ||
<record id="fsm_vehicle_tree_view" model="ir.ui.view"> | ||
<field name="name">fsm.vehicle.tree</field> | ||
<field name="model">fsm.vehicle</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Vehicles"> | ||
<field name="name"/> | ||
<field name="fsm_person_id"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="fsm_vehicle_form_view" model="ir.ui.view"> | ||
<field name="name">fsm.vehicle.form</field> | ||
<field name="model">fsm.vehicle</field> | ||
<field name="arch" type="xml"> | ||
<form string="Vehicle"> | ||
<sheet> | ||
<group> | ||
<group> | ||
<field name="name"/> | ||
</group> | ||
<group> | ||
<field name="fsm_person_id"/> | ||
</group> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<!-- Field Service Vehicles --> | ||
<record id="action_fsm_vehicle" model="ir.actions.act_window"> | ||
<field name="name">Field Service Vehicles</field> | ||
<field name="res_model">fsm.vehicle</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="help" type="html"> | ||
<p class="oe_view_nocontent_create"> | ||
Add a Field Service Vehicle here. | ||
</p> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters