~serpentcs/serpent-dev/school_transport

« back to all changes in this revision

Viewing changes to test/transport.yml

  • Committer: Atul Makwana(SerpentCS)
  • Date: 2012-02-28 10:35:05 UTC
  • Revision ID: a.makwana.serpentcs@gmail.com-20120228103505-uw3hbetgv2a6s9sc
[ADD] school_transport module added

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-
 
2
    In order to check the transport module in OpenERP.
 
3
-
 
4
    create transport point.
 
5
-
 
6
    !record {model: 'transport.point', id: transport_point_0}:
 
7
        name: 'unjha'
 
8
        amount: 2000
 
9
-
 
10
    Call Search mathod in transport.point
 
11
-
 
12
    !python {model: transport.point}: |
 
13
     self.search(cr, uid,[],{},{},{},{"lang": 'en_US', "name":
 
14
      1, "tz": False},{})
 
15
-
 
16
    Call Search mathod in transport.point with context={}
 
17
-
 
18
    !python {model: transport.point}: |
 
19
     self.search(cr, uid,[])
 
20
-
 
21
    create vehicle driver.
 
22
-
 
23
    !record {model: 'hr.employee', id: hr_employee_0}:
 
24
        name: 'driver007'
 
25
        licence_no: 'GJ1007'
 
26
-
 
27
    create transport vehicle.
 
28
-
 
29
    !record {model: 'transport.vehicle', id: transport_vehicle_0}:
 
30
        driver_id: hr_employee_0
 
31
        vehicle: 'GJ-2 6233'
 
32
        capacity: 56
 
33
-
 
34
    create transport vehicle.
 
35
-
 
36
    !record {model: 'transport.vehicle', id: transport_vehicle_1}:
 
37
        driver_id: hr_employee_0
 
38
        vehicle: 'GJ-2 62332'
 
39
        capacity: 56
 
40
-
 
41
    Call Search mathod in transport.vehicle
 
42
-
 
43
    !python {model: transport.vehicle}: |
 
44
     self.search(cr, uid,[],{},{},{},{"lang": 'en_US', "name":
 
45
      1, "tz": False},{})
 
46
-
 
47
    Call Search mathod in transport.vehicle with context={}
 
48
-
 
49
    !python {model: transport.vehicle}: |
 
50
     self.search(cr, uid,[])
 
51
-
 
52
    Call Search mathod in transport.participant
 
53
-
 
54
    !python {model: transport.participant}: |
 
55
     self.search(cr, uid,[],{},{},{},{"lang": 'en_US', "name":
 
56
      1, "tz": False},{})
 
57
 
58
    Call Search mathod in transport.participant with context={}
 
59
-
 
60
    !python {model: transport.participant}: |
 
61
     self.search(cr, uid,[])
 
62
-   
 
63
    I Create the one transport root.
 
64
-
 
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
 
70
-
 
71
    Do one registration of the participant 
 
72
-
 
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'
 
78
        for_month: 4
 
79
        vehicle_id: transport_vehicle_0
 
80
        point_id: transport_point_0
 
81
        amount: 8000
 
82
-
 
83
    Do one entry of the transport.participant 
 
84
-
 
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'
 
91
        months: 1
 
92
        vehicle_id: transport_vehicle_0
 
93
        point_id: transport_point_0
 
94
        amount: 2000
 
95
-
 
96
    create transport vehicle Participant.
 
97
-
 
98
    !record {model: 'transport.vehicle', id: transport_vehicle_0}:
 
99
        vehi_participants_ids: ['transport_participant_0']
 
100
-
 
101
    create transport root Participant.
 
102
-
 
103
    !record {model: 'student.transport', id: transport_root_0}:
 
104
        trans_participants_ids: ['transport_participant_0']
 
105
-
 
106
    I confirm the transport registration.
 
107
-
 
108
    !python {model: transport.registration}: |
 
109
     self.trans_regi_confirm(cr,uid,[ref('transport_registration_0')])
 
110
-
 
111
    I cancel the transport registration.
 
112
-
 
113
    !python {model: transport.registration}: |
 
114
     self.trans_regi_cancel(cr,uid,[ref('transport_registration_0')])
 
115
-
 
116
    on change in for month
 
117
-
 
118
    !python {model: transport.registration}: |
 
119
     self.onchange_for_month(cr,uid,[ref('transport_registration_0')],4)
 
120
-
 
121
    on change in for month with context={}
 
122
-
 
123
    !python {model: transport.registration}: |
 
124
     self.onchange_for_month(cr,uid,[],{})
 
125
-
 
126
    on change in point_id
 
127
-
 
128
    !python {model: transport.registration}: |
 
129
     self.onchange_point_id(cr,uid,[ref('transport_registration_0')],ref("transport_point_1"))
 
130
-
 
131
    on change in point_id with context={}
 
132
-
 
133
    !python {model: transport.registration}: |
 
134
     self.onchange_point_id(cr,uid,[],{})
 
135
-
 
136
    do the state of transport open.
 
137
-
 
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
 
141
      })
 
142
-
 
143
    do the state of transport close.
 
144
-
 
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
 
148
      })
 
149
-
 
150
    do the delete entry of the participants of which transportation registration is over.
 
151
-
 
152
    !python {model: student.transport}: |
 
153
     self.delet_entry(cr, uid, [], {"lang": 'en_US', "active_model":
 
154
      "student.transport", "tz": False
 
155
      })
 
156
-
 
157
    create transfer.vehicle.
 
158
-
 
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
 
165
-
 
166
    on change in participation_id
 
167
-
 
168
    !python {model: transfer.vehicle}: |
 
169
     self.onchange_participation_id(cr,uid,[ref('transfer_vehicle_0')],ref("transport_participant_1"))
 
170
-
 
171
    on change in participation_id with context=0
 
172
-
 
173
    !python {model: transfer.vehicle}: |
 
174
     self.onchange_participation_id(cr,uid,[],{})
 
175
-
 
176
    call Defaultget
 
177
-
 
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})
 
180
-
 
181
    call vehicle_transfer
 
182
-
 
183
    !python {model: transfer.vehicle}: |
 
184
     self.vehicle_transfer(cr,uid,[ref('transfer_vehicle_0')])
 
 
b'\\ No newline at end of file'