Odoo
Mastering Odoo 11.0 Development
Mohamed Magdy
OpenObject Concepts
● OOP Class is Object.
● OOP Instance is Resource.
● There is an object for every type of resource,
and not an object per resource.
● MVC:
○ Model: PostgreSQL tables.
○ View: Defined in XML files.
○ Controller: Odoo Objects.
Module Structure
module_name
● __init__.py
● __manifest__.py
● module_name.py
● views/
● security/
● demo/
● wizard/
● report/
● i18n/
● static/
Objects
● In Odoo, Objects are Classes define new
types.
● Models
○ Add new Tables, Fields in Database.
○ Add SQL Constraints.
● Controllers
○ Methods to compute Values.
○ Onchange Methods.
○ Methods (Logic) behind Buttons.
Fields Types (MorePython.com)
● Boolean: is_new_field = fields.Boolean(string="", )
● Char: new_field = fields.Char(string="", required=False, )
● Text: new_field = fields.Text(string="", required=False, )
● Integer: new_field = fields.Integer(string="", required=False, )
● Float: new_field = fields.Float(string="", required=False, )
● Date: new_field = fields.Date(string="", required=False, )
● Datetime: new_field = fields.Datetime(string="", required=False, )
● Selection: new_field = fields.Selection(string="", selection=[('', ''), ('', ''), ], required=False, )
● Many2many: new_field_ids = fields.Many2many(comodel_name="", relation="", column1="", column2="", string="", )
● One2many: new_field_ids = fields.One2many(comodel_name="", inverse_name="", string="", required=False, )
● Many2one: new_field_id = fields.Many2one(comodel_name="", string="", required=False, )
● Binary: new_field = fields.Binary(string="", )
Common Attributes (MorePython.com)
Some attributes are common:
● string: The label of the field seen by users.
● help: The tooltip of the field seen by users.
● readonly: Determines if the field is read-only or editable (boolean).
● required: Determines if the field is required or optional (boolean).
● index: Determines if the field is indexed inDB (boolean).
● default: The default value of the field, it can be static or computed value.
● states: A dictionary mapping state values to lists of UI attribute-value.
● groups: Comma-separated lists of group XML ids.
● copy: Whether to copy the field value when the record is duplicated or not.
● old_name: The old name of this field, so that ORM rename at migration.
● compute: The name of the method that computes the field’s value.
Common Attributes (MorePython.com)
Some attributes are common:
● inverse: The name of a method that inverses the field.
● search: The name of a method that implement search on the field.
● store: Determines if the field is stored in DB (boolean).
● compute_sudo: Determines if the field should be recomputed as superuser
to bypass access rights (boolean).
● related: To get the field’s value automatically from the source field.
● company_dependant: If the field is company-dependant (boolean).
Specific Attributes (MorePython.com)
Some attributes are for specific fields:
Char:
● size: The maximum size of the values stored for that field.
● translate: Enables the translation of the field’s value.
Text:
● translate: Enables the translation of the field’s value.
Float:
● digits: A pair (total, decimal), or a function taking a database cursor and
returning a pair (total, decimal)
Specific Attributes (MorePython.com)
Some attributes are for specific fields:
Selection:
● selection: Specifies the possible values for this field.
● add_selection: Provides an extension of the selection in the case of an
overridden field.
Monetary:
● currency_field: Name of the field holding the currency this monetary field
is expressed in.
Specific Attributes (MorePython.com)
Some attributes are for specific fields:
Many2one:
● comodel_name: Name of the target model (string).
● domain: An optional domain to set on candidate values on the client side.
● context: An optional context to use on the client side when handling that
field (dictionary).
● ondelete: Determines what to do when the referred record is deleted.
Possible values: set null, restrict or cascade.
● auto_join: Determines if JOINS are generated upon search through that
field (boolean).
● delegate: Set it to ‘True’ to make fields of the target model accessible from
the current model.
Specific Attributes (MorePython.com)
Some attributes are for specific fields:
One2many:
● comodel_name: Name of the target model (string).
● domain: An optional domain to set on candidate values on the client side.
● context: An optional context to use on the client side when handling that
field (dictionary).
● inverse_name: Name of the inverse ‘Many2one’ field in ‘comodel_name’.
● auto_join: Determines if JOINS are generated upon search through that
field (boolean).
● limit: Optional limit to use upon read (integer).
Some attributes are for specific fields:
Many2many:
● comodel_name: Name of the target model (string).
● relation: Optional limit to use upon read (integer).
● domain: An optional domain to set on candidate values on the client side.
● context: An optional context to use on the client side when handling that
field (dictionary).
● column1: An optional name of the column referring to ‘these’ records in
the table ‘relation’.
● column2: An optional name of the column referring to ‘those’ records in
the table ‘relation’.
● limit: Optional limit to use upon read (integer).
Specific Attributes (MorePython.com)
Odoo
Mastering Odoo 11.0 Development
Mohamed Magdy

More Related Content

PPTX
odoo 11.0 development (CRUD)
PDF
Data recovery using pg_filedump
PPT
MongoDB
PPTX
Html cors
PDF
pg_filedump
PDF
Beautiful soup
PDF
RedisConf17 - Redis as a JSON document store
PPTX
Redis Developers Day 2015 - Secondary Indexes and State of Lua
odoo 11.0 development (CRUD)
Data recovery using pg_filedump
MongoDB
Html cors
pg_filedump
Beautiful soup
RedisConf17 - Redis as a JSON document store
Redis Developers Day 2015 - Secondary Indexes and State of Lua

What's hot (20)

PPTX
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
PDF
What's new in Redis v3.2
PPTX
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
PDF
「DDD 完全に理解した」の次
PDF
Compiling EdgeQL
PDF
Use Redis in Odd and Unusual Ways
PPT
Hive Object Model
PPT
2011 mongo FR - scaling with mongodb
PDF
Adaptive Query Processing on RAW Data
PPTX
Thinking in Sequences - Streams in Node.js & IO.js
PPTX
Java file
PDF
Leveraging Probabilistic Data Structures for Real Time Analytics with Redis M...
PDF
JavaScript client API for Google Apps Script API primer
PDF
NoSQL Injections in Node.js - The case of MongoDB
PPTX
PPT
Java 7
PPT
2011 Mongo FR - MongoDB introduction
PDF
Superficial mongo db
PDF
SequoiaDB Distributed Relational Database
PPSX
CodeIgniter L5 email & user agent & security
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
What's new in Redis v3.2
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
「DDD 完全に理解した」の次
Compiling EdgeQL
Use Redis in Odd and Unusual Ways
Hive Object Model
2011 mongo FR - scaling with mongodb
Adaptive Query Processing on RAW Data
Thinking in Sequences - Streams in Node.js & IO.js
Java file
Leveraging Probabilistic Data Structures for Real Time Analytics with Redis M...
JavaScript client API for Google Apps Script API primer
NoSQL Injections in Node.js - The case of MongoDB
Java 7
2011 Mongo FR - MongoDB introduction
Superficial mongo db
SequoiaDB Distributed Relational Database
CodeIgniter L5 email & user agent & security

Similar to Odoo Technical Concepts Summary (20)

PPTX
Model Attributes in Odoo 18 - Odoo 18 Slides
PPTX
Field Parameters in Odoo 18 - Odoo 18 Slides
PPTX
Automatic and Reserved Fields in odoo - Odoo Slides
PPTX
What are the Basic Fields in the Odoo 17 ERP
PDF
PPT. Introduction & Views - Documentation.pdf
PPTX
Many2One Fields in Odoo 16
PPTX
Automatic and Reserved Fields in Odoo 18
PPTX
How to Add a Store Attribute to a Field in Odoo 16
PPTX
Xml operations in odoo
PDF
Odoo - From v7 to v8: the new api
PDF
Odoo from 7.0 to 8.0 API
PDF
ORM in Django
PDF
Odoo - Backend modules in v8
PDF
Presentation of the new OpenERP API. Raphael Collet, OpenERP
PDF
OODBMS Concepts - National University of Singapore.pdf
PDF
Understanding ORM in Odoo 18: Methods and Best Practices
PPTX
Method and decorator
PPTX
Object Relation Mapping in Odoo 16
PDF
New Framework - ORM
Model Attributes in Odoo 18 - Odoo 18 Slides
Field Parameters in Odoo 18 - Odoo 18 Slides
Automatic and Reserved Fields in odoo - Odoo Slides
What are the Basic Fields in the Odoo 17 ERP
PPT. Introduction & Views - Documentation.pdf
Many2One Fields in Odoo 16
Automatic and Reserved Fields in Odoo 18
How to Add a Store Attribute to a Field in Odoo 16
Xml operations in odoo
Odoo - From v7 to v8: the new api
Odoo from 7.0 to 8.0 API
ORM in Django
Odoo - Backend modules in v8
Presentation of the new OpenERP API. Raphael Collet, OpenERP
OODBMS Concepts - National University of Singapore.pdf
Understanding ORM in Odoo 18: Methods and Best Practices
Method and decorator
Object Relation Mapping in Odoo 16
New Framework - ORM

