projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c04b044
)
[IMP] website_crm: allow the response from crm thanks page to be overridable
author
Jeremy Kersten
<jke@odoo.com>
Mon, 6 Oct 2014 12:34:29 +0000
(14:34 +0200)
committer
Jeremy Kersten
<jke@odoo.com>
Mon, 6 Oct 2014 12:34:29 +0000
(14:34 +0200)
addons/website_crm/controllers/main.py
patch
|
blob
|
history
diff --git
a/addons/website_crm/controllers/main.py
b/addons/website_crm/controllers/main.py
index
76c4af7
..
cffc0d8
100644
(file)
--- a/
addons/website_crm/controllers/main.py
+++ b/
addons/website_crm/controllers/main.py
@@
-39,6
+39,10
@@
class contactus(http.Controller):
'_kwargs': kwargs,
}
'_kwargs': kwargs,
}
+ def get_contactus_response(self, values, kwargs):
+ values = self.preRenderThanks(request, values, kwargs)
+ return request.website.render(kwargs.get("view_callback", "website_crm.contactus_thanks"), values)
+
@http.route(['/crm/contactus'], type='http', auth="public", website=True)
def contactus(self, **kwargs):
def dict_to_str(title, dictvar):
@http.route(['/crm/contactus'], type='http', auth="public", website=True)
def contactus(self, **kwargs):
def dict_to_str(title, dictvar):
@@
-106,5
+110,4
@@
class contactus(http.Controller):
}
request.registry['ir.attachment'].create(request.cr, SUPERUSER_ID, attachment_value, context=request.context)
}
request.registry['ir.attachment'].create(request.cr, SUPERUSER_ID, attachment_value, context=request.context)
- values = self.preRenderThanks(request, values, kwargs)
- return request.website.render(kwargs.get("view_callback", "website_crm.contactus_thanks"), values)
+ return self.get_contactus_response(values, kwargs)