How to get the flag/state of current operation in Odoo 9?
<p>I am new in odoo, I want to know how we get the current flag/state of every operation.</p>

<p>For example: when we create a new record how do we know the current flag/state is "add"? or when we view a record how do we know the current flag/state is "view"? </p>

<p>It something like current user id that stored in session named "uid", is there something similar to get the current flag/state in every operation?</p>

<p>There is no such thing as 'flag/state'. </p>

<p>What you are probably trying to say is that you want to know which operations are taking place on a record. The easiest method is to take a look at your log. There will be statements there in the form <code>/web/dataset/call_kw/model/operation</code> where model is your ORM model and operation could be a search, read, unlink etc. RPC calls are logged in there as well. The format of the log output is a little bit different between different versions of odoo. You can go to a lower level by monitoring sql transactions on postgresql but I do not think that this is what you want.</p>

python web openerp