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 :
How to filter datas in OpenERP using domain list :
- Each tuple in the search domain needs to have 3 elements, in the form:
('field_name', 'operator', value)
, where: - field_name must be a valid name of field of the object model, possibly following many-to-one relationships using dot-notation, e.g 'street' or 'partner_id.country' are valid values.
- operator must be a string with a valid comparison operator from this list:
=, !=, >, >=, <, <=, like, ilike, in, not in, child_of, parent_left, parent_right
The semantics of most of these operators are obvious. Thechild_of
operator will look for records who are children or grand-children of a given record, according to the semantics of this model (i.e following the relationship field named byself._parent_name
, by defaultparent_id
. - value must be a valid value to compare with the values of field_name, depending on its type.
No comments:
Post a Comment