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

share: use automated action to validate input data create/write, raise Warning('validation fail')

By
fisher
on 1/5/15, 3:40 AM 769 views

there is undocumented variable Warning ( Extend from standard Exception) available in python code in automated actions, use the following sample code, we can use automated action to do customized input data validation, very handy!

if object.name == '33':

    raise Warning('validation fail')

This is very handy for key user / end users to customize validation rule without touching the source code, especially useful for client running on SAAS .

 

0
fisher
On 1/5/15, 11:48 PM

as this is a post for sharing, so I close this myself.
 

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: 1/5/15, 3:40 AM
Seen: 769 times
Last updated: 3/16/15, 8:10 AM