Skip to content

Instantly share code, notes, and snippets.

@tienhieuD
Created July 25, 2017 13:46
Show Gist options
  • Save tienhieuD/0186d797d6446194d64e6e97892dd2a6 to your computer and use it in GitHub Desktop.
Save tienhieuD/0186d797d6446194d64e6e97892dd2a6 to your computer and use it in GitHub Desktop.
#Simple condition in programming:
if field1 = 5 or (field2 ! = 10 and field3 = 12)
#In OpenERP domain filter, it will be written as:
domain = ['|',('field1','=',5),('&',('field2','!=',10),('field3','=','12'))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment