Odoo Help

3

Can anyone explain me about this domain="[('deprecated', '=', False)] meaning?

By
Annadurai
on 11/11/16, 1:08 AM 645 views

domain="[('deprecated', '=', False)] meaning?

2

Jainesh Shah

--Jainesh Shah--
1130
| 4 2 5
Ahmedabad, India
--Jainesh Shah--


Jainesh Shah
On 4/26/17, 6:01 AM

Here, domain="[('deprecated', '=', False)] means it will display only those records for which deprecated(field name) is false(field value).

Generally Domain is used to filter data based on conditions.

You can get reference from here : https://www.odoo.com/documentation/10.0/reference/orm.html#domains

Thanks Jainesh

It helps me :)

Dilip Dabhi
on 4/26/17, 6:03 AM
1
Sehrish
On 3/16/18, 2:08 AM

There are two types of domain in odoo, the first one is inline domain and the other is functional domain. The purpose of both domain is to filter records in many2one fields.

Inline Domain

department_id= fields.Many2one('department.model','Department',domain="[('academic_department','=',True)]")

Above code means i want to show only those department which are academic.

Functional Domain

def semester_domain(self):
      #do some logic for getting ids    
return [('id','in',[your ids goes here])]
department_id = fields.Many2one('department.model','Department',domain=semester_domain)

Hope I helped you. For scratch and business development in Odoo visit: https://goo.gl/8HgnCF

Thanks

thks for the reply, I know what you said but what I want is jainesh answer. Only on domain="[('deprecated', '=', False)]

Annadurai
on 3/16/18, 8:22 AM
1

Shameem Babu @ iWesabe

--Shameem Babu @ iWesabe--
GLOBAL CREATIVE CONCEPTS TECH CO LTD
http://www.iwesabe.com
1257
| 6 3 6
KHOBAR, Saudi Arabia
--Shameem Babu @ iWesabe--

  

 iWesabe - ODOO ERP IMPLEMENTATION & CUSTOMIZATION SAUDI ARABIA.



For Queries :  shameem@iwesabe.com

Activities     :    Youtube

                           Stackoverflow 

Experience

           iWesabe                                  ◉

           Axon Communications        ❍

           Cybrosys Technologies        ❍


Shameem Babu @ iWesabe
On 11/11/16, 1:12 AM

Filter  objects which field depreciated(may be boolean) contain False value

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: 11/11/16, 1:08 AM
Seen: 645 times
Last updated: 3/16/18, 8:19 AM