Question: Hello I have created a button on my Odoo 10 form "SET geprint" now i want to attach an action to the button. If i press the button the value of the boolean geprint must change to 1. How can I make this possible? 

If possible i would also like to create that button in the list view to update multiple records. 
Thx for your help

[![enter image description here](https://i.stack.imgur.com/4gzLT.png)](https://i.stack.imgur.com/4gzLT.png)

I tried your code but i am getting the following error now
(name field to update is x\_geprint)
button code : 

[![enter image description here](https://i.stack.imgur.com/Mr91Q.png)](https://i.stack.imgur.com/Mr91Q.png)
[![enter image description here](https://i.stack.imgur.com/XFDlh.png)](https://i.stack.imgur.com/XFDlh.png)

Answer: 
You can access private members from *any* code block that is defined in the *same class*. It doesn't matter what the instance is, or even if there is any instance (the code block is in a static context).

But you cannot access them from code that is defined in a *different class*.

Your first reference is in the same class, `Complex`, which is why it works. And the second is in a different class, `Main`, which is why it doesn't work.
Here is the table explaining access modifiers:

[![enter image description here](https://i.stack.imgur.com/Roj6o.png)](https://i.stack.imgur.com/Roj6o.png)

As you can see, in the `private` row, everything is `N` except for the column `Class`. That means you can access private members as long as you are accessing them in the same class as they are declared. You can even access private non-static members from a static context in the same class using an instance. There is no access modifier that only allows access from the same instance.

Why?

Because figuring out whether `this` and `c` are the same instance at compile time is a pain. You have to actually run the code to see if they are referring to the same instance or not.