Hello all, how the domain fields is working, explain with sample code
Această întrebare a fost marcată
Domain is working like select query of sql having where condition. We can give 'and' & 'or' conditions in that.
Example: <record model="ir.actions.act_window" id="crm_case_category_act_leads_all"> <field name="name">Leads</field> <field name="res_model">crm.lead</field> <field name="domain">['|', ('type','=','lead'), ('type','=',False)]</field> </record>
This will give the same output as following sql query: select * from crm_lead where type = 'lead' or type = 'false';
We can apply domain on some field like : <field string="Supplier" name="partner_id" domain="[('supplier', '=', True)]"/>
This will give suppliers from res_partner object.
Îți place discuția? Nu doar citi, alătură-te!
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
|
1
sept. 18
|
10902 | ||
|
optional parameter fields/property
Rezolvat
|
|
1
iun. 15
|
7057 | |
|
|
3
mai 24
|
7968 | ||
|
One2many field domain not working
Rezolvat
|
|
2
dec. 21
|
7585 | |
|
|
2
mai 24
|
5509 |