How can i make a button visible on satisfying the condition

How can a button be visible if 3 of the selection field is having value = Yes.
Any reference to such code will be helpful.

The definition of the button has an attribute invisible which is a PYSON that makes the button invisible if evaluated to True and visible if False. There is also the readonly attribute which keep the button visible but prevent to click on it.
I filled Issue 9954: Document keys of ModelView._buttons - Tryton issue tracker to improve the documentation.