Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

4

How do I create additional forms with website builder?

By
Harold Poku
on 7/20/14, 10:22 AM 10,491 views

Odoo v8 website builder comes with a simple contact us form. What is the procedure to add additonal forms such as an online registration form with fields for uploading attachments?
 

3

Fabien Pinckaers (fp)

--Fabien Pinckaers (fp)--
6598
| 6 8 8
fsdsdfsdf, Belgium
--Fabien Pinckaers (fp)--

Odoo Founder & CEO

Fabien Pinckaers (fp)
On 7/20/14, 1:00 PM

There is no form builder in version 8 yet. But you can create forms by copy/pasting the HTML code of the contact us page. Change the HTML code of the contact form and it will work.

You can even add any field in the HTML contact form and it will be integrated in your leads. (even binary fields, that will create attached documents to the lead).

ok i have copy/pasted all the required field and create desired form i want to integrated it with HR employee as employee registration form .. does odoo give us that provision and save data of employee or create employee profile ????

mihir shah
on 3/13/15, 12:03 PM
1
Brandon Bazemore
On 5/13/15, 10:01 PM

Obviously this is quite an old post, but in case anyone finds themselves here with the error above, the fix is to comment out the following line in your HTML code (pasting it with the comment tag added).  Assuming that you have this problem, you will likely not be able to access your page any longer, so the way to get to where you need to modify is to go in to settings / views and then search for your page.  It will be a qWeb view that you can simply edit and modify.  Then go back to your website view and all should be well. ;)

<!--<t t-foreach="kwargs" t-as="kwarg">

<input type="hidden" t-att-name="kwarg[0]" t-att-value="kwarg[1]"/>

</t>-->

Thank you!! I comment this loop and it works ;D

Laura
on 2/9/16, 7:19 AM
0
Nancy Nguyen
On 1/29/16, 3:21 PM

test

0
devza
On 4/18/15, 3:52 AM

Odoo website works in mvc pattern. So creating view is simply just 1/3 of your needs. You will have to also create controller and edit module for some extra behaviour. To create a well working page do this by creating a new module wit mvc content. If you wan't to just inherit some other page use xpath. Don't forget that you can also use JavaScript w/ JQuery if you wnat to add som fancy things. Everything can be found in original Odoo website, website_sale, website_crm modules.

0
Frank Adler
On 9/13/14, 5:15 AM

Hi Harold, 

I had the exact same experience as you did. Please have a look here for a step-by-step guide:

https://www.odoo.com/forum/help-1/question/custom-forms-this-is-how-to-62623

Hope this helps.

Frank

0
Harold Poku
On 7/24/14, 7:34 AM

Thanks. I have been able to copy/paste the HTML code of the contact us page into my new "Registration" page. But in changing the HTML code of the contact form doesnt it modify the existing simple contact us page as well? That page is still needed for simple contacts.

I see the contact form is linked to the contact us page via an xpath expression:  <xpath expr="//div[@name='mail_button']" position="replace">. Doest the xpath need to be modified in anyway and should i be using the existing contact form or create and new form altogether for new registration form page?

just fyi, I tried creating a new qweb view from  Settings/Technical/Views:

View Name: Registration Form

View Type: QWeb

Inherited View: Registration

 

And getting this error:

Traceback (most recent call last):
  File "/opt/openerp/server/openerp/http.py", line 1183, in get_response
    result.flatten()
  File "/opt/openerp/server/openerp/http.py", line 1059, in flatten
    self.response.append(self.render())
  File "/opt/openerp/server/openerp/http.py", line 1056, in render
    return view_obj.render(request.cr, uid, self.template, self.qcontext, context=request.context)
  File "/opt/openerp/server/openerp/addons/website/models/ir_ui_view.py", line 160, in render
    return super(view, self).render(cr, uid, id_or_xml_id, values=values, engine=engine, context=context)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_ui_view.py", line 870, in render
    return self.pool[engine].render(cr, uid, tname, qcontext, loader=loader, context=context)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 229, in render
    return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 273, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 290, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 271, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 382, in render_tag_call
    d[0] = self.render_element(element, template_attributes, generated_attributes, d)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 290, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 273, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 290, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 273, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 290, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 273, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 290, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 273, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 290, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 273, in render_node
    result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 290, in render_element
    g_inner.append(self.render_node(current_node, qwebcontext))
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 271, in render_node
    result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_qweb.py", line 373, in render_tag_foreach
    raise QWebException("foreach enumerator %r is not defined while rendering template %r" % (expr, template), template=template)
QWebException: foreach enumerator 'kwargs' is not defined while rendering template u'website.Registration'

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 7/20/14, 10:22 AM
Seen: 10491 times
Last updated: 3/1/16, 10:09 AM