Merge lp:~openerp-dev/openobject-addons/6.0-opw-587847-pna into lp:openobject-addons/6.0

Proposed by Pinakin Nayi (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-587847-pna
Merge into: lp:openobject-addons/6.0
Diff against target: 11 lines (+2/-0)
1 file modified
sale_margin/sale_margin.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-587847-pna
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+153108@code.launchpad.net

Description of the change

Hello Sir,

I fixed issue in sale_margin.

Steps to reproduce :
--> Create a sale order
      * shipping policy: 'Invoice From The Picking'
      * two sale order lines
--> Confirm the sale order
--> Go to the delivery order and do a partial picking to create a back order
--> Now try to create a grouped invoice for the two pickings and you will get a constraint error

Thanks,
pna

To post a comment you must log in.

Unmerged revisions

5451. By Pinakin Nayi (OpenERP)

[FIX]sale_margin:when try to create group invoice its generate constraint error

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sale_margin/sale_margin.py'
--- sale_margin/sale_margin.py 2012-05-23 11:42:02 +0000
+++ sale_margin/sale_margin.py 2013-03-13 11:30:34 +0000
@@ -94,6 +94,8 @@
94 picking_obj = self.pool.get('stock.picking')94 picking_obj = self.pool.get('stock.picking')
95 res = super(stock_picking, self).action_invoice_create(cr, uid, ids, journal_id=journal_id,group=group, type=type, context=context) 95 res = super(stock_picking, self).action_invoice_create(cr, uid, ids, journal_id=journal_id,group=group, type=type, context=context)
96 invoice_ids = res.values()96 invoice_ids = res.values()
97 if group:
98 invoice_ids = list(set(invoice_ids))
97 picking_obj.write(cr, uid, ids, {'invoice_ids': [[6, 0, invoice_ids]]})99 picking_obj.write(cr, uid, ids, {'invoice_ids': [[6, 0, invoice_ids]]})
98 return res100 return res
99101