Merge lp:~avanzosc/ocb-addons/6.1 into lp:ocb-addons/6.1

Proposed by Daniel Campos (Avanzosc)
Status: Merged
Approved by: Holger Brunn (Therp)
Approved revision: no longer in the source branch.
Merged at revision: 6831
Proposed branch: lp:~avanzosc/ocb-addons/6.1
Merge into: lp:ocb-addons/6.1
Diff against target: 20 lines (+6/-3)
1 file modified
hr_timesheet_invoice/hr_timesheet_invoice.py (+6/-3)
To merge this branch: bzr merge lp:~avanzosc/ocb-addons/6.1
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Yann Papouin Approve
Pedro Manuel Baeza code review Approve
Review via email: mp+202622@code.launchpad.net

Description of the change

Fix proposed for Bug #948876 - Invoice tasks creates new tasks to invoice

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Daniel,

We need that the changes are exactly the same as the proposed fix for official branch (https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-573448-ksa/+merge/101068), because in case this patch will be merged on core, to assure there's no conflict when merging upstream revisions.

Another thing: please link this branch to the bug report and add ocb-addons project on it.

Thanks for your efforts.

Regards.

review: Needs Fixing
Revision history for this message
Daniel Campos (Avanzosc) (dani-ds) wrote :

Hi Pedro, I have done the changes you need. And thanks for your patience.

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thank you very much for the changes!

review: Approve (code review)
Revision history for this message
Yann Papouin (yann-papouin) wrote :

Thanks for this backport

review: Approve
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)
lp:~avanzosc/ocb-addons/6.1 updated
6831. By <email address hidden>

[FIX] invoice tasks creates new tasks to invoice

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
2--- hr_timesheet_invoice/hr_timesheet_invoice.py 2012-01-03 12:33:39 +0000
3+++ hr_timesheet_invoice/hr_timesheet_invoice.py 2014-01-22 14:56:18 +0000
4@@ -193,10 +193,13 @@
5 res = super(account_move_line, self).create_analytic_lines(cr, uid, ids,context=context)
6 analytic_line_obj = self.pool.get('account.analytic.line')
7 for move_line in self.browse(cr, uid, ids, context=context):
8+ #For customer invoice, link analytic line to the invoice so it is not proposed for invoicing in Bill Tasks Work
9+ invoice_id = move_line.invoice and move_line.invoice.type in ('out_invoice','out_refund') and move_line.invoice.id or False
10 for line in move_line.analytic_lines:
11- toinv = line.account_id.to_invoice.id
12- if toinv:
13- analytic_line_obj.write(cr, uid, line.id, {'to_invoice': toinv})
14+ analytic_line_obj.write(cr, uid, line.id, {
15+ 'invoice_id': invoice_id,
16+ 'to_invoice': line.account_id.to_invoice and line.account_id.to_invoice.id or False
17+ }, context=context)
18 return res
19
20 account_move_line()

Subscribers

People subscribed via source and target branches