Asked by Bushair


What does the following Record Rules mean?



Question information

English Edit question
Odoo Server (MOVED TO GITHUB) Edit question
No assignee Edit question
Solved by:
Nhomar - Vauxoo
Last query:
Last reply:
Revision history for this message
Husen Daudi (husendaudi) said :

Hello Bushair,

Most of the questions are already answered here or in forum.
Please try to find out something in sources and if you still found problem you can ask here.

Check this for more details on this question.

Revision history for this message
Best Nhomar - Vauxoo (nhomar) said :


This parameter allows you to regulate which resources are visible in a selected view.(restriction)

For example, in the invoice case, you can define an action that opens a view that shows only invoices not paid.

The domains are written in python; list of tuples. The tuples have three elements;

        * the field on which the test must be done
        * the operator used for the test (<, >, =, like)
        * the tested value

For example, if you want to obtain only ‘Draft’ invoice, use the following domain; [(‘state’,’=’,’draft’)]

In the case of a simple view, the domain define the resources which are the roots of the tree. The other resources, even if they are not from a part of the domain will be posted if the user develop the branches of the tree.

###########For your specific case##############

the '|' become the domain in an "or" statement.
It means "all records than the user_id field is the connected one _or_ not have user related"

The other one is somthing like this. a little more complicated but _or_ too!
[1] http://doc.openerp.com/v5.0/developer/2_7_menu_action/7_2_actions.html?highlight=domain


Revision history for this message
Bushair (bushairka) said :

Thanks all