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

ODOO: Vrify if a char is in a list of caracters

By
Drees Far
on 4/22/16, 7:11 AM 288 views

Hello everybody:

PLease friends, i am working with a caracter which must be an 'A' or 'B' or 'C'.

I have tried this:

  if code_TVA not in ['A', 'B', 'C'] :

but i didnt get the result that i am waiting.

Can anyone help please.

Thanks a lot in advance.

Best regards.

0
Jorge Barcelo Cortes
On 4/22/16, 7:42 AM

This is not related to odoo but python itself, you dont really need the list:

'o' in 'some' => True

'me' in 'something' => True

'to' in 'bottle' => False

'me' in ['some','other','medicine'] => False

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: 4/22/16, 7:11 AM
Seen: 288 times
Last updated: 4/22/16, 7:42 AM