Recently uploaded (20)

PDF
Mobile App for Guard Tour and Reporting.pdf
PDF
How to Set Realistic Project Milestones and Deadlines
PDF
MaterialX Virtual Town Hall - August 2025
PPTX
Hexagone difital twin solution in the desgining
PDF
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
PPTX
AI Tools Revolutionizing Software Development Workflows
PPTX
Relevance Tuning with Genetic Algorithms
PPTX
Lesson-3-Operation-System-Support.pptx-I
PPTX
MCP empowers AI Agents from Zero to Production
PDF
Canva Desktop App With Crack Free Download 2025?
PDF
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
PPTX
SAP Business AI_L1 Overview_EXTERNAL.pptx
PDF
OpenAssetIO Virtual Town Hall - August 2025.pdf
PDF
DOWNLOAD—IOBit Uninstaller Pro Crack Download Free
PDF
Multiverse AI Review 2025_ The Ultimate All-in-One AI Platform.pdf
PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PDF
Top AI Tools for Project Managers: My 2025 AI Stack
PPTX
Why 2025 Is the Best Year to Hire Software Developers in India
PPTX
Presentation - Summer Internship at Samatrix.io_template_2.pptx
Mobile App for Guard Tour and Reporting.pdf
How to Set Realistic Project Milestones and Deadlines
MaterialX Virtual Town Hall - August 2025
Hexagone difital twin solution in the desgining
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
AI Tools Revolutionizing Software Development Workflows
Relevance Tuning with Genetic Algorithms
Lesson-3-Operation-System-Support.pptx-I
MCP empowers AI Agents from Zero to Production
Canva Desktop App With Crack Free Download 2025?
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
SAP Business AI_L1 Overview_EXTERNAL.pptx
OpenAssetIO Virtual Town Hall - August 2025.pdf
DOWNLOAD—IOBit Uninstaller Pro Crack Download Free
Multiverse AI Review 2025_ The Ultimate All-in-One AI Platform.pdf
Comprehensive Guide to Digital Image Processing Concepts and Applications
Top AI Tools for Project Managers: My 2025 AI Stack
Why 2025 Is the Best Year to Hire Software Developers in India
Presentation - Summer Internship at Samatrix.io_template_2.pptx

Odoo Technical Concepts Summary

  • 1. Odoo Mastering Odoo 11.0 Development Mohamed Magdy
  • 2. OpenObject Concepts ● OOP Class is Object. ● OOP Instance is Resource. ● There is an object for every type of resource, and not an object per resource. ● MVC: ○ Model: PostgreSQL tables. ○ View: Defined in XML files. ○ Controller: Odoo Objects.
  • 3. Module Structure module_name ● __init__.py ● __manifest__.py ● module_name.py ● views/ ● security/ ● demo/ ● wizard/ ● report/ ● i18n/ ● static/
  • 4. Objects ● In Odoo, Objects are Classes define new types. ● Models ○ Add new Tables, Fields in Database. ○ Add SQL Constraints. ● Controllers ○ Methods to compute Values. ○ Onchange Methods. ○ Methods (Logic) behind Buttons.
  • 5. Fields Types (MorePython.com) ● Boolean: is_new_field = fields.Boolean(string="", ) ● Char: new_field = fields.Char(string="", required=False, ) ● Text: new_field = fields.Text(string="", required=False, ) ● Integer: new_field = fields.Integer(string="", required=False, ) ● Float: new_field = fields.Float(string="", required=False, ) ● Date: new_field = fields.Date(string="", required=False, ) ● Datetime: new_field = fields.Datetime(string="", required=False, ) ● Selection: new_field = fields.Selection(string="", selection=[('', ''), ('', ''), ], required=False, ) ● Many2many: new_field_ids = fields.Many2many(comodel_name="", relation="", column1="", column2="", string="", ) ● One2many: new_field_ids = fields.One2many(comodel_name="", inverse_name="", string="", required=False, ) ● Many2one: new_field_id = fields.Many2one(comodel_name="", string="", required=False, ) ● Binary: new_field = fields.Binary(string="", )
  • 6. Common Attributes (MorePython.com) Some attributes are common: ● string: The label of the field seen by users. ● help: The tooltip of the field seen by users. ● readonly: Determines if the field is read-only or editable (boolean). ● required: Determines if the field is required or optional (boolean). ● index: Determines if the field is indexed inDB (boolean). ● default: The default value of the field, it can be static or computed value. ● states: A dictionary mapping state values to lists of UI attribute-value. ● groups: Comma-separated lists of group XML ids. ● copy: Whether to copy the field value when the record is duplicated or not. ● old_name: The old name of this field, so that ORM rename at migration. ● compute: The name of the method that computes the field’s value.
  • 7. Common Attributes (MorePython.com) Some attributes are common: ● inverse: The name of a method that inverses the field. ● search: The name of a method that implement search on the field. ● store: Determines if the field is stored in DB (boolean). ● compute_sudo: Determines if the field should be recomputed as superuser to bypass access rights (boolean). ● related: To get the field’s value automatically from the source field. ● company_dependant: If the field is company-dependant (boolean).
  • 8. Specific Attributes (MorePython.com) Some attributes are for specific fields: Char: ● size: The maximum size of the values stored for that field. ● translate: Enables the translation of the field’s value. Text: ● translate: Enables the translation of the field’s value. Float: ● digits: A pair (total, decimal), or a function taking a database cursor and returning a pair (total, decimal)
  • 9. Specific Attributes (MorePython.com) Some attributes are for specific fields: Selection: ● selection: Specifies the possible values for this field. ● add_selection: Provides an extension of the selection in the case of an overridden field. Monetary: ● currency_field: Name of the field holding the currency this monetary field is expressed in.
  • 10. Specific Attributes (MorePython.com) Some attributes are for specific fields: Many2one: ● comodel_name: Name of the target model (string). ● domain: An optional domain to set on candidate values on the client side. ● context: An optional context to use on the client side when handling that field (dictionary). ● ondelete: Determines what to do when the referred record is deleted. Possible values: set null, restrict or cascade. ● auto_join: Determines if JOINS are generated upon search through that field (boolean). ● delegate: Set it to ‘True’ to make fields of the target model accessible from the current model.
  • 11. Specific Attributes (MorePython.com) Some attributes are for specific fields: One2many: ● comodel_name: Name of the target model (string). ● domain: An optional domain to set on candidate values on the client side. ● context: An optional context to use on the client side when handling that field (dictionary). ● inverse_name: Name of the inverse ‘Many2one’ field in ‘comodel_name’. ● auto_join: Determines if JOINS are generated upon search through that field (boolean). ● limit: Optional limit to use upon read (integer).
  • 12. Some attributes are for specific fields: Many2many: ● comodel_name: Name of the target model (string). ● relation: Optional limit to use upon read (integer). ● domain: An optional domain to set on candidate values on the client side. ● context: An optional context to use on the client side when handling that field (dictionary). ● column1: An optional name of the column referring to ‘these’ records in the table ‘relation’. ● column2: An optional name of the column referring to ‘those’ records in the table ‘relation’. ● limit: Optional limit to use upon read (integer). Specific Attributes (MorePython.com)
  • 13. Odoo Mastering Odoo 11.0 Development Mohamed Magdy