Merge lp:~numerigraphe/openobject-addons/6.0-picking-copy-2binvoiced into lp:openobject-addons/6.0

Proposed by Numérigraphe
Status: Needs review
Proposed branch: lp:~numerigraphe/openobject-addons/6.0-picking-copy-2binvoiced
Merge into: lp:openobject-addons/6.0
Diff against target: 14 lines (+3/-1)
1 file modified
stock/stock.py (+3/-1)
To merge this branch: bzr merge lp:~numerigraphe/openobject-addons/6.0-picking-copy-2binvoiced
Reviewer Review Type Date Requested Status
Raphael Collet (OpenERP) Pending
OpenERP Core Team Pending
Review via email: mp+89894@code.launchpad.net

Description of the change

Backport into v6.0 the fix for Bug #893130: Invoice state should be reset when an invoiced picking is copied.

To post a comment you must log in.

Unmerged revisions

4925. By Kirti Savalia(OpenERP)

[FIX]:original invoice state is invoiced when copied that picking invoice state should be 2binvoiced

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2012-01-10 12:52:13 +0000
3+++ stock/stock.py 2012-01-24 13:38:27 +0000
4@@ -699,7 +699,9 @@
5 seq_obj_name = 'stock.picking.' + picking_obj.type
6 default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
7 default['origin'] = ''
8- default['backorder_id'] = False
9+ default['backorder_id'] = False
10+ if picking_obj.invoice_state == 'invoiced':
11+ default['invoice_state'] = '2binvoiced'
12 res = super(stock_picking, self).copy(cr, uid, id, default, context)
13 if res:
14 picking_obj = self.browse(cr, uid, res, context=context)