Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-opw-573448-port-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #948876 in OpenERP Addons: "Invoice tasks creates new tasks to invoice"
https://bugs.launchpad.net/openobject-addons/+bug/948876
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-573448-port-mma/+merge/136640
Hello,
I Have fix the issue of Create the invoice again and again
More information and reproduce this issue go on lp:948876
Code is forward port from 6.1
Thanks,
Mayur
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-573448-port-mma/+merge/136640
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-opw-573448-port-mma.
=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
--- hr_timesheet_invoice/hr_timesheet_invoice.py 2012-11-28 11:40:02 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice.py 2012-11-28 12:35:28 +0000
@@ -368,10 +368,13 @@
res = super(account_move_line, self).create_analytic_lines(cr, uid, ids,context=context)
analytic_line_obj = self.pool.get('account.analytic.line')
for move_line in self.browse(cr, uid, ids, context=context):
+ #For customer invoice, link analytic line to the invoice so it is not proposed for invoicing in Bill Tasks Work
+ invoice_id = move_line.invoice and move_line.invoice.type in ('out_invoice','out_refund') and move_line.invoice.id or False
for line in move_line.analytic_lines:
- toinv = line.account_id.to_invoice.id
- if toinv:
- analytic_line_obj.write(cr, uid, line.id, {'to_invoice': toinv})
+ analytic_line_obj.write(cr, uid, line.id, {
+ 'invoice_id': invoice_id,
+ 'to_invoice': line.account_id.to_invoice and line.account_id.to_invoice.id or False
+ }, context=context)
return res
account_move_line()
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp