<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="support_ticket_survey" model="mail.template">
        <field name="name">Support Ticket Survey</field>
        <field name="model_id" ref="model_website_support_ticket"></field>
        <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
        <field name="email_to">${object.email|safe}</field>
        <field name="subject">Support Ticket Survey (#${object.ticket_number or object.id})</field>
        <field name="auto_delete" eval="False"/>
        <field name="built_in" eval="True"/>
        <field name="body_html"><![CDATA[
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="format-detection" content="telephone=no"/>
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
        <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>

        <div style="background-color: #2865a8;padding-top: 70px;">
            <div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
                <div style="margin: 0 auto; width:200px;">
                    <img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
                </div>
                <div style="overflow:auto;">
                    <p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
                </div>
                <div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
                    <p>New Support Ticket for category</p>
                </div>
                <div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
            </div>
        </div>

        <div style="background-color:#eeeeee;">

            <div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
                <div style="padding-bottom: 20px;">
                    <div>
                        <div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">

                            % if object.person_name :
                                <p>Dear ${object.person_name},</p>
                            % endif
                            <p>We would like to get your feedback on the support</p>
                            <p><a href="/support/survey/${object.portal_access_key}">here</a></p>
                            <hr/>
                            <b>Ticket Number:</b> ${object.ticket_number or object.id}<br/>
                            <b>Ticket Category:</b>
                            % if object.category_id.name :
                                ${object.category_id.name}
                            % endif
                            <br/>
                            <b>Ticket Description:</b><br/>
                            ${object.description|safe}
                            <br/><br/>
                            Best regards.
                        </div>

                        <div style="clear: both;"></div>
                    </div>
                </div>
            </div>
            <div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
                <p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
            </div>
        </div>
        ]]>
        </field>
    </record>

        <record id="support_ticket_sla_alert" model="mail.template">
            <field name="name">Support Ticket SLA Alert</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
            <field name="subject">SLA Alert</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
                <p>Dear _user_name_,</p>
                %if object.sla_timer > 0:
                    <p>You have ${object.sla_timer_format} hours remaining for this ticket</p>
                %endif
                %if object.sla_timer < 0:
                    <p>The SLA is currently ${object.sla_timer_format} hours overdue</p>
                %endif
                <p>Person Name: ${object.person_name}</p>
                <p>Category: ${object.category_id.name}</p>
                <p>Subject: ${object.subject}</p>
                <p>${object.description|safe}</p>
				<br/><br/>
				Best regards.
            ]]>
            </field>
        </record>
        
        <record id="new_support_ticket_category" model="mail.template">
            <field name="name">Support Ticket New Ticket (Category)</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
            <field name="subject">New Support Ticket for your category</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>New Support Ticket for category</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">
				
									<p>Dear _user_name_,</p>
									<p>A new support ticket has been created in a category that you follow</p>
									<p>Person Name: ${object.person_name}</p>
									<p>Category: ${object.category_id.name}</p>
									<p>Subject: ${object.subject}</p>
									<p>${object.description|safe}</p>
									<p>Click <a href="_ticket_url_">here</a> to view this support ticket online</p>
									<br/><br/>
									Best regards.
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>

            ]]>
            </field>
        </record>

        <record id="support_ticket_user_change" model="mail.template">
            <field name="name">Support Ticket User Change</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>            
            <field name="subject">A Support Ticket has been assigned to you</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>Tickets assignment.</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">

									<p>Dear _user_name_,</p>
									<p>A support ticket has been assigned to you here are the details</p>
									<hr/>
									<b>Ticket Number:</b> ${object.ticket_number or object.id}<br/>
									<b>Ticket Category:</b> 
									% if object.category_id.name :
										${object.category_id.name}
									% endif
									<br/>
									<b>Ticket Description:</b><br/>
									${object.description|safe}
									<br/><br/>
									Best regards.
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>
                
            ]]>
            </field>
        </record>

        <record id="new_support_ticket_category_change" model="mail.template">
            <field name="name">Support Ticket Category Change</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>            
            <field name="email_to">${object.email|safe}</field>
            <field name="subject">Your support ticket has been updated</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>Ticket updated.</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">

									<p>Dear ${object.person_name},</p>
									<p>Your support ticket has been updated and is now in the category '${object.category_id.name}' </p>
									<hr/>
									<b>Ticket Number:</b> ${object.ticket_number or object.id}<br/>
									<b>Ticket Category:</b> 
									% if object.category_id.name :
										${object.category_id.name}
									% endif
									<br/>
									<b>Ticket Description:</b><br/>
									${object.description|safe}
									<br/><br/>
									Best regards.
					
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>
            ]]>
            </field>
        </record>

        <record id="support_ticket_closed" model="mail.template">
            <field name="name">Support Ticket Closed</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
            <field name="email_to">${object.email|safe}</field>
            <field name="subject">Your support ticket has been closed</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>Support Ticket Closed</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">

									<p>Dear ${object.person_name},</p>
									<p>Your support ticket has been closed by our staff, here is the final comment</p>
									<p>${object.close_comment|safe}</p>
									<hr/>
									<b>Ticket Number:</b> ${object.ticket_number or object.id}<br/>
									<b>Ticket Category:</b> 
									% if object.category_id.name :
										${object.category_id.name}
									% endif
									<br/>
									<b>Ticket Description:</b><br/>
									${object.description|safe}
									<br/><br/>
									Best regards.
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>
            ]]>
            </field>
        </record>

        <record id="support_ticket_new" model="mail.template">
            <field name="name">Support Ticket New</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
            <field name="email_to">${object.email|safe}</field>
            <field name="subject">We have received your support ticket '${object.subject}' and will get back to you shortly</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
                % set category = False
                % if object.category_id:
                    % set category = object.env['website.support.ticket.category'].search([('id', '=', object.category_id.id)], limit=1)
                % endif

				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>New Support Ticket</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">

									% if object.person_name :
										<p>Dear ${object.person_name},</p>
									% endif
									<p>Thank you for submitting a support ticket to us, we will get back to you shortly.</p>

									<b>View Ticket Online:</b> <a href="/support/portal/ticket/view/${object.portal_access_key}">here</a><br/>
									<b>Ticket Number:</b> ${object.ticket_number or object.id}<br/>
									<b>Ticket Category:</b> 
										${category.name or ''}
									<br/>
									% if object.category_id and object.sla_id:
										<b>SLA:</b> 
										${object.sla_id.name}
									% endif
									<br/>                
									<b>Ticket Description:</b><br/>
									${object.description|safe}
									<br/><br/>
									Best regards.
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>
									
            ]]>
            </field>
        </record>

        <record id="support_ticket_customer_reply_wrapper" model="mail.template">
            <field name="name">Support Ticket Customer Reply Wrapper</field>
            <field name="email_from"><![CDATA[${object.ticket_id.company_id.name} <${object.ticket_id.company_id.email}>]]></field>
            <field name="reply_to">SendReplyViaSystem@example.com</field>
            <field name="model_id" ref="model_website_support_ticket_message"></field>
            <field name="subject">Ticket: ${object.ticket_id.subject}</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>Support Ticket Customer Reply</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">

									${object.content|safe}
									<hr/>
									<b>Ticket Number:</b> ${object.ticket_id.ticket_number or object.ticket_id.id}<br/>
									<b>Ticket Category:</b> ${object.ticket_id.category_id.name or ''}<br/>
									% if object.ticket_id.planned_time_format :
										<b>Planned Date:</b> ${object.ticket_id.planned_time_format}<br/>
									% endif
									<b>Ticket Description:</b><br/>
									${object.ticket_id.description|safe}
									<br/><br/>
									Best regards.
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>
            ]]>
            </field>
        </record>

        <record id="support_ticket_reply_wrapper" model="mail.template">
            <field name="name">Support Ticket Reply Wrapper</field>
            <field name="model_id" ref="model_website_support_ticket_compose"></field>
            <field name="subject">Ticket: ${object.subject}</field>
            <field name="email_from"><![CDATA[${object.ticket_id.company_id.name} <${object.ticket_id.company_id.email}>]]></field>            
            <field name="email_to">${object.email|safe}</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>Support Ticket Reply</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">
									${object.body|safe}
									<hr/>
									% if object.ticket_id.portal_access_key :
										<b>View Ticket Online:</b> <a href="/support/portal/ticket/view/${object.ticket_id.portal_access_key}">here</a><br/>
									% endif
									<b>Ticket Number:</b> ${object.ticket_id.ticket_number or object.ticket_id.id}<br/>
									<b>Ticket Category:</b> ${object.ticket_id.category_id.name or ''}<br/>
									% if object.ticket_id.planned_time_format :
										<b>Planned Date:</b> ${object.ticket_id.planned_time_format}<br/>
									% endif
									<b>Ticket Description:</b><br/>
									${object.ticket_id.description|safe}
									<br/><br/>
									Best regards.
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>
            ]]>
            </field>
        </record>

        <record id="support_ticket_reply_wrapper_user" model="mail.template">
            <field name="name">Support Ticket Reply Wrapper (User)</field>
            <field name="model_id" ref="model_website_support_ticket_compose"></field>
            <field name="subject">Ticket: ${object.subject}</field>
            <field name="email_from">${user.email|safe}</field>            
            <field name="email_to">${object.email|safe}</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
				<meta name="format-detection" content="telephone=no"/>
				<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/>
				<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"/>			
				
				<div style="background-color: #2865a8;padding-top: 70px;">
					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 15px 20px;border: 1px solid #eeeeee;padding: 20px 30px 25px 30px;border-left: 1px solid #2865a8;border-right: 1px solid #2865a8;">
						<div style="margin: 0 auto; width:200px;">
							<img src="/prime_helpdesk/static/src/img/logo_cmrgs.png" style="width:200px;" />
						</div>
						<div style="overflow:auto;">
							<p style="display: inline;vertical-align: middle;font-weight: bold;color: #8f8f8f;font-size: 25px;">${object.create_uid.company_id.name}</p>
						</div>
						<div style="font-weight: bold;color: #282f33;word-break: break-all;margin: 10px auto;">
							<p>Support Ticket Reply</p>
						</div>
						<div style="color: #8f8f8f;margin-top: 15px;font-size: 12px;">${datetime.datetime.today().date().strftime('%d-%m-%Y')}</div>
					</div>
				</div>

				<div style="background-color:#eeeeee;">

					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding:5px 30px 30px 30px;padding-bottom:0;">
						<div style="padding-bottom: 20px;">
							<div>
								<div style="overflow: auto;margin-bottom: 10px;padding-bottom: 10px;border-bottom: 1px solid #eeeeee;font-size: 15px;color: #282f33;">
									
									${object.body|safe}
									<hr/>
									% if object.ticket_id.portal_access_key :
										<b>View Ticket Online:</b> <a href="/support/portal/ticket/view/${object.ticket_id.portal_access_key}">here</a><br/>
									% endif
									<b>Ticket Number:</b> ${object.ticket_id.ticket_number or object.ticket_id.id}<br/>
									<b>Ticket Category:</b> ${object.ticket_id.category_id.name or ''}<br/>
									% if object.ticket_id.planned_time_format :
										<b>Planned Date:</b> ${object.ticket_id.planned_time_format}<br/>
									% endif
									<b>Ticket Description:</b><br/>
									${object.ticket_id.description|safe}
									<br/><br/>
									Best regards.
								</div>
								
								<div style="clear: both;"></div>
							</div>
						</div>
					</div>


					<div style="max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;max-width: 750px;margin: 0 auto;border: 1px solid #eeeeee;border-top: 0;background-color: #ffffff;padding: 25px 30px 30px 30px;background-color: #eeeeee;color: #8f8f8f;text-align: center;font-size: 20px;">
						<p style="font-weight:bold;">Município de Ribeira Grande de Santiago</p>
					</div>
				</div>
            ]]>
            </field>
        </record>

        <record id="support_ticket_approval" model="mail.template">
            <field name="name">Support Ticket Approval</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
            <field name="email_to">${object.email|safe}</field>
            <field name="subject">Support Ticket Approval (#${object.ticket_number or object.id})</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
                % if object.person_name :
                    <p>Dear ${object.person_name},</p>
                    <br/>
                % endif

                <p>Approval is required before we can proceed with this support request, please click the link below to accept</p>
                <br/>
                <p><a href="${object.approve_url}" style="color:green">Approve</a> | <a href="${object.disapprove_url}" style="color:red">Don't Approve</a></p>

				<br/><br/>
				Best regards.
            ]]>
            </field>
        </record>

        <record id="support_ticket_approval_user" model="mail.template">
            <field name="name">Support Ticket Approval (User)</field>
            <field name="model_id" ref="model_website_support_ticket"></field>
            <field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
            <field name="email_to">${object.email|safe}</field>
            <field name="subject">Support Ticket Approval (#${object.ticket_number or object.id})</field>
            <field name="auto_delete" eval="False"/>
            <field name="built_in" eval="True"/>
            <field name="body_html"><![CDATA[
                <p>Dear _user_name_,</p>
                <p>A support ticket approval rating has changed</p>
                <p>Person Name: ${object.person_name}</p>
                <p>Category: ${object.category_id.name}</p>
                <p>Subject: ${object.subject}</p>
                <p>Approval: ${object.approval_id.name}</p>
                <p>${object.description|safe}</p>
                <p>Click <a href="_ticket_url_">here</a> to view this support ticket online</p>
				<br/><br/>
				Best regards.
            ]]>
            </field>
        </record>

</odoo>