2
In order to check the transport module in OpenERP.
4
create transport point.
6
!record {model: 'transport.point', id: transport_point_0}:
10
Call Search mathod in transport.point
12
!python {model: transport.point}: |
13
self.search(cr, uid,[],{},{},{},{"lang": 'en_US', "name":
16
Call Search mathod in transport.point with context={}
18
!python {model: transport.point}: |
19
self.search(cr, uid,[])
21
create vehicle driver.
23
!record {model: 'hr.employee', id: hr_employee_0}:
27
create transport vehicle.
29
!record {model: 'transport.vehicle', id: transport_vehicle_0}:
30
driver_id: hr_employee_0
34
create transport vehicle.
36
!record {model: 'transport.vehicle', id: transport_vehicle_1}:
37
driver_id: hr_employee_0
41
Call Search mathod in transport.vehicle
43
!python {model: transport.vehicle}: |
44
self.search(cr, uid,[],{},{},{},{"lang": 'en_US', "name":
47
Call Search mathod in transport.vehicle with context={}
49
!python {model: transport.vehicle}: |
50
self.search(cr, uid,[])
52
Call Search mathod in transport.participant
54
!python {model: transport.participant}: |
55
self.search(cr, uid,[],{},{},{},{"lang": 'en_US', "name":
58
Call Search mathod in transport.participant with context={}
60
!python {model: transport.participant}: |
61
self.search(cr, uid,[])
63
I Create the one transport root.
65
!record {model: 'student.transport', id: transport_root_0}:
66
name: 'Ahmedabad-Unjha'
67
start_date: '2011-08-02'
68
end_date: '2012-08-20'
69
contact_per_id: school.demo_student_student_6
71
Do one registration of the participant
73
!record {model: 'transport.registration', id: transport_registration_0}:
74
name: transport_root_0
75
part_name: school.demo_student_student_1
76
reg_date: '2011-08-13'
77
reg_end_date: '2011-12-13'
79
vehicle_id: transport_vehicle_0
80
point_id: transport_point_0
83
Do one entry of the transport.participant
85
!record {model: 'transport.participant', id: transport_participant_0}:
86
name: school.demo_student_student_1
87
transport_id: transport_root_0
88
stu_pid_id: '123-456-789'
89
tr_reg_date: '2011-09-13'
90
tr_end_date: '2011-10-13'
92
vehicle_id: transport_vehicle_0
93
point_id: transport_point_0
96
create transport vehicle Participant.
98
!record {model: 'transport.vehicle', id: transport_vehicle_0}:
99
vehi_participants_ids: ['transport_participant_0']
101
create transport root Participant.
103
!record {model: 'student.transport', id: transport_root_0}:
104
trans_participants_ids: ['transport_participant_0']
106
I confirm the transport registration.
108
!python {model: transport.registration}: |
109
self.trans_regi_confirm(cr,uid,[ref('transport_registration_0')])
111
I cancel the transport registration.
113
!python {model: transport.registration}: |
114
self.trans_regi_cancel(cr,uid,[ref('transport_registration_0')])
116
on change in for month
118
!python {model: transport.registration}: |
119
self.onchange_for_month(cr,uid,[ref('transport_registration_0')],4)
121
on change in for month with context={}
123
!python {model: transport.registration}: |
124
self.onchange_for_month(cr,uid,[],{})
126
on change in point_id
128
!python {model: transport.registration}: |
129
self.onchange_point_id(cr,uid,[ref('transport_registration_0')],ref("transport_point_1"))
131
on change in point_id with context={}
133
!python {model: transport.registration}: |
134
self.onchange_point_id(cr,uid,[],{})
136
do the state of transport open.
138
!python {model: student.transport}: |
139
self.transport_open(cr, uid, [ref("transport_root_0")], {"lang": 'en_US', "active_model":
140
"student.transport", "tz": False
143
do the state of transport close.
145
!python {model: student.transport}: |
146
self.transport_close(cr, uid, [ref("transport_root_0")], {"lang": 'en_US', "active_model":
147
"student.transport", "tz": False
150
do the delete entry of the participants of which transportation registration is over.
152
!python {model: student.transport}: |
153
self.delet_entry(cr, uid, [], {"lang": 'en_US', "active_model":
154
"student.transport", "tz": False
157
create transfer.vehicle.
159
!record {model: 'transfer.vehicle', id: transfer_vehicle_0}:
160
name: school.demo_student_student_1
161
participation_id: transport_participant_0
162
root_id: transport_root_0
163
old_vehicle_id: transport_vehicle_0
164
new_vehicle_id: transport_vehicle_1
166
on change in participation_id
168
!python {model: transfer.vehicle}: |
169
self.onchange_participation_id(cr,uid,[ref('transfer_vehicle_0')],ref("transport_participant_1"))
171
on change in participation_id with context=0
173
!python {model: transfer.vehicle}: |
174
self.onchange_participation_id(cr,uid,[],{})
178
!python {model: transfer.vehicle}: |
179
self.default_get(cr,uid,['old_vehicle_id', 'new_vehicle_id', 'name', 'participation_id', 'root_id'],{'lang': 'en_US', 'tz': False, 'active_model': 'student.student', 'department_id': False, 'active_ids': [5], 'active_id': 5})
181
call vehicle_transfer
183
!python {model: transfer.vehicle}: |
184
self.vehicle_transfer(cr,uid,[ref('transfer_vehicle_0')])
b'\\ No newline at end of file'