From 03142cbbe996c66b222efde6ed4e8cc8cf779056 Mon Sep 17 00:00:00 2001 From: Nimesh Jethva Date: Fri, 13 Jul 2018 17:04:35 +0200 Subject: [PATCH] [REM] website_quote: remove unnecessary and unused template and settings Website quote gave the possibility to define an email template to use when sending a quotation / sale order by email. This was done at a time where doing correct templates in sale was difficult to do / implement. Now send by email template is completely inside sale module and should cover all use cases. Having a settings to customize it is not considered as necessary as it can be customized easily. This commit is linked to task ID 1843171 (and 1868112) and to PR #25293 (and #25889). --- .../website_quote/data/website_quote_data.xml | 57 ------------------- .../models/res_config_settings.py | 10 ---- .../views/res_config_settings_views.xml | 13 ----- 3 files changed, 80 deletions(-) diff --git a/addons/website_quote/data/website_quote_data.xml b/addons/website_quote/data/website_quote_data.xml index b75d364cf95..7ed587e5167 100644 --- a/addons/website_quote/data/website_quote_data.xml +++ b/addons/website_quote/data/website_quote_data.xml @@ -91,62 +91,5 @@ - - - Online Quote: confirmation e-mail - ${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe} - Your order ${object.name} is confirmed - ${ctx.get('email_to') or object.partner_id.email} - - - - - - -
- ${user.company_id.name} -
- - - - -
-
-
-
-
- -
- - - - - - -
-

Dear ${object.partner_id.name},


-

Your order ${object.name} has been validated!


- - % if object.partner_id.user_ids -

You can view your quotes, sales orders and invoices online by going to our Online Portal.


- % endif - -

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


-

Thank you for choosing ${object.company_id.name or "us"}!

-
- % if user.signature -

${user.signature | safe} -

- % endif -

Sent by - - ${user.company_id.name} - using Odoo -

-
-
]]>
-
- diff --git a/addons/website_sale/models/res_config_settings.py b/addons/website_sale/models/res_config_settings.py index 287b21450ab..ec0fdf666e3 100644 --- a/addons/website_sale/models/res_config_settings.py +++ b/addons/website_sale/models/res_config_settings.py @@ -8,12 +8,6 @@ from odoo import api, models, fields class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' - def _default_order_mail_template(self): - if self.env['ir.module.module'].search([('name', '=', 'website_quote')]).state in ('installed', 'to upgrade'): - return self.env.ref('website_quote.confirmation_mail').id - else: - return self.env.ref('sale.email_template_edi_sale').id - def _default_recovery_mail_template(self): try: return self.env.ref('website_sale.mail_template_sale_cart_recovery').id @@ -40,10 +34,6 @@ class ResConfigSettings(models.TransientModel): module_account_invoicing = fields.Boolean("Invoicing") - order_mail_template = fields.Many2one('mail.template', string='Order Confirmation Email', - default=_default_order_mail_template, domain="[('model', '=', 'sale.order')]", - help="Email sent to customer at the end of the checkout process", readonly=True) - automatic_invoice = fields.Boolean("Automatic Invoice", help="The invoice is generated automatically and available in the customer portal " "when the transaction is confirmed by the payment acquirer.\n" diff --git a/addons/website_sale/views/res_config_settings_views.xml b/addons/website_sale/views/res_config_settings_views.xml index fff2b3b6014..6403dd3b3c6 100644 --- a/addons/website_sale/views/res_config_settings_views.xml +++ b/addons/website_sale/views/res_config_settings_views.xml @@ -348,19 +348,6 @@

Orders

-
-
- Confirmation Email -
- Email sent to the customer after the checkout -
-
-
- -
-
-
-