1

I'm using odooV10.

I want to know every model's methods without searching it manually, but I couldn't find anywhere to achieve this. Is anyone have any idea?

MilanPanchal
  • 2,943
  • 1
  • 19
  • 37

3 Answers3

1

well you can simply dir(model)

ie.

any_method_on_your_model(self):
    print dir(self)

you will see all the properties included in the object.

Oscar Alca
  • 56
  • 6
  • This works indeed, it gives all methods on the odoo model regardless of their file or even addon location. Only problem is that you have to use it in run time. – Alvaro Rodriguez Scelza Jan 29 '20 at 14:36
0

Activate the Developer Mode in OdooV10. Then go Setting(odoo Main Settings)--> Technical -->Models. Here you can find all models, fields, views and constraints. I hope this will work for you. if not explain what you want trying to do.?

ShivaGuntuku
  • 5,274
  • 6
  • 25
  • 37
  • I knew that your answer is right to find all models, but i want to browse all methods in models.. Like sale.order have mothods such as (create, write, unlink, confirm_order, cancel_order, create_invoice) etc.. But i want to browse it by code not search for it manually using editor.. – Ajeng Shilvie Apr 06 '17 at 16:04
0

In python you can get method of class get methods of class

but the problem here odoo inherits mechanism prevent you from doing this. when you call a method a very complicated operation to create an object with that method from the inherited classes

Community
  • 1
  • 1
Charif DZ
  • 14,415
  • 3
  • 21
  • 40