Merge lp:~camptocamp/hr-timesheet/7.0-port-hr_timesheet_fulfill into lp:~hr-core-editors/hr-timesheet/7.0
- 7.0-port-hr_timesheet_fulfill
- Merge into 7.0
Proposed by
Yannick Vaucher @ Camptocamp
Status: | Merged |
---|---|
Merged at revision: | 45 |
Proposed branch: | lp:~camptocamp/hr-timesheet/7.0-port-hr_timesheet_fulfill |
Merge into: | lp:~hr-core-editors/hr-timesheet/7.0 |
Diff against target: |
405 lines (+150/-158) 5 files modified
hr_timesheet_fulfill/__init__.py (+18/-25) hr_timesheet_fulfill/__openerp__.py (+39/-50) hr_timesheet_fulfill/wizard/__init__.py (+3/-0) hr_timesheet_fulfill/wizard/timesheet_fulfill.py (+35/-43) hr_timesheet_fulfill/wizard/timesheet_fulfill_view.xml (+55/-40) |
To merge this branch: | bzr merge lp:~camptocamp/hr-timesheet/7.0-port-hr_timesheet_fulfill |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guewen Baconnier @ Camptocamp | Approve | ||
Alexandre Fayolle - camptocamp | code review, no test | Approve | |
Review via email: mp+162123@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : | # |
review:
Approve
(code review, no test)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
LGTM
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'hr_timesheet_fulfill/__init__.py' | |||
2 | --- hr_timesheet_fulfill/__init__.py 2011-08-12 12:53:16 +0000 | |||
3 | +++ hr_timesheet_fulfill/__init__.py 2013-05-02 15:51:48 +0000 | |||
4 | @@ -1,32 +1,25 @@ | |||
5 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
6 | 2 | ############################################################################## | 2 | ############################################################################## |
7 | 3 | # | 3 | # |
33 | 4 | # Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) | 4 | # Author: Guewen Baconnier (Camptocamp) |
34 | 5 | # All Right Reserved | 5 | # Author: Vincent Renaville |
35 | 6 | # | 6 | # Copyright 2012 Camptocamp SA |
36 | 7 | # Author : Guewen Baconnier (Camptocamp) | 7 | # |
37 | 8 | # | 8 | # This program is free software: you can redistribute it and/or modify |
38 | 9 | # WARNING: This program as such is intended to be used by professional | 9 | # it under the terms of the GNU Affero General Public License as |
39 | 10 | # programmers who take the whole responsability of assessing all potential | 10 | # published by the Free Software Foundation, either version 3 of the |
40 | 11 | # consequences resulting from its eventual inadequacies and bugs | 11 | # License, or (at your option) any later version. |
41 | 12 | # End users who are looking for a ready-to-use solution with commercial | 12 | # |
42 | 13 | # garantees and support are strongly adviced to contract a Free Software | 13 | # This program is distributed in the hope that it will be useful, |
43 | 14 | # Service Company | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
44 | 15 | # | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
45 | 16 | # This program is Free Software; you can redistribute it and/or | 16 | # GNU Affero General Public License for more details. |
46 | 17 | # modify it under the terms of the GNU General Public License | 17 | # |
47 | 18 | # as published by the Free Software Foundation; either version 2 | 18 | # You should have received a copy of the GNU Affero General Public License |
48 | 19 | # of the License, or (at your option) any later version. | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
24 | 20 | # | ||
25 | 21 | # This program is distributed in the hope that it will be useful, | ||
26 | 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
27 | 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
28 | 24 | # GNU General Public License for more details. | ||
29 | 25 | # | ||
30 | 26 | # You should have received a copy of the GNU General Public License | ||
31 | 27 | # along with this program; if not, write to the Free Software | ||
32 | 28 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
49 | 29 | # | 20 | # |
50 | 30 | ############################################################################## | 21 | ############################################################################## |
51 | 31 | 22 | ||
52 | 32 | import wizard | 23 | import wizard |
53 | 24 | |||
54 | 25 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
55 | 33 | 26 | ||
56 | === modified file 'hr_timesheet_fulfill/__openerp__.py' | |||
57 | --- hr_timesheet_fulfill/__openerp__.py 2012-12-13 12:20:12 +0000 | |||
58 | +++ hr_timesheet_fulfill/__openerp__.py 2013-05-02 15:51:48 +0000 | |||
59 | @@ -1,57 +1,46 @@ | |||
60 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
61 | 2 | ############################################################################## | 2 | ############################################################################## |
62 | 3 | # | 3 | # |
89 | 4 | # Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) | 4 | # Author: Guewen Baconnier (Camptocamp) |
90 | 5 | # All Right Reserved | 5 | # Author: Vincent Renaville |
91 | 6 | # | 6 | # Copyright 2012 Camptocamp SA |
92 | 7 | # Author : Guewen Baconnier (Camptocamp) | 7 | # |
93 | 8 | # Author : Vincent Renaville | 8 | # This program is free software: you can redistribute it and/or modify |
94 | 9 | # | 9 | # it under the terms of the GNU Affero General Public License as |
95 | 10 | # WARNING: This program as such is intended to be used by professional | 10 | # published by the Free Software Foundation, either version 3 of the |
96 | 11 | # programmers who take the whole responsability of assessing all potential | 11 | # License, or (at your option) any later version. |
97 | 12 | # consequences resulting from its eventual inadequacies and bugs | 12 | # |
98 | 13 | # End users who are looking for a ready-to-use solution with commercial | 13 | # This program is distributed in the hope that it will be useful, |
99 | 14 | # garantees and support are strongly adviced to contract a Free Software | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
100 | 15 | # Service Company | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
101 | 16 | # | 16 | # GNU Affero General Public License for more details. |
102 | 17 | # This program is Free Software; you can redistribute it and/or | 17 | # |
103 | 18 | # modify it under the terms of the GNU General Public License | 18 | # You should have received a copy of the GNU Affero General Public License |
104 | 19 | # as published by the Free Software Foundation; either version 2 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
79 | 20 | # of the License, or (at your option) any later version. | ||
80 | 21 | # | ||
81 | 22 | # This program is distributed in the hope that it will be useful, | ||
82 | 23 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
83 | 24 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
84 | 25 | # GNU General Public License for more details. | ||
85 | 26 | # | ||
86 | 27 | # You should have received a copy of the GNU General Public License | ||
87 | 28 | # along with this program; if not, write to the Free Software | ||
88 | 29 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
105 | 30 | # | 20 | # |
106 | 31 | ############################################################################## | 21 | ############################################################################## |
107 | 32 | 22 | ||
132 | 33 | 23 | {'name' : 'Timesheet Fullfill Wizard', | |
133 | 34 | { | 24 | 'version' : '1.0', |
134 | 35 | "name" : "Timesheet fullfill wizard", | 25 | 'category' : 'Generic Modules/Human Resources', |
135 | 36 | "version" : "1.0", | 26 | 'description': |
136 | 37 | "author" : "Camptocamp", | 27 | ''' |
137 | 38 | "category" : "Generic Modules/Human Resources", | 28 | Add a wizard into timesheet allowing people to complete a long period of time with the given values. |
138 | 39 | "description": | 29 | This is mainly useful to handle a long period of time like holidays. |
139 | 40 | """ | 30 | Known limitation: |
140 | 41 | Add a wizard into timesheet allowing people to complete a long period of time with the given values. | 31 | - Will complete all day between dates |
141 | 42 | This is mainly useful to handle a long period of time like holidays. | 32 | ''', |
142 | 43 | Known limitation: | 33 | 'author' : 'Camptocamp', |
143 | 44 | - Will complete all day between dates | 34 | 'website': 'http://camptocamp.com', |
144 | 45 | """, | 35 | 'depends' : ['hr_timesheet_sheet',], |
145 | 46 | "website": "http://camptocamp.com", | 36 | 'data' : [ |
146 | 47 | "depends" : [ | 37 | 'wizard/timesheet_fulfill_view.xml', |
147 | 48 | "hr_timesheet_sheet", | 38 | ], |
148 | 49 | ], | 39 | 'demo' : [], |
149 | 50 | "init_xml" : [], | 40 | 'test' : [], |
150 | 51 | "demo_xml" : [], | 41 | 'installable': True, |
151 | 52 | "update_xml" : [ | 42 | 'auto_install' : False, |
152 | 53 | 'wizard/timesheet_fulfill_view.xml', | 43 | 'application' : False, |
129 | 54 | ], | ||
130 | 55 | "active": False, | ||
131 | 56 | 'installable': False | ||
153 | 57 | } | 44 | } |
154 | 45 | |||
155 | 46 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
156 | 58 | 47 | ||
157 | === modified file 'hr_timesheet_fulfill/wizard/__init__.py' | |||
158 | --- hr_timesheet_fulfill/wizard/__init__.py 2011-08-12 12:53:16 +0000 | |||
159 | +++ hr_timesheet_fulfill/wizard/__init__.py 2013-05-02 15:51:48 +0000 | |||
160 | @@ -1,1 +1,4 @@ | |||
161 | 1 | |||
162 | 1 | import timesheet_fulfill | 2 | import timesheet_fulfill |
163 | 3 | |||
164 | 4 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
165 | 2 | \ No newline at end of file | 5 | \ No newline at end of file |
166 | 3 | 6 | ||
167 | === modified file 'hr_timesheet_fulfill/wizard/timesheet_fulfill.py' | |||
168 | --- hr_timesheet_fulfill/wizard/timesheet_fulfill.py 2011-09-01 13:44:19 +0000 | |||
169 | +++ hr_timesheet_fulfill/wizard/timesheet_fulfill.py 2013-05-02 15:51:48 +0000 | |||
170 | @@ -1,41 +1,29 @@ | |||
171 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
172 | 2 | ############################################################################## | 2 | ############################################################################## |
173 | 3 | # | 3 | # |
200 | 4 | # Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) | 4 | # Author: Guewen Baconnier (Camptocamp) |
201 | 5 | # All Right Reserved | 5 | # Author: Vincent Renaville |
202 | 6 | # | 6 | # Copyright 2012 Camptocamp SA |
203 | 7 | # Author : Guewen Baconnier (Camptocamp) | 7 | # |
204 | 8 | # Author : Vincent Renaville | 8 | # This program is free software: you can redistribute it and/or modify |
205 | 9 | # | 9 | # it under the terms of the GNU Affero General Public License as |
206 | 10 | # WARNING: This program as such is intended to be used by professional | 10 | # published by the Free Software Foundation, either version 3 of the |
207 | 11 | # programmers who take the whole responsability of assessing all potential | 11 | # License, or (at your option) any later version. |
208 | 12 | # consequences resulting from its eventual inadequacies and bugs | 12 | # |
209 | 13 | # End users who are looking for a ready-to-use solution with commercial | 13 | # This program is distributed in the hope that it will be useful, |
210 | 14 | # garantees and support are strongly adviced to contract a Free Software | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
211 | 15 | # Service Company | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
212 | 16 | # | 16 | # GNU Affero General Public License for more details. |
213 | 17 | # This program is Free Software; you can redistribute it and/or | 17 | # |
214 | 18 | # modify it under the terms of the GNU General Public License | 18 | # You should have received a copy of the GNU Affero General Public License |
215 | 19 | # as published by the Free Software Foundation; either version 2 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
190 | 20 | # of the License, or (at your option) any later version. | ||
191 | 21 | # | ||
192 | 22 | # This program is distributed in the hope that it will be useful, | ||
193 | 23 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
194 | 24 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
195 | 25 | # GNU General Public License for more details. | ||
196 | 26 | # | ||
197 | 27 | # You should have received a copy of the GNU General Public License | ||
198 | 28 | # along with this program; if not, write to the Free Software | ||
199 | 29 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
216 | 30 | # | 20 | # |
217 | 31 | ############################################################################## | 21 | ############################################################################## |
218 | 32 | 22 | ||
221 | 33 | 23 | from openerp.osv import fields, osv, orm | |
220 | 34 | from osv import fields, osv | ||
222 | 35 | from tools.translate import _ | 24 | from tools.translate import _ |
223 | 36 | from datetime import datetime, timedelta | 25 | from datetime import datetime, timedelta |
224 | 37 | 26 | ||
225 | 38 | |||
226 | 39 | def get_number_days_between_dates(date_from, date_to): | 27 | def get_number_days_between_dates(date_from, date_to): |
227 | 40 | datetime_from = datetime.strptime(date_from, '%Y-%m-%d') | 28 | datetime_from = datetime.strptime(date_from, '%Y-%m-%d') |
228 | 41 | datetime_to = datetime.strptime(date_to, '%Y-%m-%d') | 29 | datetime_to = datetime.strptime(date_to, '%Y-%m-%d') |
229 | @@ -44,7 +32,7 @@ | |||
230 | 44 | return difference.days + 1 | 32 | return difference.days + 1 |
231 | 45 | 33 | ||
232 | 46 | 34 | ||
234 | 47 | class FulfillTimesheet(osv.osv_memory): | 35 | class HrTimesheetFulfill(orm.TransientModel): |
235 | 48 | _name = 'hr.timesheet.fulfill' | 36 | _name = 'hr.timesheet.fulfill' |
236 | 49 | _description = "Wizard to fill-in timesheet for many days" | 37 | _description = "Wizard to fill-in timesheet for many days" |
237 | 50 | 38 | ||
238 | @@ -52,16 +40,19 @@ | |||
239 | 52 | 'date_from': fields.date('Date From', required=True), | 40 | 'date_from': fields.date('Date From', required=True), |
240 | 53 | 'date_to': fields.date('Date To', required=True), | 41 | 'date_to': fields.date('Date To', required=True), |
241 | 54 | 'description': fields.char('Description', size=100, required=True), | 42 | 'description': fields.char('Description', size=100, required=True), |
243 | 55 | 'nb_hours': fields.float('Hours per day', digits=(2, 2), required=True), | 43 | 'nb_hours': fields.float('Hours per Day', digits=(2, 2), required=True), |
244 | 56 | 'analytic_account_id': fields.many2one('account.analytic.account', | 44 | 'analytic_account_id': fields.many2one('account.analytic.account', |
245 | 57 | 'Analytic Account', required=True, | 45 | 'Analytic Account', required=True, |
246 | 58 | domain="[('type', '=', 'normal')," | 46 | domain="[('type', '=', 'normal')," |
247 | 59 | "('state', '!=', 'pending')," | 47 | "('state', '!=', 'pending')," |
248 | 60 | "('state', '!=', 'close')]"), | 48 | "('state', '!=', 'close')]"), |
253 | 61 | 'task_id':fields.many2one('project.task','Task', required=False) | 49 | 'task_id':fields.many2one('project.task', 'Task', required=False) |
254 | 62 | } | 50 | } |
255 | 63 | 51 | ||
256 | 64 | def fulfill_timesheet(self, cr, uid, ids, context): | 52 | def fulfill_timesheet(self, cr, uid, ids, context=None): |
257 | 53 | if context is None: | ||
258 | 54 | context = {} | ||
259 | 55 | |||
260 | 65 | employee_obj = self.pool.get('hr.employee') | 56 | employee_obj = self.pool.get('hr.employee') |
261 | 66 | timesheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | 57 | timesheet_obj = self.pool.get('hr_timesheet_sheet.sheet') |
262 | 67 | al_ts_obj = self.pool.get('hr.analytic.timesheet') | 58 | al_ts_obj = self.pool.get('hr.analytic.timesheet') |
263 | @@ -117,23 +108,23 @@ | |||
264 | 117 | 'sheet_id': timesheet.id, | 108 | 'sheet_id': timesheet.id, |
265 | 118 | 'journal_id': journal_id, | 109 | 'journal_id': journal_id, |
266 | 119 | } | 110 | } |
267 | 120 | |||
268 | 121 | on_change_values = al_ts_obj.\ | 111 | on_change_values = al_ts_obj.\ |
269 | 122 | on_change_unit_amount(cr, uid, False, product_id, | 112 | on_change_unit_amount(cr, uid, False, product_id, |
270 | 123 | wizard.nb_hours, employee.company_id.id, | 113 | wizard.nb_hours, employee.company_id.id, |
272 | 124 | task_id=wizard.task_id.id, | 114 | # task_id=wizard.task_id.id, |
273 | 125 | unit=unit_id, journal_id=journal_id, | 115 | unit=unit_id, journal_id=journal_id, |
274 | 126 | context=context) | 116 | context=context) |
275 | 127 | if on_change_values: | 117 | if on_change_values: |
276 | 128 | res.update(on_change_values['value']) | 118 | res.update(on_change_values['value']) |
277 | 129 | al_ts_obj.create(cr, uid, res, context) | 119 | al_ts_obj.create(cr, uid, res, context) |
278 | 130 | |||
279 | 131 | # If there is no other attendances, create it | 120 | # If there is no other attendances, create it |
280 | 132 | # create the attendances: | 121 | # create the attendances: |
285 | 133 | existing_attendances = attendance_obj\ | 122 | # print attendance_obj.read(cr,uid,['name']) |
286 | 134 | .search(cr, uid, [('name', '=', datetime_current), | 123 | existing_attendances=0 |
287 | 135 | ('employee_id', '=', employee_id)]) | 124 | att_id= attendance_obj.search(cr, uid, [('employee_id', '=', employee_id)]) |
288 | 136 | 125 | for record in attendance_obj.read(cr,uid,att_id,['name']): | |
289 | 126 | if record['name'].startswith( datetime_current ): | ||
290 | 127 | existing_attendances=1 | ||
291 | 137 | if not existing_attendances: | 128 | if not existing_attendances: |
292 | 138 | att_date_start = datetime_current + " 00:00:00" | 129 | att_date_start = datetime_current + " 00:00:00" |
293 | 139 | att_start = { | 130 | att_start = { |
294 | @@ -154,6 +145,7 @@ | |||
295 | 154 | } | 145 | } |
296 | 155 | attendance_obj.create(cr, uid, att_start, context) | 146 | attendance_obj.create(cr, uid, att_start, context) |
297 | 156 | attendance_obj.create(cr, uid, att_end, context) | 147 | attendance_obj.create(cr, uid, att_end, context) |
298 | 148 | |||
299 | 157 | return {'type': 'ir.actions.act_window_close'} | 149 | return {'type': 'ir.actions.act_window_close'} |
300 | 158 | 150 | ||
302 | 159 | FulfillTimesheet() | 151 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
303 | 160 | 152 | ||
304 | === modified file 'hr_timesheet_fulfill/wizard/timesheet_fulfill_view.xml' | |||
305 | --- hr_timesheet_fulfill/wizard/timesheet_fulfill_view.xml 2011-08-12 12:53:16 +0000 | |||
306 | +++ hr_timesheet_fulfill/wizard/timesheet_fulfill_view.xml 2013-05-02 15:51:48 +0000 | |||
307 | @@ -1,43 +1,58 @@ | |||
308 | 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
309 | 2 | <openerp> | 2 | <openerp> |
350 | 3 | <data> | 3 | <data> |
351 | 4 | 4 | ||
352 | 5 | <record id="view_hr_timesheet_fulfill_form" model="ir.ui.view"> | 5 | <record id="view_hr_timesheet_fulfill_form" model="ir.ui.view"> |
353 | 6 | <field name="name">hr.timesheet.fulfill.form</field> | 6 | <field name="name">hr.timesheet.fulfill.form</field> |
354 | 7 | <field name="model">hr.timesheet.fulfill</field> | 7 | <field name="model">hr.timesheet.fulfill</field> |
355 | 8 | <field name="type">form</field> | 8 | <field name="arch" type="xml"> |
356 | 9 | <field name="arch" type="xml"> | 9 | <form string="Enter the dates : ALL days between those dates will be completed." version="7.0"> |
357 | 10 | <form string="Enter the dates : ALL days between those dates will be completed."> | 10 | <group> |
358 | 11 | <field name="date_from"/> | 11 | <group> |
359 | 12 | <field name="date_to"/> | 12 | <field name="date_from"/> |
360 | 13 | <field name="analytic_account_id"/> | 13 | </group> |
361 | 14 | <field name="task_id" domain="[('state','!=','cancel'),('state','!=','done')" context="{'account_id':analytic_account_id}"/> | 14 | <group> |
362 | 15 | <field name="nb_hours" widget="float_time"/> | 15 | <field name="date_to"/> |
363 | 16 | <field name="description" colspan="4"/> | 16 | </group> |
364 | 17 | <group colspan="4" col="6"> | 17 | </group> |
365 | 18 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> | 18 | <group> |
366 | 19 | <button icon="gtk-ok" string="Fill in Timesheet" name="fulfill_timesheet" type="object"/> | 19 | <group> |
367 | 20 | </group> | 20 | <field name="analytic_account_id"/> |
368 | 21 | </form> | 21 | </group> |
369 | 22 | </field> | 22 | <group> |
370 | 23 | </record> | 23 | <field name="task_id" domain="[('state','!=','cancel'),('state','!=','done')]" context="{'account_id':analytic_account_id}"/> |
371 | 24 | 24 | </group> | |
372 | 25 | <record id="action_hr_timesheet_fulfill" model="ir.actions.act_window"> | 25 | </group> |
373 | 26 | <field name="name">Fill in Timesheet</field> | 26 | <group> |
374 | 27 | <field name="res_model">hr.timesheet.fulfill</field> | 27 | <field name="nb_hours" widget="float_time"/> |
375 | 28 | <field name="view_type">form</field> | 28 | </group> |
376 | 29 | <field name="view_mode">form</field> | 29 | <group colspan="4"> |
377 | 30 | <field name="view_id" ref="view_hr_timesheet_fulfill_form"/> | 30 | <field name="description"/> |
378 | 31 | <field name="target">new</field> | 31 | </group> |
379 | 32 | </record> | 32 | <footer> |
380 | 33 | 33 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> | |
381 | 34 | <record id="ir_action_hr_timesheet_fulfill_wizard" model="ir.values"> | 34 | <button icon="gtk-ok" string="Fill in Timesheet" name="fulfill_timesheet" type="object"/> |
382 | 35 | <field name="key2">client_action_multi</field> | 35 | </footer> |
383 | 36 | <field name="model">hr_timesheet_sheet.sheet</field> | 36 | </form> |
384 | 37 | <field name="name">Fill in Timesheet</field> | 37 | </field> |
385 | 38 | <field eval="'ir.actions.act_window,%d'%action_hr_timesheet_fulfill" name="value"/> | 38 | </record> |
386 | 39 | <field eval="True" name="object"/> | 39 | |
387 | 40 | </record> | 40 | <record id="action_hr_timesheet_fulfill" model="ir.actions.act_window"> |
388 | 41 | 41 | <field name="name">Fill in Timesheet</field> | |
389 | 42 | </data> | 42 | <field name="res_model">hr.timesheet.fulfill</field> |
390 | 43 | <field name="view_type">form</field> | ||
391 | 44 | <field name="view_mode">form</field> | ||
392 | 45 | <field name="view_id" ref="view_hr_timesheet_fulfill_form"/> | ||
393 | 46 | <field name="target">new</field> | ||
394 | 47 | </record> | ||
395 | 48 | |||
396 | 49 | <record id="ir_action_hr_timesheet_fulfill_wizard" model="ir.values"> | ||
397 | 50 | <field name="key2">client_action_multi</field> | ||
398 | 51 | <field name="model">hr_timesheet_sheet.sheet</field> | ||
399 | 52 | <field name="name">Fill in Timesheet</field> | ||
400 | 53 | <field eval="'ir.actions.act_window,%d'%action_hr_timesheet_fulfill" name="value"/> | ||
401 | 54 | <field eval="True" name="object"/> | ||
402 | 55 | </record> | ||
403 | 56 | |||
404 | 57 | </data> | ||
405 | 43 | </openerp> | 58 | </openerp> |
LGTM