what is model in odoo

Hello Odooers, Odoogig and Odoo Lovers,

In this Odoo Technical Tutorial, I would like to explain about what is model in odoo  in detail

A model is short for Object-Relational Mapping, is a central part of odoo/OpenERP.

In odoo, Model is class or entity  that maps the data into tables. it contain different fields as columns and storing data behaviours. A one model contain multiple methods to manipulate the data of model

Odoo Model:-

  • Odoo stores all its data into PostgreSQL database.

  • Different Tables are created into PostgreSQL database to store various data in it, such as for customer there is a different table for employee there is a different table in PostgreSQL database

  • In database its called ‘Tables’ and in odoo its called ‘Models’ which represent  the PostgreSQL table 

  • for examples ‘res.partner’ model is used to store customer and vendor data, ‘hr.employee’ model is used to store employee’s data.

  • You can also create and store your model into PostgreSQL database using custom modules

 Odoo Model Syntax  :-

let’s say if you want to create any model in odoo for any specific custom needs

Example : I want to create module in odoo for  odoo training class

There is two way you can create/define your class/model name in odoo 

  1. Using Underscores
  2. Camel Case Style 

Using Underscores :- 

You can separated your module name by underscore like below which mostly used in odoo.

Camel Case Style :- 

underscore will be removed  in your model name and each word’s first letter  must be capital (in upper case)

Cheers Enjoy  odoo !

 


GET IN TOUCH.!

We’d Love to Hear from You! We are happy to answer any questions, you have regarding My Training.

Mail : getodootraining@gmail.com

Skype : mayur_maheshwari1

What’s app : +919924542042

LEAVE A REPLY

Leave a Reply

Your email address will not be published. Required fields are marked *