[FIX] website_crm: correct thank page
bzr revid: chs@openerp.com-20130702215446-vn5xj3bmxd8ag9fb
This commit is contained in:
@@ -5,6 +5,7 @@ from openerp.addons.web import http
|
||||
from openerp.addons.web.http import request
|
||||
from openerp.addons.website.controllers.main import template_values
|
||||
|
||||
from urllib import quote_plus
|
||||
|
||||
class contactus(http.Controller):
|
||||
|
||||
@@ -14,7 +15,13 @@ class contactus(http.Controller):
|
||||
uid = request.session._uid or openerp.SUPERUSER_ID
|
||||
post['user_id'] = False
|
||||
request.registry['crm.lead'].create(cr, uid, post)
|
||||
html = request.registry.get("ir.ui.view").render(cr, uid, "website_crm.thanks", template_values())
|
||||
values = template_values()
|
||||
company = request.registry['res.company'].browse(request.cr, uid, 1)
|
||||
values.update({
|
||||
'res_company': company,
|
||||
'google_map_url': "http://maps.googleapis.com/maps/api/staticmap?center=%s&sensor=false&zoom=8&size=298x298" % quote_plus('%s, %s %s, %s' % (company.street, company.city, company.zip, company.country_id and company.country_id.name_get()[0][1] or ''))
|
||||
})
|
||||
html = request.registry.get("ir.ui.view").render(cr, uid, "website_crm.thanks", values)
|
||||
return html
|
||||
|
||||
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -24,24 +24,10 @@
|
||||
<field name="type">qweb</field>
|
||||
<field name="arch" type="xml">
|
||||
<t t-call="website.layout">
|
||||
<t t-set="title">Contact us - <t t-esc="res_company.name"/></t>
|
||||
<t t-set="title">Thank You!</t>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span8">
|
||||
<h1>Thanks for your message</h1>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<address>
|
||||
<strong t-esc="res_company.name">Name</strong><br/>
|
||||
<t t-esc="res_company.street"/><br/>
|
||||
<t t-esc="res_company.city"/>, <t t-esc="res_company.zip"/><br/>
|
||||
<t t-esc="res_company.country_id and res_company.country_id.name_get()[0][1]"/><br/>
|
||||
<br/>
|
||||
&#x2706; <t t-esc="res_company.phone"/><br/>
|
||||
<i class="icon-envelope"></i> <t t-esc="res_company.email"/>
|
||||
</address>
|
||||
<img t-att-src="google_map_url"/>
|
||||
</div>
|
||||
<div class="oe_row">
|
||||
<h2 class="oe_slogan">Thanks for your message.</h2>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user