Merge lp:~taktik/openobject-addons/6.1-taktik-fix-project-timesheet-write into lp:openobject-addons/6.1

Proposed by David Lefever @ Taktik
Status: Needs review
Proposed branch: lp:~taktik/openobject-addons/6.1-taktik-fix-project-timesheet-write
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
project_timesheet/project_timesheet.py (+1/-1)
To merge this branch: bzr merge lp:~taktik/openobject-addons/6.1-taktik-fix-project-timesheet-write
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+213655@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

7316. By David Lefever @ Taktik

Fixed project_timesheet write.

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 2014-04-01 13:39:00 +0000
4@@ -160,7 +160,7 @@
5 # Compute based on pricetype
6 amount_unit = timesheet_obj.on_change_unit_amount(cr, uid, line_id.id,
7 prod_id=prod_id, company_id=False,
8- unit_amount=vals_line['unit_amount'], unit=False, journal_id=vals_line['journal_id'], context=context)
9+ unit_amount=vals_line['unit_amount'], unit=False, journal_id=vals_line.get('journal_id', line_id and line_id.journal_id and line_id.journal_id.id or False), context=context)
10
11 if amount_unit and 'amount' in amount_unit.get('value',{}):
12 vals_line['amount'] = amount_unit['value']['amount']