Merge lp:~openerp-dev/openobject-addons/7.0-591589-opw-skh into lp:openobject-addons/7.0

Proposed by Yannick Vaucher @ Camptocamp
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-591589-opw-skh
Merge into: lp:openobject-addons/7.0
Diff against target: 13 lines (+3/-0)
1 file modified
hr_timesheet/hr_timesheet.py (+3/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-591589-opw-skh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+183858@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

9089. By Somesh Khare(OpenERP) <email address hidden>

[FIX]hr_timesheet: amount on timesheet line not calculated as per as the cost price of the product (Case: ref 591589)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet/hr_timesheet.py'
2--- hr_timesheet/hr_timesheet.py 2013-04-24 09:28:10 +0000
3+++ hr_timesheet/hr_timesheet.py 2013-09-04 11:59:24 +0000
4@@ -182,6 +182,9 @@
5 ename = ''
6 if emp_id:
7 ename = emp_obj.browse(cr, uid, emp_id[0], context=context).name
8+ res = self.on_change_unit_amount(cr, uid, id, vals.get('product_id'), vals.get('unit_amount'), False, False, vals.get('journal_id'), context)
9+ if res['value'].get('amount'):
10+ vals.update(amount=res['value']['amount'])
11 if not vals.get('journal_id',False):
12 raise osv.except_osv(_('Warning!'), _('No \'Analytic Journal\' is defined for employee %s \nDefine an employee for the selected user and assign an \'Analytic Journal\'!')%(ename,))
13 if not vals.get('account_id',False):