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.

1

[8.0]website crm required field in contact form

By
Jordi Riera
on 9/8/14, 2:13 PM 1,157 views

Hello,

On Odoo 8.0, I need to update the form of "Contact us" in the website_crm module . I want to update the controller so the check will be done even if the form is used in another view.

I see the _REQUIRED variable is tested against to check if a field is mandatory or not, but _REQUIRED is defined in the method. I though to use inherit from the controller and to overcharge the method but I don't know how to do it as the method returns a website.render().

Is there any trick I miss here that would allow me to update the field phone_number as required? I really want to do it in the controller.

here is the file:

https://github.com/odoo/odoo/blob/8.0/addons/website_crm/controllers/main.py

Regards,

Jordi

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

1 follower(s)

Stats

Asked: 9/8/14, 2:13 PM
Seen: 1157 times
Last updated: 3/16/15, 8:10 AM