diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index 5fafa1f4b1a..edfded48915 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -131,6 +131,125 @@ If you have any question, do not hesitate to contact us. Thank you! +-- +${object.validator.name} ${object.validator.user_email and '<%s>'%(object.validator.user_email) or ''} +${object.company_id.name} +% if object.company_id.street: +${object.company_id.street or ''} +% endif +% if object.company_id.street2: +${object.company_id.street2} +% endif +% if object.company_id.city or object.company_id.zip: +${object.company_id.zip or ''} ${object.company_id.city or ''} +% endif +% if object.company_id.country_id: +${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''} +% endif +% if object.company_id.phone: +Phone: ${object.company_id.phone} +% endif +% if object.company_id.website: +${object.company_id.website or ''} +% endif + ]]> + + + + Automated Quataion Request Notification Mail + ${object.validator.user_email or ''} + ${object.company_id.name} Order (Ref ${object.name or 'n/a' }) + ${object.partner_id.email} + + + + +

Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},

+ +

Here is a request for quotation from ${object.company_id.name}:

+ +

+   REFERENCES
+   Order number: ${object.name}
+   Order total: ${object.amount_total} ${object.pricelist_id.currency_id.name}
+   Order date: ${object.date_order}
+ % if object.origin: +   Order reference: ${object.origin}
+ % endif + % if object.partner_ref: +   Your reference: ${object.partner_ref}
+ % endif +   Your contact: ${object.validator.name} +

+ +

+ You can view the request for quotation and download it using the following link: +

+ View Order + +
+

If you have any question, do not hesitate to contact us.

+

Thank you!

+
+
+
+

+ ${object.company_id.name}

+
+
+ + % if object.company_id.street: + ${object.company_id.street}
+ % endif + % if object.company_id.street2: + ${object.company_id.street2}
+ % endif + % if object.company_id.city or object.company_id.zip: + ${object.company_id.zip} ${object.company_id.city}
+ % endif + % if object.company_id.country_id: + ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}
+ % endif +
+ % if object.company_id.phone: +
+ Phone:  ${object.company_id.phone} +
+ % endif + % if object.company_id.website: + + %endif +

+
+ + ]]>
+ + % endif + | Your contact: ${object.validator.name} ${object.validator.user_email and '<%s>'%(object.validator.user_email) or ''} + +You can view the quotation and download it using the following link: + ${ctx.get('edi_web_url_view') or 'n/a'} + +If you have any question, do not hesitate to contact us. + +Thank you! + + -- ${object.validator.name} ${object.validator.user_email and '<%s>'%(object.validator.user_email) or ''} ${object.company_id.name} diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 03d02473df8..6e92d1f9e4e 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -334,7 +334,10 @@ class purchase_order(osv.osv): def wkf_send_rfq(self, cr, uid, ids, context=None): mod_obj = self.pool.get('ir.model.data') - template = mod_obj.get_object_reference(cr, uid, 'purchase', 'email_template_edi_purchase') + if context.get('send_rfq', False): + template = mod_obj.get_object_reference(cr, uid, 'purchase', 'email_template_edi_purchase_quatation') + else: + template = mod_obj.get_object_reference(cr, uid, 'purchase', 'email_template_edi_purchase') 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 diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index ff0003947bb..a9d55923ef4 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -132,11 +132,12 @@
-