Merge lp:~openerp-dev/openobject-addons/trunk-bug-1170266-cga into lp:openobject-addons

Proposed by Chandni Gandhi(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1170266-cga
Merge into: lp:openobject-addons
Diff against target: 25 lines (+3/-5)
1 file modified
hr_timesheet_invoice/hr_timesheet_invoice.py (+3/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1170266-cga
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+164684@code.launchpad.net

Description of the change

Hello,

I have fixed issue of invoice on tasks (timesheet) multiples entries are not splited by user on description but doubled.

Thanks.
CGA

To post a comment you must log in.

Unmerged revisions

8696. By Chandni Gandhi(OpenERP)

[IMP]:Improve code

8695. By Chandni Gandhi(OpenERP)

[FIX]:Add user name in description field of invoice line

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 2013-04-15 10:23:49 +0000
3+++ hr_timesheet_invoice/hr_timesheet_invoice.py 2013-05-20 08:56:29 +0000
4@@ -231,6 +231,9 @@
5 factor_name = product_obj.name_get(cr, uid, [product_id], context=context2)[0][1]
6 if factor.customer_name:
7 factor_name += ' - ' + factor.customer_name
8+ if user_id:
9+ user = self.pool.get('res.users').browse(cr, uid, user_id, context)
10+ factor_name += ' - ' + user.name
11
12 ctx = context.copy()
13 ctx.update({'uom':uom})
14@@ -273,12 +276,7 @@
15 details.append("%s %s" % (line['unit_amount'], product_uom_obj.browse(cr, uid, [line['product_uom_id']],context2)[0].name))
16 else:
17 details.append("%s" % (line['unit_amount'], ))
18- if data.get('name', False):
19- details.append(line['name'])
20- note.append(u' - '.join(map(lambda x: unicode(x) or '',details)))
21
22- if note:
23- curr_line['name'] += "\n" + ("\n".join(map(lambda x: unicode(x) or '',note)))
24 invoice_line_obj.create(cr, uid, curr_line, context=context)
25 cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s", (last_invoice, account.id, tuple(ids)))
26

Subscribers

People subscribed via source and target branches

to all changes: