Merge lp:~openerp-dev/openobject-addons/trunk-bug-881337-mdi into lp:openobject-addons

Proposed by DJ Patel (OpenERP)
Status: Rejected
Rejected by: Fabien (Open ERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-881337-mdi
Merge into: lp:openobject-addons
Diff against target: 13 lines (+2/-1)
1 file modified
sale_margin/sale_margin.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-881337-mdi
Reviewer Review Type Date Requested Status
DJ Patel (OpenERP) Pending
Purnendu Singh (OpenERP) Pending
Review via email: mp+81807@code.launchpad.net

This proposal supersedes a proposal from 2011-11-04.

Description of the change

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/881337 "duplicate key value violates unique constraint 'picking_invoice_rel_picking_id_key' ".

Thanks and Regards,

Divyesh Makwana(MDI)

To post a comment you must log in.
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote : Posted in a previous version of this proposal

what is abc?

review: Needs Fixing
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote : Posted in a previous version of this proposal

Hello Sir,

I have done the changes according to your suggestion.

Thanks and Regards,

Divyesh Makwana(MDI)

review: Needs Resubmitting
Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote : Posted in a previous version of this proposal

 for inv_ids in invoice_ids

inv_ids is not good here and context is missing in write method

review: Needs Fixing
5492. By DJ Patel (OpenERP)

[IMP] sale_margin : duplicate key value violates unique constraint 'picking_invoice_rel_picking_id_key'

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

fixed in r5584, check for correct fix

Unmerged revisions

5492. By DJ Patel (OpenERP)

[IMP] sale_margin : duplicate key value violates unique constraint 'picking_invoice_rel_picking_id_key'

5491. By DJ Patel (OpenERP)

[IMP] sale : duplicate key value violates unique constraint 'picking_invoice_rel_picking_id_key'

5490. By DJ Patel (OpenERP)

[FIX] sale_margin: duplicate key value violates unique constraint 'picking_invoice_rel_picking_id_key'

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_margin/sale_margin.py'
2--- sale_margin/sale_margin.py 2011-09-17 17:38:27 +0000
3+++ sale_margin/sale_margin.py 2011-11-10 05:31:26 +0000
4@@ -95,7 +95,8 @@
5 picking_obj = self.pool.get('stock.picking')
6 res = super(stock_picking, self).action_invoice_create(cr, uid, ids, journal_id=journal_id, group=group, type=type, context=context)
7 invoice_ids = res.values()
8- picking_obj.write(cr, uid, ids, {'invoice_ids': [[6, 0, invoice_ids]]})
9+ for inv_id in invoice_ids:
10+ picking_obj.write(cr, uid, ids, {'invoice_ids': [(6, 0, [inv_id])]}, context=context)
11 return res
12
13 stock_picking()

Subscribers

People subscribed via source and target branches

to all changes: