Skip to content
Snippets Groups Projects
Commit 03142cbb authored by Nimesh Jethva's avatar Nimesh Jethva Committed by Thibault Delavallée
Browse files

[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).
parent 8508c7c3
No related branches found
No related tags found
No related merge requests found
......@@ -91,62 +91,5 @@
</section>
</field>
</record>
<record id="confirmation_mail" model="mail.template">
<field name="name">Online Quote: confirmation e-mail</field>
<field name="email_from">${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe}</field>
<field name="subject">Your order ${object.name} is confirmed</field>
<field name="email_to">${ctx.get('email_to') or object.partner_id.email}</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="body_html"><![CDATA[
<div summary="o_mail_template" style="padding:0px; width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
<table cellspacing="0" cellpadding="0" style="width:600px; border-collapse:collapse; background:inherit; color:inherit">
<tbody><tr>
<td valign="center" width="200" style="padding:0px 10px 5px 5px;font-size: 12px">
<img src="/logo.png" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${user.company_id.name}">
</td>
</tr></tbody>
</table>
<table cellspacing="0" cellpadding="0" style="width:600px; border-collapse:collapse; background:inherit; color:inherit">
<tbody><tr>
<td valign="top" style="width:600px; padding:0px 10px 5px 5px;">
<div>
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0;margin:15px auto;padding:0">
</div>
</td>
</tr></tbody>
</table>
</div>
<div style="padding:0px; width:600px; max-width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
<table cellspacing="0" cellpadding="0" style="width:600px ;text-align:justify; margin:0 auto; border-collapse:collapse; background:inherit; color:inherit">
<tbody><tr>
<td style="padding:0px 10px 5px 5px;font-size: 14px;">
<p>Dear ${object.partner_id.name},</p><br/>
<p>Your order <a href="/quote/${object.id}/${object.access_token}">${object.name}</a> has been validated!</p><br/>
% if object.partner_id.user_ids
<p>You can view your quotes, sales orders and invoices online by going to our <a style="text-decoration:none; color: #875A7B;" href="/my/home">Online Portal</a>.</p><br/>
% endif
<p>If you have any question, do not hesitate to contact us.</p><br/>
<p>Thank you for choosing ${object.company_id.name or "us"}!</p>
</td>
</tr><tr>
<td style="padding:0px 10px 5px 5px;font-size: 14px;">
% if user.signature
<p style="font-size: 14px;">${user.signature | safe}
</p>
% endif
<p style="font-size: 11px;"><strong>Sent by
<a href="${user.company_id.website}" style="text-decoration:none; color: #875A7B;">
<strong>${user.company_id.name}</strong>
</a> using <a href="www.odoo.com" style="text-decoration:none; color: #875A7B;"><strong>Odoo</strong></a>
</strong></p>
</td>
</tr></tbody>
</table>
</div>]]></field>
</record>
</data>
</odoo>
......@@ -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"
......
......@@ -348,19 +348,6 @@
<h2>Orders</h2>
<div class="row mt16 o_settings_container" id="sale_checkout_settings">
<div class="col-xs-12 col-md-6 o_setting_box" id="checkout_mail_setting">
<div class="o_setting_right_pane">
<span class="o_form_label">Confirmation Email</span>
<div class="text-muted">
Email sent to the customer after the checkout
</div>
<div class="content-group">
<div class="mt16">
<field name="order_mail_template" class="oe_inline"/>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box" id="abandoned_carts_setting" title="Send a recovery email to authenticated shoppers">
<div class="o_setting_left_pane"/>
<div class="o_setting_right_pane">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment