Merge lp:~camptocamp/ocb-addons/7.0-fix-1220665-skh into lp:ocb-addons

Proposed by Yannick Vaucher @ Camptocamp
Status: Merged
Merged at revision: 9581
Proposed branch: lp:~camptocamp/ocb-addons/7.0-fix-1220665-skh
Merge into: lp:ocb-addons
Diff against target: 13 lines (+3/-0)
1 file modified
hr_timesheet/hr_timesheet.py (+3/-0)
To merge this branch: bzr merge lp:~camptocamp/ocb-addons/7.0-fix-1220665-skh
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Christophe CHAUVET code review, not test Approve
Review via email: mp+183861@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Hi

I check the code, it is correct

Regards,

review: Approve (code review, not test)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

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-08-15 07:54:23 +0000
3+++ hr_timesheet/hr_timesheet.py 2013-09-04 12:14:36 +0000
4@@ -203,6 +203,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):