Merge lp:~openerp-commiter/openobject-addons/filter-addons-pso into lp:~openerp/openobject-addons/old_trunk
- filter-addons-pso
- Merge into old_trunk
Proposed by
Priyesh (OpenERP)
Status: | Rejected |
---|---|
Rejected by: | Jay Vora (Serpent Consulting Services) |
Proposed branch: | lp:~openerp-commiter/openobject-addons/filter-addons-pso |
Merge into: | lp:~openerp/openobject-addons/old_trunk |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~openerp-commiter/openobject-addons/filter-addons-pso |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+5869@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Priyesh (OpenERP) (pso-openerp) wrote : | # |
- 2031. By Priyesh (OpenERP)
-
put onchange event on date_from field of hr_holidays
Unmerged revisions
- 2075. By pso (Open ERP) <email address hidden>
-
merge
- 2074. By pso (Open ERP) <email address hidden>
-
merge
- 2073. By pso (Open ERP) <email address hidden>
-
merge
- 2072. By pso (Open ERP) <email address hidden>
-
merge
- 2071. By pso (Open ERP) <email address hidden>
-
merge
- 2070. By Priyesh (OpenERP)
-
merge
- 2069. By Priyesh (OpenERP)
-
merge
- 2068. By Priyesh (OpenERP)
-
merge
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'base_report_creator/base_report_creator.py' |
2 | --- base_report_creator/base_report_creator.py 2009-03-27 16:26:22 +0000 |
3 | +++ base_report_creator/base_report_creator.py 2009-03-31 12:46:02 +0000 |
4 | @@ -258,7 +258,7 @@ |
5 | if check<>False: |
6 | fields.insert(0,(check+' as id')) |
7 | result[obj.id] = """select |
8 | -%s |
9 | +%s |
10 | from |
11 | %s |
12 | """ % (',\n'.join(fields), models) |
13 | |
14 | === modified file 'hr_contract/hr_contract.py' |
15 | --- hr_contract/hr_contract.py 2009-03-04 13:32:36 +0000 |
16 | +++ hr_contract/hr_contract.py 2009-04-23 06:46:55 +0000 |
17 | @@ -86,14 +86,13 @@ |
18 | 'function' : fields.many2one('res.partner.function', 'Function'), |
19 | 'date_start' : fields.date('Start Date', required=True), |
20 | 'date_end' : fields.date('End Date'), |
21 | - 'working_hours_per_day' : fields.integer('Working hours per day'), |
22 | + 'working_hours_per_day_id' : fields.many2one('hr.timesheet.group', 'Working hours per day'), |
23 | 'wage_type_id' : fields.many2one('hr.contract.wage.type', 'Wage Type', required=True), |
24 | 'wage' : fields.float('Wage', required=True), |
25 | 'notes' : fields.text('Notes'), |
26 | } |
27 | _defaults = { |
28 | 'date_start' : lambda *a : time.strftime("%Y-%m-%d"), |
29 | - 'working_hours_per_day' : lambda *a : 8, |
30 | } |
31 | hr_contract() |
32 | |
33 | |
34 | === modified file 'hr_contract/hr_contract_view.xml' |
35 | --- hr_contract/hr_contract_view.xml 2009-03-04 13:32:36 +0000 |
36 | +++ hr_contract/hr_contract_view.xml 2009-04-23 06:46:55 +0000 |
37 | @@ -83,7 +83,7 @@ |
38 | <field name="function"/> |
39 | <field name="date_start"/> |
40 | <field name="date_end"/> |
41 | - <field name="working_hours_per_day"/> |
42 | + <field name="working_hours_per_day_id"/> |
43 | <field name="wage_type_id"/> |
44 | <field name="wage"/> |
45 | </tree> |
46 | @@ -94,7 +94,7 @@ |
47 | <newline/> |
48 | <separator colspan="4" string="Contract Duration"/> |
49 | <field name="function"/> |
50 | - <field name="working_hours_per_day"/> |
51 | + <field name="working_hours_per_day_id"/> |
52 | <field name="date_start" select="1"/> |
53 | <field name="date_end" select="1"/> |
54 | |
55 | @@ -155,7 +155,7 @@ |
56 | <separator colspan="4" string="Contract Duration"/> |
57 | <field name="date_start" select="1"/> |
58 | <field name="date_end" select="1"/> |
59 | - <field name="working_hours_per_day"/> |
60 | + <field name="working_hours_per_day_id"/> |
61 | <newline/> |
62 | |
63 | <separator colspan="4" string="Remuneration"/> |
64 | @@ -189,7 +189,7 @@ |
65 | <field name="function"/> |
66 | <field name="date_start"/> |
67 | <field name="date_end"/> |
68 | - <field name="working_hours_per_day"/> |
69 | + <field name="working_hours_per_day_id"/> |
70 | <field name="wage_type_id"/> |
71 | <field name="wage"/> |
72 | </tree> |
73 | @@ -200,11 +200,12 @@ |
74 | <field name="name">Contract</field> |
75 | <field name="res_model">hr.contract</field> |
76 | <field name="view_type">form</field> |
77 | - <field name="view_mode">form,tree</field> |
78 | + <field name="view_mode">tree,form</field> |
79 | <field name="domain">[]</field> |
80 | </record> |
81 | |
82 | - <menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_root"/> |
83 | + <menuitem name="Contract" id="menu_hr_contract" parent="hr.menu_hr_root"/> |
84 | + <menuitem action="action_hr_contract" id="hr_menu_contract" parent="menu_hr_contract"/> |
85 | |
86 | </data> |
87 | </openerp> |
88 | |
89 | === modified file 'hr_holidays/hr.py' |
90 | --- hr_holidays/hr.py 2009-03-19 15:56:46 +0000 |
91 | +++ hr_holidays/hr.py 2009-04-24 12:10:44 +0000 |
92 | @@ -107,6 +107,17 @@ |
93 | class hr_holidays(osv.osv): |
94 | _name = "hr.holidays" |
95 | _description = "Holidays" |
96 | + |
97 | + def _get_days(self, cr, uid, ids, field_name, arg=None, context={}): |
98 | + result = {} |
99 | + for holidays_obj in self.browse(cr, uid, ids): |
100 | + if holidays_obj.date_from and holidays_obj.date_to: |
101 | + diffDate = datetime.datetime(*time.strptime(holidays_obj.date_to,'%Y-%m-%d %H:%M:%S')[:5]) - datetime.datetime(*time.strptime(holidays_obj.date_from,'%Y-%m-%d %H:%M:%S')[:5]) |
102 | + qty = diffDate.days |
103 | + result[holidays_obj.id] = qty + 1 |
104 | + else: |
105 | + result[holidays_obj.id] = 0.0 |
106 | + return result |
107 | |
108 | _columns = { |
109 | 'name' : fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}), |
110 | @@ -118,7 +129,7 @@ |
111 | 'user_id':fields.many2one('res.users', 'Employee_id', states={'draft':[('readonly',False)]}, select=True, readonly=True), |
112 | 'manager_id' : fields.many2one('hr.employee', 'Holiday manager', invisible=False, readonly=True), |
113 | 'notes' : fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}), |
114 | - 'number_of_days': fields.float('Number of Days in this Holiday Request', required=True, readonly=True, states={'draft': [('readonly', False)]}), |
115 | + 'number_of_days': fields.function(_get_days, method=True, string='Number of Days in this Holiday Request', type='float'), |
116 | 'case_id': fields.many2one('crm.case', 'Case'), |
117 | 'holiday_user_id': fields.many2one('hr.holidays.per.user', 'Holiday per user') |
118 | } |
119 | @@ -132,14 +143,25 @@ |
120 | |
121 | def _check_date(self, cr, uid, ids): |
122 | if ids: |
123 | - cr.execute('select number_of_days from hr_holidays where id in ('+','.join(map(str, ids))+')') |
124 | - res = cr.fetchall() |
125 | - if res and res[0][0] < 0: |
126 | - return False |
127 | + res = self.read(cr, uid, ids, ['number_of_days']) |
128 | + for i in res: |
129 | + if i['number_of_days'] <= 0: |
130 | + return False |
131 | return True |
132 | |
133 | _constraints = [(_check_date, 'Start date should not be larger than end date! ', ['number_of_days'])] |
134 | |
135 | + def onchange_sec_id(self, cr, uid, ids, status, context={}): |
136 | + warning = {} |
137 | + if status: |
138 | + brows_obj = self.pool.get('hr.holidays.status').browse(cr, uid, [status])[0] |
139 | + if not brows_obj.section_id.allow_unlink: |
140 | + warning = { |
141 | + 'title': "Warning for ", |
142 | + 'message': "You won\'t be able to cancel a validated holiday. you did not select the 'allow_unlink' field" |
143 | + } |
144 | + return {'warning': warning} |
145 | + |
146 | def create(self, cr, uid, vals, *args, **kwargs): |
147 | id_holiday = super(hr_holidays, self).create(cr, uid, vals, *args, **kwargs) |
148 | self._create_holiday(cr, uid, [id_holiday]) |
149 | @@ -157,27 +179,14 @@ |
150 | holidays_user_obj.write(cr, uid, ids_user_hdays, {'holiday_ids': [(6, 0, list_holiday)]}) |
151 | return True |
152 | |
153 | - def onchange_date_to(self, cr, uid, ids, date_from, date_to): |
154 | - result = {} |
155 | - if date_from: |
156 | - if date_to: |
157 | - from_dt = time.mktime(time.strptime(date_from,'%Y-%m-%d %H:%M:%S')) |
158 | - to_dt = time.mktime(time.strptime(date_to,'%Y-%m-%d %H:%M:%S')) |
159 | - diff_day = (to_dt-from_dt)/(3600*24) |
160 | - result['value'] = { |
161 | - 'number_of_days': round(diff_day)+1 |
162 | - } |
163 | - return result |
164 | - result['value'] = { |
165 | - 'number_of_days': 0 |
166 | - } |
167 | - return result |
168 | - |
169 | def set_to_draft(self, cr, uid, ids, *args): |
170 | self.write(cr, uid, ids, { |
171 | 'state':'draft', |
172 | 'manager_id': False |
173 | }) |
174 | + wf_service = netsvc.LocalService("workflow") |
175 | + for holiday_id in ids: |
176 | + wf_service.trg_create(uid, 'hr.holidays', holiday_id, cr) |
177 | self._create_holiday(cr, uid, ids) |
178 | return True |
179 | |
180 | @@ -283,4 +292,31 @@ |
181 | return True |
182 | hr_holidays() |
183 | |
184 | +class holiday_user_log(osv.osv): |
185 | + _name = 'hr.holidays.log' |
186 | + _description = 'hr.holidays.log' |
187 | + _order = "holiday_req_id desc" |
188 | + _columns = { |
189 | + 'name' : fields.char('Action', size=64, readonly=True), |
190 | + 'holiday_req_id' : fields.char('Holiday Request ID', size=64), |
191 | + 'nb_holidays' : fields.float('Number of Holidays Requested'), |
192 | + 'employee_id' : fields.many2one('hr.employee', 'Employee', readonly=True), |
193 | + 'holiday_status' : fields.many2one("hr.holidays.status", "Holiday's Status", readonly=True), |
194 | + 'holiday_user_id' : fields.many2one('hr.holidays.per.user', 'Holidays user'), |
195 | + 'date': fields.datetime('Date'), |
196 | + } |
197 | + _defaults = { |
198 | + 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), |
199 | + } |
200 | +holiday_user_log() |
201 | + |
202 | +class hr_employee(osv.osv): |
203 | + _description ='Employees' |
204 | + _name='hr.employee' |
205 | + _inherit='hr.employee' |
206 | + _columns = { |
207 | + 'log_ids' : fields.many2many('hr.holidays.log', 'hr_employee_holiday_log', 'emp_id', 'log_id', 'Holiday log'), |
208 | + } |
209 | +hr_employee() |
210 | + |
211 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
212 | \ No newline at end of file |
213 | |
214 | === modified file 'hr_holidays/hr_view.xml' |
215 | --- hr_holidays/hr_view.xml 2009-04-17 10:37:08 +0000 |
216 | +++ hr_holidays/hr_view.xml 2009-04-24 12:10:44 +0000 |
217 | @@ -10,9 +10,9 @@ |
218 | <field name="arch" type="xml"> |
219 | <form string="Employee Holidays"> |
220 | <field name="name" select="1"/> |
221 | - <field name="holiday_status" select="1"/> |
222 | + <field name="holiday_status" select="1" on_change="onchange_sec_id(holiday_status)"/> |
223 | <field name="date_from" select="1"/> |
224 | - <field name="date_to" select="1" on_change="onchange_date_to(date_from, date_to)"/> |
225 | + <field name="date_to" select="1" /> |
226 | <notebook colspan="4"> |
227 | <page string="General"> |
228 | <field name="employee_id" select="1" /> |
229 | @@ -272,6 +272,59 @@ |
230 | res_model="hr.holidays" |
231 | src_model="hr.employee" |
232 | id="act_hr_employee_holiday_request"/> |
233 | + |
234 | + <!-- |
235 | + Holiday Log |
236 | + --> |
237 | + |
238 | + <record model="ir.ui.view" id="view_employee_log_form"> |
239 | + <field name="name">hr.employee.form</field> |
240 | + <field name="model">hr.employee</field> |
241 | + <field name="type">form</field> |
242 | + <field name="inherit_id" ref="hr.view_employee_form"/> |
243 | + <field name="arch" type="xml"> |
244 | + <notebook position="inside"> |
245 | + <page string="Holiday Log"> |
246 | + <separator colspan="4" string="Holiday logs"/> |
247 | + <field colspan="4" name="log_ids" nolabel="1"/> |
248 | + </page> |
249 | + </notebook> |
250 | + </field> |
251 | + </record> |
252 | + |
253 | + <record model="ir.ui.view" id="view_holidays_log_form"> |
254 | + <field name="name">hr.holidays.log.form</field> |
255 | + <field name="model">hr.holidays.log</field> |
256 | + <field name="type">form</field> |
257 | + <field name="arch" type="xml"> |
258 | + <form string="Holidays log"> |
259 | + <field name="name" select="1"/> |
260 | + <field name="holiday_req_id" select="2"/> |
261 | + <field name="nb_holidays" select="1" /> |
262 | + <field name="employee_id" select="2"/> |
263 | + <field name="holiday_status" select="1"/> |
264 | + <field name="holiday_user_id" select="2"/> |
265 | + <field name="date" select="1"/> |
266 | + </form> |
267 | + </field> |
268 | + </record> |
269 | + |
270 | + <record model="ir.ui.view" id="view_holidays_log_tree"> |
271 | + <field name="name">hr.holidays.log.tree</field> |
272 | + <field name="model">hr.holidays.log</field> |
273 | + <field name="type">tree</field> |
274 | + <field name="arch" type="xml"> |
275 | + <tree string="Holidays log"> |
276 | + <field name="name"/> |
277 | + <field name="holiday_req_id"/> |
278 | + <field name="nb_holidays"/> |
279 | + <field name="employee_id"/> |
280 | + <field name="holiday_status"/> |
281 | + <field name="holiday_user_id"/> |
282 | + <field name="date"/> |
283 | + </tree> |
284 | + </field> |
285 | + </record> |
286 | |
287 | </data> |
288 | </openerp> |
289 | |
290 | === modified file 'hr_holidays/hr_workflow.xml' |
291 | --- hr_holidays/hr_workflow.xml 2008-09-10 17:56:00 +0000 |
292 | +++ hr_holidays/hr_workflow.xml 2009-04-17 14:46:54 +0000 |
293 | @@ -53,6 +53,10 @@ |
294 | <field name="action">holidays_cancel()</field> |
295 | <field name="join_mode">XOR</field> |
296 | </record> |
297 | + |
298 | + <!-- |
299 | + workflow transition |
300 | + --> |
301 | |
302 | <record model="workflow.transition" id="t1"> |
303 | <field name="act_from" ref="act_draft" /> |
304 | @@ -91,6 +95,8 @@ |
305 | <record model="workflow.transition" id="t7"> |
306 | <field name="act_from" ref="act_cancel" /> |
307 | <field name="act_to" ref="act_draft" /> |
308 | + <field name="signal">set_to_draft</field> |
309 | </record> |
310 | + |
311 | </data> |
312 | </openerp> |
313 | |
314 | === modified file 'hr_timesheet/process/hr_timesheet_process.xml' |
315 | --- hr_timesheet/process/hr_timesheet_process.xml 2009-01-12 08:52:06 +0000 |
316 | +++ hr_timesheet/process/hr_timesheet_process.xml 2009-01-29 06:40:12 +0000 |
317 | @@ -12,5 +12,80 @@ |
318 | <field eval=""""Timesheet Process"""" name="name"/> |
319 | </record> |
320 | |
321 | + <!-- |
322 | + Process Node |
323 | + --> |
324 | + |
325 | + <record id="process_node_timesheetline0" model="process.node"> |
326 | + <field name="menu_id" ref="hr_timesheet.menu_act_hr_timesheet_line_me_all_form"/> |
327 | + <field name="model_id" ref="hr_timesheet.model_hr_analytic_timesheet"/> |
328 | + <field eval=""""state"""" name="kind"/> |
329 | + <field eval=""""Timesheet Line"""" name="name"/> |
330 | + <field eval=""""Encode your timesheet line"""" name="note"/> |
331 | + <field name="process_id" ref="process_process_timesheetprocess0"/> |
332 | + <field eval="0" name="flow_start"/> |
333 | + </record> |
334 | + |
335 | + <record id="process_node_phonecall0" model="process.node"> |
336 | + <field name="menu_id" ref="hr_timesheet.menu_act_hr_timesheet_line_me_all_form"/> |
337 | + <field name="model_id" ref="hr_timesheet.model_hr_analytic_timesheet"/> |
338 | + <field eval=""""state"""" name="kind"/> |
339 | + <field eval=""""Phone call"""" name="name"/> |
340 | + <field eval=""""Whatever time u spent for phone call"""" name="note"/> |
341 | + <field name="process_id" ref="process_process_timesheetprocess0"/> |
342 | + <field eval="1" name="flow_start"/> |
343 | + </record> |
344 | + |
345 | + <record id="process_node_analyticcost0" model="process.node"> |
346 | + <field name="menu_id" ref="hr_timesheet.menu_act_hr_timesheet_line_me_all_form"/> |
347 | + <field name="model_id" ref="hr_timesheet.model_hr_analytic_timesheet"/> |
348 | + <field eval=""""state"""" name="kind"/> |
349 | + <field eval=""""Analytic cost"""" name="name"/> |
350 | + <field eval=""""Analytic cost is created"""" name="note"/> |
351 | + <field name="process_id" ref="process_process_timesheetprocess0"/> |
352 | + <field eval="0" name="flow_start"/> |
353 | + </record> |
354 | + |
355 | + <record id="process_node_review0" model="process.node"> |
356 | + <field name="menu_id" ref="hr_timesheet.menu_act_hr_timesheet_line_me_all_form"/> |
357 | + <field name="model_id" ref="hr_timesheet.model_hr_analytic_timesheet"/> |
358 | + <field eval=""""state"""" name="kind"/> |
359 | + <field eval=""""Review"""" name="name"/> |
360 | + <field eval=""""Review end of day check day is complete"""" name="note"/> |
361 | + <field name="process_id" ref="process_process_timesheetprocess0"/> |
362 | + <field eval="0" name="flow_start"/> |
363 | + </record> |
364 | + |
365 | + <!-- |
366 | + Process Transition |
367 | + --> |
368 | + |
369 | + <record id="process_transition_phonecallencoding0" model="process.transition"> |
370 | + <field eval="[(6,0,[])]" name="role_ids"/> |
371 | + <field eval="[(6,0,[])]" name="transition_ids"/> |
372 | + <field eval=""""Phone call encoding"""" name="name"/> |
373 | + <field eval=""""Encode how much time u spent on phone call"""" name="note"/> |
374 | + <field model="process.node" name="target_node_id" ref="process_node_timesheetline0"/> |
375 | + <field model="process.node" name="source_node_id" ref="process_node_phonecall0"/> |
376 | + </record> |
377 | + |
378 | + <record id="process_transition_createanalyticcose0" model="process.transition"> |
379 | + <field eval="[(6,0,[])]" name="role_ids"/> |
380 | + <field eval="[(6,0,[])]" name="transition_ids"/> |
381 | + <field eval=""""Create Analytic cost"""" name="name"/> |
382 | + <field eval=""""Creates your analytic cost accoording to quantity"""" name="note"/> |
383 | + <field model="process.node" name="target_node_id" ref="process_node_analyticcost0"/> |
384 | + <field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/> |
385 | + </record> |
386 | + |
387 | + <record id="process_transition_reviewofwork0" model="process.transition"> |
388 | + <field eval="[(6,0,[])]" name="role_ids"/> |
389 | + <field eval="[(6,0,[])]" name="transition_ids"/> |
390 | + <field eval=""""Review of work"""" name="name"/> |
391 | + <field eval=""""Review of your work at the end of the day"""" name="note"/> |
392 | + <field model="process.node" name="target_node_id" ref="process_node_review0"/> |
393 | + <field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/> |
394 | + </record> |
395 | + |
396 | </data> |
397 | </openerp> |
398 | \ No newline at end of file |
399 | |
400 | === modified file 'hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml' |
401 | --- hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml 2009-01-12 08:52:06 +0000 |
402 | +++ hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml 2009-01-29 06:40:12 +0000 |
403 | @@ -16,28 +16,6 @@ |
404 | Process Node |
405 | --> |
406 | |
407 | - <record id="process_node_analyticcost0" model="process.node"> |
408 | - <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/> |
409 | - <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> |
410 | - <field eval=""""state"""" name="kind"/> |
411 | - <field eval=""""Analytic cost"""" name="name"/> |
412 | - <field eval=""""Analytic cost is created"""" name="note"/> |
413 | - <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/> |
414 | - <field eval=""""object.state=='draft'"""" name="model_states"/> |
415 | - <field eval="0" name="flow_start"/> |
416 | - </record> |
417 | - |
418 | - <record id="process_node_review0" model="process.node"> |
419 | - <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/> |
420 | - <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> |
421 | - <field eval=""""state"""" name="kind"/> |
422 | - <field eval=""""Review"""" name="name"/> |
423 | - <field eval=""""Review end of day check day is complete"""" name="note"/> |
424 | - <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/> |
425 | - <field eval=""""object.state=='draft'"""" name="model_states"/> |
426 | - <field eval="0" name="flow_start"/> |
427 | - </record> |
428 | - |
429 | <record id="process_node_timesheetconfirming0" model="process.node"> |
430 | <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/> |
431 | <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> |
432 | @@ -50,29 +28,6 @@ |
433 | <field eval="0" name="flow_start"/> |
434 | </record> |
435 | |
436 | - <record id="process_node_timesheetline0" model="process.node"> |
437 | - <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/> |
438 | - <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> |
439 | - <field eval=""""state"""" name="kind"/> |
440 | - <field eval=""""Timesheet Line"""" name="name"/> |
441 | - <field eval=""""Encode your timesheet line"""" name="note"/> |
442 | - <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/> |
443 | - <field eval=""""object.state=='draft'"""" name="model_states"/> |
444 | - <field eval="0" name="flow_start"/> |
445 | - </record> |
446 | - |
447 | - <record id="process_node_phonecall0" model="process.node"> |
448 | - <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/> |
449 | - <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> |
450 | - <field eval=""""state"""" name="kind"/> |
451 | - <field eval=""""Phone call"""" name="name"/> |
452 | - <field eval=""""Whatever time u spent for phone call"""" name="note"/> |
453 | - <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/> |
454 | - <field eval=""""object.state=='draft'"""" name="model_states"/> |
455 | - <field eval="1" name="flow_start"/> |
456 | - </record> |
457 | - |
458 | - |
459 | <record id="process_node_attendance0" model="process.node"> |
460 | <field name="model_id" ref="hr.model_hr_employee"/> |
461 | <field eval=""""state"""" name="kind"/> |
462 | @@ -139,6 +94,17 @@ |
463 | <field eval="0" name="flow_start"/> |
464 | </record> |
465 | |
466 | + <record id="process_node_workontask0" model="process.node"> |
467 | + <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/> |
468 | + <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/> |
469 | + <field eval=""""state"""" name="kind"/> |
470 | + <field eval=""""Work on Task"""" name="name"/> |
471 | + <field eval=""""Defines the work summary of task"""" name="note"/> |
472 | + <field name="process_id" ref="hr_timesheet_sheet.process_process_hrtimesheetprocess0"/> |
473 | + <field eval=""""object.state in ('open', pending', 'done', 'cancelled')"""" name="model_states"/> |
474 | + <field eval="1" name="flow_start"/> |
475 | + </record> |
476 | + |
477 | <!-- |
478 | Process Transition |
479 | --> |
480 | @@ -197,40 +163,22 @@ |
481 | <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/> |
482 | </record> |
483 | |
484 | - <record id="process_transition_phonecallencoding0" model="process.transition"> |
485 | - <field eval="[(6,0,[])]" name="role_ids"/> |
486 | - <field eval="[(6,0,[])]" name="transition_ids"/> |
487 | - <field eval=""""Phone call encoding"""" name="name"/> |
488 | - <field eval=""""Encode how much time u spent on phone call"""" name="note"/> |
489 | - <field model="process.node" name="target_node_id" ref="process_node_timesheetline0"/> |
490 | - <field model="process.node" name="source_node_id" ref="process_node_phonecall0"/> |
491 | - </record> |
492 | - |
493 | - <record id="process_transition_createanalyticcose0" model="process.transition"> |
494 | - <field eval="[(6,0,[])]" name="role_ids"/> |
495 | - <field eval="[(6,0,[])]" name="transition_ids"/> |
496 | - <field eval=""""Create Analytic cost"""" name="name"/> |
497 | - <field eval=""""Creates your analytic cost accoording to quantity"""" name="note"/> |
498 | - <field model="process.node" name="target_node_id" ref="process_node_analyticcost0"/> |
499 | - <field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/> |
500 | - </record> |
501 | - |
502 | - <record id="process_transition_reviewofwork0" model="process.transition"> |
503 | - <field eval="[(6,0,[])]" name="role_ids"/> |
504 | - <field eval="[(6,0,[])]" name="transition_ids"/> |
505 | - <field eval=""""Review of work"""" name="name"/> |
506 | - <field eval=""""Review of your work at the end of the day"""" name="note"/> |
507 | - <field model="process.node" name="target_node_id" ref="process_node_review0"/> |
508 | - <field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/> |
509 | - </record> |
510 | - |
511 | <record id="process_transition_confirmtimesheetsheet0" model="process.transition"> |
512 | <field eval="[(6,0,[])]" name="role_ids"/> |
513 | <field eval="[(6,0,[])]" name="transition_ids"/> |
514 | <field eval=""""Confirm timesheet sheet"""" name="name"/> |
515 | <field eval=""""Confirm timesheet at the end of the period"""" name="note"/> |
516 | <field model="process.node" name="target_node_id" ref="process_node_timesheetconfirming0"/> |
517 | - <field model="process.node" name="source_node_id" ref="process_node_review0"/> |
518 | + <field model="process.node" name="source_node_id" ref="hr_timesheet.process_node_review0"/> |
519 | + </record> |
520 | + |
521 | + <record id="process_transition_tasktimesheet0" model="process.transition"> |
522 | + <field eval="[(6,0,[])]" name="role_ids"/> |
523 | + <field eval="[(6,0,[])]" name="transition_ids"/> |
524 | + <field eval=""""Task timesheet"""" name="name"/> |
525 | + <field eval=""""Moves task entry into the timesheet line"""" name="note"/> |
526 | + <field model="process.node" name="target_node_id" ref="process_node_timesheet0"/> |
527 | + <field model="process.node" name="source_node_id" ref="process_node_workontask0"/> |
528 | </record> |
529 | |
530 | <!-- |
531 | |
532 | === modified file 'project_timesheet/__terp__.py' |
533 | --- project_timesheet/__terp__.py 2009-02-03 17:02:20 +0000 |
534 | +++ project_timesheet/__terp__.py 2009-02-05 06:11:47 +0000 |
535 | @@ -34,7 +34,7 @@ |
536 | 'website': 'http://www.openerp.com', |
537 | 'depends': ['base', 'project', 'hr_timesheet'], |
538 | 'init_xml': [], |
539 | - 'update_xml': [], |
540 | + 'update_xml': ["process/project_timesheet_process.xml"], |
541 | 'demo_xml': [], |
542 | 'installable': True, |
543 | 'active': False, |
544 | |
545 | === added directory 'project_timesheet/process' |
546 | === added file 'project_timesheet/process/project_timesheet_process.xml' |
547 | --- project_timesheet/process/project_timesheet_process.xml 1970-01-01 00:00:00 +0000 |
548 | +++ project_timesheet/process/project_timesheet_process.xml 2009-01-29 06:40:12 +0000 |
549 | @@ -0,0 +1,53 @@ |
550 | +<?xml version="1.0" ?> |
551 | +<openerp> |
552 | + <data> |
553 | + |
554 | + <!-- |
555 | + Process Node |
556 | + --> |
557 | + |
558 | + <record id="process_node_timesheettask0" model="process.node"> |
559 | + <field name="menu_id" ref="hr_timesheet.menu_act_hr_timesheet_line_evry1_today_form"/> |
560 | + <field name="model_id" ref="hr_timesheet.model_hr_analytic_timesheet"/> |
561 | + <field eval=""""state"""" name="kind"/> |
562 | + <field eval=""""Timesheet task"""" name="name"/> |
563 | + <field eval=""""Complete Your Timesheet."""" name="note"/> |
564 | + <field name="process_id" ref="project.process_process_tasksprocess0"/> |
565 | + <field eval="0" name="flow_start"/> |
566 | + </record> |
567 | + |
568 | + <record id="process_node_taskwork0" model="process.node"> |
569 | + <field name="menu_id" ref="project.menu_action_view_task6_prog"/> |
570 | + <field name="model_id" ref="project.model_project_task_work"/> |
571 | + <field eval=""""state"""" name="kind"/> |
572 | + <field eval=""""Task Work"""" name="name"/> |
573 | + <field eval=""""Work on task"""" name="note"/> |
574 | + <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/> |
575 | + <field eval=""""object.state=='open'"""" name="model_states"/> |
576 | + <field eval="1" name="flow_start"/> |
577 | + </record> |
578 | + |
579 | + <!-- |
580 | + Process Transition |
581 | + --> |
582 | + |
583 | + <record id="process_transition_filltimesheet0" model="process.transition"> |
584 | + <field eval="[(6,0,[])]" name="role_ids"/> |
585 | + <field eval="[(6,0,[])]" name="transition_ids"/> |
586 | + <field eval=""""Fill Timesheet"""" name="name"/> |
587 | + <field eval=""""Task summary is comes into the timesheet line"""" name="note"/> |
588 | + <field model="process.node" name="target_node_id" ref="process_node_timesheettask0"/> |
589 | + <field model="process.node" name="source_node_id" ref="project.process_node_opentask0"/> |
590 | + </record> |
591 | + |
592 | + <record id="process_transition_taskencoding0" model="process.transition"> |
593 | + <field eval="[(6,0,[])]" name="role_ids"/> |
594 | + <field eval="[(6,0,[])]" name="transition_ids"/> |
595 | + <field eval=""""Task encoding"""" name="name"/> |
596 | + <field eval=""""Encode how much time u spent on your task"""" name="note"/> |
597 | + <field model="process.node" name="target_node_id" ref="hr_timesheet.process_node_timesheetline0"/> |
598 | + <field model="process.node" name="source_node_id" ref="process_node_taskwork0"/> |
599 | + </record> |
600 | + |
601 | + </data> |
602 | +</openerp> |
603 | \ No newline at end of file |
604 | |
605 | === added directory 'report_stock' |
606 | === added file 'report_stock/__init__.py' |
607 | --- report_stock/__init__.py 1970-01-01 00:00:00 +0000 |
608 | +++ report_stock/__init__.py 2009-03-10 11:14:01 +0000 |
609 | @@ -0,0 +1,25 @@ |
610 | +# -*- encoding: utf-8 -*- |
611 | +############################################################################## |
612 | +# |
613 | +# OpenERP, Open Source Management Solution |
614 | +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
615 | +# $Id$ |
616 | +# |
617 | +# This program is free software: you can redistribute it and/or modify |
618 | +# it under the terms of the GNU General Public License as published by |
619 | +# the Free Software Foundation, either version 3 of the License, or |
620 | +# (at your option) any later version. |
621 | +# |
622 | +# This program is distributed in the hope that it will be useful, |
623 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
624 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
625 | +# GNU General Public License for more details. |
626 | +# |
627 | +# You should have received a copy of the GNU General Public License |
628 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
629 | +# |
630 | +############################################################################## |
631 | + |
632 | +import report_stock |
633 | + |
634 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
635 | \ No newline at end of file |
636 | |
637 | === added file 'report_stock/__terp__.py' |
638 | --- report_stock/__terp__.py 1970-01-01 00:00:00 +0000 |
639 | +++ report_stock/__terp__.py 2009-03-10 11:14:01 +0000 |
640 | @@ -0,0 +1,37 @@ |
641 | +# -*- encoding: utf-8 -*- |
642 | +############################################################################## |
643 | +# |
644 | +# OpenERP, Open Source Management Solution |
645 | +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
646 | +# $Id$ |
647 | +# |
648 | +# This program is free software: you can redistribute it and/or modify |
649 | +# it under the terms of the GNU General Public License as published by |
650 | +# the Free Software Foundation, either version 3 of the License, or |
651 | +# (at your option) any later version. |
652 | +# |
653 | +# This program is distributed in the hope that it will be useful, |
654 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
655 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
656 | +# GNU General Public License for more details. |
657 | +# |
658 | +# You should have received a copy of the GNU General Public License |
659 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
660 | +# |
661 | +############################################################################## |
662 | + |
663 | +{ |
664 | + 'name': 'Stock Management - Reporting', |
665 | + 'version': '1.0', |
666 | + 'category': "Generic Modules/Inventory Control", |
667 | + 'description': "Reporting for the stock module", |
668 | + 'author': 'Tiny', |
669 | + 'website': 'http://www.openerp.com', |
670 | + 'depends': ['stock'], |
671 | + 'init_xml': [], |
672 | + 'update_xml': ["report_stock_view.xml"], |
673 | + 'demo_xml': [], |
674 | + 'installable': True, |
675 | + 'active': False, |
676 | +} |
677 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
678 | |
679 | === added file 'report_stock/report_stock.py' |
680 | --- report_stock/report_stock.py 1970-01-01 00:00:00 +0000 |
681 | +++ report_stock/report_stock.py 2009-03-10 11:14:01 +0000 |
682 | @@ -0,0 +1,62 @@ |
683 | +# -*- encoding: utf-8 -*- |
684 | +############################################################################## |
685 | +# |
686 | +# OpenERP, Open Source Management Solution |
687 | +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
688 | +# $Id$ |
689 | +# |
690 | +# This program is free software: you can redistribute it and/or modify |
691 | +# it under the terms of the GNU General Public License as published by |
692 | +# the Free Software Foundation, either version 3 of the License, or |
693 | +# (at your option) any later version. |
694 | +# |
695 | +# This program is distributed in the hope that it will be useful, |
696 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
697 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
698 | +# GNU General Public License for more details. |
699 | +# |
700 | +# You should have received a copy of the GNU General Public License |
701 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
702 | +# |
703 | +############################################################################## |
704 | + |
705 | + |
706 | +""" |
707 | + This module gives the stock of product for this month as tree & graph view |
708 | +""" |
709 | + |
710 | +from osv import fields,osv |
711 | + |
712 | +class report_stock_location_category(osv.osv): |
713 | + |
714 | + _name = "report.stock.location.category" |
715 | + _description = "Stock of product by location" |
716 | + _auto = False |
717 | + _columns = { |
718 | + 'name': fields.char('Location name', size=64, readonly=True), |
719 | + 'product_id' : fields.many2one('product.product', 'Product', readonly=True), |
720 | + 'quantity': fields.float('# of Products', readonly=True), |
721 | + 'date' : fields.date('Month', readonly=True) |
722 | + } |
723 | + |
724 | + def init(self, cr): |
725 | + cr.execute(""" |
726 | + create or replace view report_stock_location_category as ( |
727 | + SELECT min("out".id) as id, |
728 | + to_char("out".date, 'YYYY-MM-01') as date, |
729 | + l.name AS name, |
730 | + "out".product_id as product_id, |
731 | + "out".state, sum( |
732 | + CASE |
733 | + WHEN l.id = "out".location_id THEN -1*("out".product_qty) |
734 | + WHEN l.id = "out".location_dest_id THEN "out".product_qty |
735 | + ELSE 0::double precision |
736 | + END) AS quantity |
737 | + FROM stock_move "out", stock_location l |
738 | + where "out".state = 'done' |
739 | + GROUP BY l.id, "out".product_id, l.name, "out".state, to_char("out".date, 'YYYY-MM-01')) |
740 | + """) |
741 | + |
742 | +report_stock_location_category() |
743 | + |
744 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
745 | |
746 | === added file 'report_stock/report_stock_view.xml' |
747 | --- report_stock/report_stock_view.xml 1970-01-01 00:00:00 +0000 |
748 | +++ report_stock/report_stock_view.xml 2009-03-10 11:14:01 +0000 |
749 | @@ -0,0 +1,42 @@ |
750 | +<?xml version="1.0" encoding="utf-8"?> |
751 | +<openerp> |
752 | + <data> |
753 | + |
754 | + <record id="view_stock_order_tree" model="ir.ui.view"> |
755 | + <field name="name">report.stock.location.tree</field> |
756 | + <field name="model">report.stock.location.category</field> |
757 | + <field name="type">tree</field> |
758 | + <field name="arch" type="xml"> |
759 | + <tree string="Sales by Category of Products"> |
760 | + <field name="date"/> |
761 | + <field name="product_id"/> |
762 | + <field name="quantity"/> |
763 | + <field name="name"/> |
764 | + </tree> |
765 | + </field> |
766 | + </record> |
767 | + |
768 | + <record id="view_stock_order_graph" model="ir.ui.view"> |
769 | + <field name="name">report.stock.location.graph</field> |
770 | + <field name="model">report.stock.location.category</field> |
771 | + <field name="type">graph</field> |
772 | + <field name="arch" type="xml"> |
773 | + <graph string="Sales by Category of Products" type="bar"> |
774 | + <field name="name"/> |
775 | + <field name="quantity"/> |
776 | + </graph> |
777 | + </field> |
778 | + </record> |
779 | + |
780 | + <record id="action_stock_order_tree" model="ir.actions.act_window"> |
781 | + <field name="name">Stock of Product (this month)</field> |
782 | + <field name="res_model">report.stock.location.category</field> |
783 | + <field name="view_type">form</field> |
784 | + <field name="view_mode">tree,graph</field> |
785 | + <field name="view_id" ref="view_stock_order_tree" /> |
786 | + </record> |
787 | + |
788 | + <menuitem action="action_stock_order_tree" id="menu_stock_report_order" parent="stock.next_id_61"/> |
789 | + |
790 | + </data> |
791 | +</openerp> |
792 | \ No newline at end of file |
793 | |
794 | === modified file 'wiki/wiki_view.xml' |
795 | --- wiki/wiki_view.xml 2009-04-17 10:37:08 +0000 |
796 | +++ wiki/wiki_view.xml 2009-04-22 05:50:44 +0000 |
797 | @@ -10,6 +10,12 @@ |
798 | string="Create Menu" |
799 | menu="True" |
800 | name="wiki.create.menu"/> |
801 | + |
802 | + <wizard |
803 | + id="wizard_open_page" |
804 | + string="Open Page" |
805 | + menu="True" |
806 | + name="wiki.wiki.page.open"/> |
807 | |
808 | <wizard |
809 | id="wizard_open_page" |
Create an onchange event on section_id of holiday_status of hr_holidays module.
Changes in hr_contract module.
modification in crm_configuration module.