openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #05088
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-734497-pso into lp:openobject-addons
pso (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-734497-pso into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #734497 in OpenERP Addons: "hr_timesheet_invoice: reinvoicing is not correctly set on analytic account lines"
https://bugs.launchpad.net/openobject-addons/+bug/734497
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-734497-pso/+merge/56538
Fixed bug: 734497 (https://bugs.launchpad.net/openobject-addons/+bug/734497)
Passed to_invoice while creating of analytic lines.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-734497-pso/+merge/56538
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-734497-pso.
=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
--- hr_timesheet_invoice/hr_timesheet_invoice.py 2011-01-14 00:11:01 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice.py 2011-04-06 10:10:54 +0000
@@ -176,5 +176,20 @@
account_invoice()
+class account_move_line(osv.osv):
+ _inherit = "account.move.line"
+
+ def create_analytic_lines(self, cr, uid, ids, context=None):
+ res = super(account_move_line, self).create_analytic_lines(cr, uid, ids,context=context)
+ analytic = self.pool.get("account.analytic.line")
+ for move_obj in self.pool.get("account.move.line").browse(cr, uid, ids, context=context):
+ for line in move_obj.analytic_lines:
+ toinv = line.account_id.to_invoice.id
+ if toinv:
+ analytic.write(cr, uid, line.id, {'to_invoice': toinv})
+ return res
+
+account_move_line()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Follow ups