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 to check the form?

By
willie ho
on 9/30/14, 3:25 AM 471 views

I need to do some checking when submitting the form. (e.g. if the name of location is used or not)

where should I put the function and how do I get data from database to check the form?

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 9/30/14, 6:14 AM

Different ways to go about this. Most checks can be done on the fields themselves, in the form of on_change functions. Look up examples in the code.

If something can only be checked at the end, you might want to override the "create" method in your (inherited) object. This is called when you press the "Save" button for a record that does not yet exist. 

For records that already exist in the database, you need to override the "write" method on your object. This handles the writing the differences on the record you are working on.

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/30/14, 3:25 AM
Seen: 471 times
Last updated: 3/16/15, 8:10 AM