Merge lp:~openerp-dev/openobject-addons/6.1-opw-573806-rha into lp:openobject-addons/6.1

Proposed by Rifakat Husen (OpenERP)
Status: Approved
Approved by: Vinay Rana (OpenERP)
Approved revision: 6746
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-573806-rha
Merge into: lp:openobject-addons/6.1
Diff against target: 23 lines (+3/-3)
1 file modified
hr_timesheet_sheet/hr_timesheet_sheet.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-573806-rha
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) (community) Approve
Xavier ALT Pending
Naresh(OpenERP) Pending
Review via email: mp+102642@code.launchpad.net

Description of the change

Hello,

User was not able see timesheet lines created from task work in his Timesheet anymore.

Domain was created for fields date_current and sheet_id, where sheet_id is a functional field
which is not stored into database and hence search could not result correct values.

Thanks for your review.

Regards,
Rifakat Haradwala

To post a comment you must log in.
Revision history for this message
Juan Andres Martinez Chaine (jmartinez-catuy) wrote :

Hi,
apply the change, and I see that would fail to use the same approach in the method _total. They do not take into account the hours of work

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

The provided patch solve the time sheet problem.sheet_id reference could not search with the existing code.The sheet_id functions field using store dict where the passed argument do not store the result in to database cause the problem.

review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6746. By Rifakat Husen (OpenERP)

[FIX] hr_timesheet_sheet: timesheet lines created from task work doesn't show up in user's timesheet line automatically

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
--- hr_timesheet_sheet/hr_timesheet_sheet.py 2012-01-31 13:36:57 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet.py 2012-04-19 07:55:04 +0000
@@ -79,16 +79,16 @@
79 values = {}79 values = {}
8080
8181
82 res5 = obj.read(cr, user, ids, ['date_current'], context=context)82 res5 = obj.read(cr, user, ids, ['date_current', 'user_id'], context=context)
83 res6 = {}83 res6 = {}
84 for r in res5:84 for r in res5:
85 res6[r['id']] = r['date_current']85 res6[r['id']] = (r['date_current'], r['user_id'][0])
8686
87 ids2 = []87 ids2 = []
88 for id in ids:88 for id in ids:
89 dom = []89 dom = []
90 if id in res6:90 if id in res6:
91 dom = [('date', '=', res6[id]), ('sheet_id', '=', id)]91 dom = [('date', '=', res6[id][0]), ('user_id','=',res6[id][1])]
92 ids2.extend(obj.pool.get(self._obj).search(cr, user,92 ids2.extend(obj.pool.get(self._obj).search(cr, user,
93 dom, limit=self._limit))93 dom, limit=self._limit))
94 res = {}94 res = {}