Merge lp:~openerp-dev/openobject-addons/6.1-opw-573846-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Vinay Rana (OpenERP)
Approved revision: 6769
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-573846-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 22 lines (+5/-5)
1 file modified
project_timesheet/project_timesheet.py (+5/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-573846-skh
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+103687@code.launchpad.net

Description of the change

Hello Sir,

[Fix]: Key error: Journal_id Error occurred when updating the task work, In Webclient 'user_id' did not passed in vals.

Steps to reproduce the issue:
 1) Create a new Task and Start it.
 2) Enter "Task Work" details save it
 3) Save the Task
 4) re- open the task and edit already entered task work line, edit the time spent and give blank spaces in the "Work Summary"
 Until now, everything is fine.
 5) Press the Save button of the task

This branch fixes this issue, Kindly review the branch and please share your views on it.

Thanks,
Somesh Khare

To post a comment you must log in.
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

The provided fix will solve the issue.

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

Hello,

This bug was qualified as Already Fixed on Trunk (means that it was already fixed and merged in Trunk). 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

6769. By Somesh Khare

[FIX] project_timesheet.py: Key Error Journal_id Error in webclient (Case: ref 573846)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project_timesheet/project_timesheet.py'
2--- project_timesheet/project_timesheet.py 2012-01-31 13:36:57 +0000
3+++ project_timesheet/project_timesheet.py 2012-04-26 12:54:08 +0000
4@@ -140,13 +140,13 @@
5 vals_line = {}
6 if 'name' in vals:
7 vals_line['name'] = '%s: %s' % (tools.ustr(task.task_id.name), tools.ustr(vals['name']) or '/')
8+ vals_line['user_id'] = task.user_id.id
9 if 'user_id' in vals:
10 vals_line['user_id'] = vals['user_id']
11- result = self.get_user_related_details(cr, uid, vals['user_id'])
12- for fld in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'):
13- if result.get(fld, False):
14- vals_line[fld] = result[fld]
15-
16+ result = self.get_user_related_details(cr, uid, vals_line['user_id'])
17+ for fld in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'):
18+ if result.get(fld, False):
19+ vals_line[fld] = result[fld]
20 if 'date' in vals:
21 vals_line['date'] = vals['date'][:10]
22 if 'hours' in vals: