Merge lp:~syleam/openobject-addons/6.1-bug-1041171-mrp_repair_invoice into lp:openobject-addons/6.1

Proposed by Christophe CHAUVET
Status: Needs review
Proposed branch: lp:~syleam/openobject-addons/6.1-bug-1041171-mrp_repair_invoice
Merge into: lp:openobject-addons/6.1
Diff against target: 26 lines (+9/-3)
1 file modified
mrp_repair/wizard/make_invoice.py (+9/-3)
To merge this branch: bzr merge lp:~syleam/openobject-addons/6.1-bug-1041171-mrp_repair_invoice
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+121179@code.launchpad.net

Description of the change

Fix wrong view when invoice generated from the repair order

To post a comment you must log in.

Unmerged revisions

6961. By Christophe CHAUVET

[FIX] Wrong view opened when invoice generated from repair order

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mrp_repair/wizard/make_invoice.py'
--- mrp_repair/wizard/make_invoice.py 2012-01-31 13:36:57 +0000
+++ mrp_repair/wizard/make_invoice.py 2012-08-24 13:16:57 +0000
@@ -53,13 +53,19 @@
53 for repair_id in context['active_ids']:53 for repair_id in context['active_ids']:
54 wf_service.trg_validate(uid, 'mrp.repair', repair_id, 'action_invoice_create', cr)54 wf_service.trg_validate(uid, 'mrp.repair', repair_id, 'action_invoice_create', cr)
5555
56 model_obj = self.pool.get('ir.model.data')
57 account_invoice_form_id = model_obj.get_object_reference(cr, uid, 'account', 'invoice_form')[1]
58 account_invoice_tree_id = model_obj.get_object_reference(cr, uid, 'account', 'invoice_tree')[1]
59
56 return {60 return {
57 'domain': [('id','in', newinv.values())],61 'domain': [('id', 'in', newinv.values())],
58 'name': 'Invoices',62 'name': 'Repair Invoices',
59 'view_type': 'form',63 'view_type': 'form',
60 'view_mode': 'tree,form',64 'view_mode': 'form,tree',
61 'res_model': 'account.invoice',65 'res_model': 'account.invoice',
62 'view_id': False,66 'view_id': False,
67 'views': [(account_invoice_tree_id, 'tree'), (account_invoice_form_id, 'form')],
68 'target': 'current',
63 'context': "{'type':'out_invoice'}",69 'context': "{'type':'out_invoice'}",
64 'type': 'ir.actions.act_window'70 'type': 'ir.actions.act_window'
65 }71 }