Merge lp:~openerp-dev/openobject-addons/trunk-bug-1023047-api into lp:openobject-addons

Proposed by Arnaud Pineux (OpenERP)
Status: Rejected
Rejected by: Fabien (Open ERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1023047-api
Merge into: lp:openobject-addons
Diff against target: 57 lines (+9/-9)
3 files modified
analytic/analytic.py (+6/-1)
project/project.py (+1/-5)
project_timesheet/project_timesheet.py (+2/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1023047-api
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+133422@code.launchpad.net

Description of the change

In Project_Timesheet/project_timesheet.py
At line 203: self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)
was replaced by:
if line_id.sheet_id.state in ['confirm' 'done']:
     self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)

To post a comment you must log in.
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

was already fixed
+wrong fix

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'analytic/analytic.py'
--- analytic/analytic.py 2012-11-02 16:16:29 +0000
+++ analytic/analytic.py 2012-11-08 09:24:29 +0000
@@ -98,7 +98,12 @@
9898
99 def name_get(self, cr, uid, ids, context=None):99 def name_get(self, cr, uid, ids, context=None):
100 res = []100 res = []
101 for id in ids:101 full_ids = []
102 if isinstance(ids,list):
103 full_ids.extend(ids)
104 else:
105 full_ids.append(ids)
106 for id in full_ids:
102 elmt = self.browse(cr, uid, id, context=context)107 elmt = self.browse(cr, uid, id, context=context)
103 res.append((id, self._get_one_full_name(elmt)))108 res.append((id, self._get_one_full_name(elmt)))
104 return res109 return res
105110
=== modified file 'project/project.py'
--- project/project.py 2012-11-02 17:42:00 +0000
+++ project/project.py 2012-11-08 09:24:29 +0000
@@ -203,11 +203,7 @@
203 203
204 def attachment_tree_view(self, cr, uid, ids, context):204 def attachment_tree_view(self, cr, uid, ids, context):
205 task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])205 task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
206 domain = [206 domain = ['|', '&', ('res_model', '=', 'project.project'), ('res_id', 'in', ids), '&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)]
207 ('|',
208 '&', 'res_model', '=', 'project.project'), ('res_id', 'in', ids),
209 '&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)
210 ]
211 res_id = ids and ids[0] or False207 res_id = ids and ids[0] or False
212 return {208 return {
213 'name': _('Attachments'),209 'name': _('Attachments'),
214210
=== modified file 'project_timesheet/project_timesheet.py'
--- project_timesheet/project_timesheet.py 2012-10-29 05:45:52 +0000
+++ project_timesheet/project_timesheet.py 2012-11-08 09:24:29 +0000
@@ -199,8 +199,8 @@
199199
200 if amount_unit and 'amount' in amount_unit.get('value',{}):200 if amount_unit and 'amount' in amount_unit.get('value',{}):
201 vals_line['amount'] = amount_unit['value']['amount']201 vals_line['amount'] = amount_unit['value']['amount']
202202 if line_id.sheet_id.state in ['confirm' 'done']:
203 self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)203 self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)
204204
205 return super(project_work,self).write(cr, uid, ids, vals, context)205 return super(project_work,self).write(cr, uid, ids, vals, context)
206206
@@ -241,7 +241,6 @@
241 if vals.get('project_id',False):241 if vals.get('project_id',False):
242 project_obj = self.pool.get('project.project').browse(cr, uid, vals['project_id'], context=context)242 project_obj = self.pool.get('project.project').browse(cr, uid, vals['project_id'], context=context)
243 acc_id = project_obj.analytic_account_id.id243 acc_id = project_obj.analytic_account_id.id
244
245 for task_obj in self.browse(cr, uid, ids, context=context):244 for task_obj in self.browse(cr, uid, ids, context=context):
246 if len(task_obj.work_ids):245 if len(task_obj.work_ids):
247 for task_work in task_obj.work_ids:246 for task_work in task_obj.work_ids:

Subscribers

People subscribed via source and target branches

to all changes: