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
1=== modified file 'analytic/analytic.py'
2--- analytic/analytic.py 2012-11-02 16:16:29 +0000
3+++ analytic/analytic.py 2012-11-08 09:24:29 +0000
4@@ -98,7 +98,12 @@
5
6 def name_get(self, cr, uid, ids, context=None):
7 res = []
8- for id in ids:
9+ full_ids = []
10+ if isinstance(ids,list):
11+ full_ids.extend(ids)
12+ else:
13+ full_ids.append(ids)
14+ for id in full_ids:
15 elmt = self.browse(cr, uid, id, context=context)
16 res.append((id, self._get_one_full_name(elmt)))
17 return res
18
19=== modified file 'project/project.py'
20--- project/project.py 2012-11-02 17:42:00 +0000
21+++ project/project.py 2012-11-08 09:24:29 +0000
22@@ -203,11 +203,7 @@
23
24 def attachment_tree_view(self, cr, uid, ids, context):
25 task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
26- domain = [
27- ('|',
28- '&', 'res_model', '=', 'project.project'), ('res_id', 'in', ids),
29- '&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)
30- ]
31+ domain = ['|', '&', ('res_model', '=', 'project.project'), ('res_id', 'in', ids), '&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)]
32 res_id = ids and ids[0] or False
33 return {
34 'name': _('Attachments'),
35
36=== modified file 'project_timesheet/project_timesheet.py'
37--- project_timesheet/project_timesheet.py 2012-10-29 05:45:52 +0000
38+++ project_timesheet/project_timesheet.py 2012-11-08 09:24:29 +0000
39@@ -199,8 +199,8 @@
40
41 if amount_unit and 'amount' in amount_unit.get('value',{}):
42 vals_line['amount'] = amount_unit['value']['amount']
43-
44- self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)
45+ if line_id.sheet_id.state in ['confirm' 'done']:
46+ self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)
47
48 return super(project_work,self).write(cr, uid, ids, vals, context)
49
50@@ -241,7 +241,6 @@
51 if vals.get('project_id',False):
52 project_obj = self.pool.get('project.project').browse(cr, uid, vals['project_id'], context=context)
53 acc_id = project_obj.analytic_account_id.id
54-
55 for task_obj in self.browse(cr, uid, ids, context=context):
56 if len(task_obj.work_ids):
57 for task_work in task_obj.work_ids:

Subscribers

People subscribed via source and target branches

to all changes: