Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


What is the difference between context and domain? [Closed]

on 10/4/13, 5:27 PM 4,161 views

The Question has been closed

Sudhir Arya (SA)
on 10/06/2013 06:25:55

And can they be used interchangeably in some cases.

If possible to give a simple clear example.


Sudhir Arya (SA)

--Sudhir Arya (SA)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow




Sudhir Arya (SA)
On 10/5/13, 3:23 PM

Context: is a dictionary which contains some information like: user language, company, timezone, etc by default. You can pass any kind of data/information in context as per your need either from xml or from py (mehtods) and then based on that extra information you can write your process code.

Domain: is a condition(s) which is used to filter your data or for searching. For more information about domain see this: How to filter datas in OpenERP using domain list.


AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
| 4 5 8
Bronx, United States
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
On 10/4/13, 6:05 PM

Essentially - domain is a filter you cannot expand beyond - context is a filter you can expand to the point that domain allows.

Context is used to pass the filter parameters created by the user to functions. domain does not.

context is not a filter, it's a dictionary of arbitrary values that depends of the context/screen of the user. It's mostly used to change the value of some fields. (e.g. language, warehouse I am wroking it to change quantities available of products, ...)

Fabien Pinckaers (fp)
on 10/5/13, 4:17 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 10/4/13, 5:27 PM
Seen: 4161 times
Last updated: 6/2/16, 1:04 AM