Merge lp:~openerp-dev/openobject-addons/trunk-opw-576212-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-576212-port-mma
Merge into: lp:openobject-addons
Diff against target: 22 lines (+8/-3)
1 file modified
stock_invoice_directly/wizard/stock_invoice.py (+8/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-576212-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+137148@code.launchpad.net

Description of the change

Hello,

Steps to Reproduce the issue:-

=>. Install stock_invoice_directly module.

=>. Create a Purchase Order with a product: say for example "Product1" or else with quantity=10.
    Invoice Policy: Based on receptions
    So shipment is created.

=>. Go Incoming Shipments, Receive 3 product and create invoice.
    Invoice will be created with quantity 7 ( which is unreceived quantity ).

=>. Expected:= Invoice will be created with 3 quantity ( which is received )

=> Code is forward port from 6.1

Thanks,
Mayur

To post a comment you must log in.
8158. By Mayur Maheshwari(OpenERP)

[IMP]stock_invoice_directly: optimize some code

Unmerged revisions

8158. By Mayur Maheshwari(OpenERP)

[IMP]stock_invoice_directly: optimize some code

8157. By Jagdish Panchal (Open ERP)

[FIX]stock_invoice_directly: Fix the issue wrong quantity when invoice created from incoming shipment

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-12-03 06:39:21 +0000
4@@ -29,10 +29,15 @@
5 after processing the partial picking.
6 """
7 if context is None: context = {}
8- result = super(invoice_directly, self).do_partial(cr, uid, ids, context)
9+ result = super(invoice_directly, self).do_partial(cr, uid, ids, context=context)
10 partial = self.browse(cr, uid, ids[0], context)
11- context.update(active_model='stock.picking',
12- active_ids=[partial.picking_id.id])
13+ context.update(active_model='stock.picking',active_ids=[partial.picking_id.id],active_id=partial.picking_id.id)
14+
15+ if partial.picking_id.backorder_id.id:
16+ if partial.picking_id.backorder_id.invoice_state != 'done' and partial.picking_id.state !='done':
17+ context.update(active_model='stock.picking',
18+ active_ids=[partial.picking_id.backorder_id.id], active_id=partial.picking_id.backorder_id.id)
19+
20 if partial.picking_id.invoice_state == '2binvoiced':
21 return {
22 'name': 'Create Invoice',

Subscribers

People subscribed via source and target branches

to all changes: