Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1049557-mdi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1049557 in OpenERP Addons: "'Send by Email' in Customer Invoice and 
'Send RFQ' in Purchase Order does not open with default template."
  https://bugs.launchpad.net/openobject-addons/+bug/1049557

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1049557-mdi/+merge/123924

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/1049557 
"
'Send by Email' in Customer Invoice and 'Send RFQ' in Purchase Order does not 
open with default template."

Thanks,
Divyesh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1049557-mdi/+merge/123924
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1049557-mdi.
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py	2012-09-11 13:17:08 +0000
+++ account/account_invoice.py	2012-09-12 10:33:30 +0000
@@ -395,8 +395,12 @@
         template_id = template and template[1] or False
         res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
         res_id = res and res[1] or False
-        ctx = dict(context, active_model='account.invoice', active_id=ids[0])
-        ctx.update({'mail.compose.template_id': template_id})
+        ctx = dict(context, 
+                default_model = 'account.invoice', 
+                default_res_id = ids and ids[0] or False, 
+                default_use_template = True, 
+                default_template_id = template_id,
+                )
         return {
                 'view_type': 'form',
                 'view_mode': 'form',

=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2012-09-04 09:28:20 +0000
+++ purchase/purchase.py	2012-09-12 10:33:30 +0000
@@ -347,13 +347,17 @@
         template_id = template and template[1] or False
         res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
         res_id = res and res[1] or False
-        ctx = dict(context, active_model='purchase.order', active_id=ids[0])
-        ctx.update({'mail.compose.template_id': template_id})
+        ctx = dict(context, 
+                default_model = 'purchase.order', 
+                default_res_id = ids and ids[0] or False, 
+                default_use_template = True, 
+                default_template_id = template_id,
+                )
         return {
             'view_type': 'form',
             'view_mode': 'form',
             'res_model': 'mail.compose.message',
-            'views': [(res_id,'form')],
+            'views': [(res_id, 'form')],
             'view_id': res_id,
             'type': 'ir.actions.act_window',
             'target': 'new',

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to