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.

0

How does web forms works ?

By
PY
on 2/12/15, 10:45 AM 525 views

Hi !

I am making an extension of the module website_sale, in order to use the cart and payment stuff.

I want to create a form where the user can select things in selection widgets. Then, I want to trigger changes in the price when the value of these selection wigdet change. Finally, I want to create a product from there and add it to the cart.

But the thing is, it's the first time I work with odoo website functionnalities. I don't know if I have to use javascript, and how. I have checked the doc, but eh, no much help there. Or perhaps I can make a python function and use it in the qweb template ? I don't know. Some help, clues, examples will be greatly appreciated.

Edit:

After some reading, I know how to build widgets using qweb templates and js. I know how to call a widget from a menu in the backend.

Now, how to include my custom widget in a template in the frontend ?

1
Martin Temmink
On 2/13/15, 7:13 PM

Okay, if you want to know how a basic form works, take a look at the contact us page and open the html editor on the front end. You will see how odoo will build the form and how it positions the form on the page. The actual data of the form will be in a separate file, which you can access also through the html editor on the front-end, this one is called "contact form" 


take a good look at them, and maybe you know enough how to build your own.

if you think this answer has helped you, then please vote with a thumbs up.

 

 

Okay, but how do I process the data after that ? How do I build a selection box ?

PY
on 2/16/15, 3:21 AM

If you take a closer look in the contact form as I mentioned here above. you will see that the data the user has typed in the contact form is placed in the lead section of your sales module. So you just can filter, expert or whatever you want to do with it. Maybe you want to create a news brief for those new contacts. It's all possible.

Martin Temmink
on 2/20/15, 6:55 PM

If you take a closer look in the contact form as I mentioned here above. you will see that the data the user has typed in the contact form is placed in the lead section of your sales module. So you just can filter, expert or whatever you want to do with it. Maybe you want to create a news brief for those new contacts. It's all possible.

Martin Temmink
on 2/20/15, 6:55 PM

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: 2/12/15, 10:45 AM
Seen: 525 times
Last updated: 3/16/15, 8:10 AM