Merge lp:~openerp-dev/openobject-addons/6.1-opw-578473-han into lp:openobject-addons/6.1

Proposed by Hardik Ansodariya (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6967
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-578473-han
Merge into: lp:openobject-addons/6.1
Diff against target: 41 lines (+8/-2)
2 files modified
mrp_repair/mrp_repair_view.xml (+1/-1)
mrp_repair/wizard/make_invoice.py (+7/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-578473-han
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+122514@code.launchpad.net

Description of the change

Hello,

Fixed the issue of wrong invoice view from mrp_repair.

With reference of Maintenance case: 578473

Kindly review it.

Thanks,

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-578473-port-mma/+merge/135108 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6967. By Hardik Ansodariya (OpenERP)

[FIX] mrp_repair: Wrong view open when generate invoice from mrp_repair (Maintanace case:578473)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp_repair/mrp_repair_view.xml'
2--- mrp_repair/mrp_repair_view.xml 2011-12-13 07:28:24 +0000
3+++ mrp_repair/mrp_repair_view.xml 2012-09-03 13:27:20 +0000
4@@ -158,7 +158,7 @@
5 </field>
6 </page>
7 <page string="Extra Info" groups="base.group_extended">
8- <field name="invoice_id"/>
9+ <field name="invoice_id" context="{'form_view_ref': 'account.invoice_form'}"/>
10 <field name="picking_id"/>
11 <field name="location_id"/>
12 <field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
13
14=== modified file 'mrp_repair/wizard/make_invoice.py'
15--- mrp_repair/wizard/make_invoice.py 2012-01-31 13:36:57 +0000
16+++ mrp_repair/wizard/make_invoice.py 2012-09-03 13:27:20 +0000
17@@ -53,6 +53,12 @@
18 for repair_id in context['active_ids']:
19 wf_service.trg_validate(uid, 'mrp.repair', repair_id, 'action_invoice_create', cr)
20
21+ mod_obj = self.pool.get('ir.model.data')
22+ form_res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form')
23+ form_id = form_res and form_res[1] or False
24+ tree_res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_tree')
25+ tree_id = tree_res and tree_res[1] or False
26+
27 return {
28 'domain': [('id','in', newinv.values())],
29 'name': 'Invoices',
30@@ -60,10 +66,10 @@
31 'view_mode': 'tree,form',
32 'res_model': 'account.invoice',
33 'view_id': False,
34+ 'views': [(tree_id, 'tree'),(form_id, 'form')],
35 'context': "{'type':'out_invoice'}",
36 'type': 'ir.actions.act_window'
37 }
38-
39 make_invoice()
40
41 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: