Merge lp:~openerp-dev/openobject-addons/trunk-bug-1060259-pja into lp:openobject-addons

Proposed by Jalpesh Patel(OpenERP)
Status: Rejected
Rejected by: Martin Trigaux (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1060259-pja
Merge into: lp:openobject-addons
Diff against target: 19 lines (+7/-2)
1 file modified
stock_invoice_directly/wizard/stock_invoice.py (+7/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1060259-pja
Reviewer Review Type Date Requested Status
Atul Patel(OpenERP) Pending
Review via email: mp+132096@code.launchpad.net

Description of the change

Hello sir,

    I have fix problem of partial picking wizard generate wrong invoice.

Thanks!
pja

To post a comment you must log in.
7896. By Jalpesh Patel(OpenERP)

[IMP]improve code

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

The code of this merge proposal works well. It fixes the bug n°1060259. Let's merge it !

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

I was wrong in my previous comment, the code of this merge proposal doesn't work. I explained it in more details on the original bug report, see https://bugs.launchpad.net/openobject-addons/+bug/1060259

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello,

As mentioned by Alexis, the proposed patch dit not work.
Instead I have made similar code but testing the state of the picking as well. This was merged in 7.0

revno: 9540 [merge]
revision-id: <email address hidden>

Unmerged revisions

7896. By Jalpesh Patel(OpenERP)

[IMP]improve code

7895. By gustavoe-cordero

[FIX] fix problem of partial picking wizard generate wrong invoice

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock_invoice_directly/wizard/stock_invoice.py'
2--- stock_invoice_directly/wizard/stock_invoice.py 2012-03-05 18:40:03 +0000
3+++ stock_invoice_directly/wizard/stock_invoice.py 2012-11-09 09:44:58 +0000
4@@ -31,8 +31,13 @@
5 if context is None: context = {}
6 result = super(invoice_directly, self).do_partial(cr, uid, ids, context)
7 partial = self.browse(cr, uid, ids[0], context)
8- context.update(active_model='stock.picking',
9- active_ids=[partial.picking_id.id])
10+ active_ids = partial.picking_id.backorder_id.id
11+ if active_ids:
12+ context.update(active_model='stock.picking',
13+ active_ids=[active_ids])
14+ else:
15+ context.update(active_model='stock.picking',
16+ active_ids=[partial.picking_id.id])
17 if partial.picking_id.invoice_state == '2binvoiced':
18 return {
19 'name': 'Create Invoice',

Subscribers

People subscribed via source and target branches

to all changes: