Odoo Help

5

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

By
odoo.ma by IBS Group
on 10/4/13, 5:27 PM 7,063 views

The Question has been closed

by
Sudhir Arya (ERP Harbor Consulting Services)
on 10/06/2013 06:25:55

And can they be used interchangeably in some cases.

If possible to give a simple clear example.

7

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
11166
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

Top 10 Odoo contributor On Stackoverflow 

LinkedIn

Blog

Stackoverflow

Sudhir Arya
ERP Harbor Consulting Services
skype: 
sudhir@erpharbor.com 
Sudhir Arya (ERP Harbor Consulting Services)
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.

1

AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
2130
| 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 platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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