Hello all, how the domain fields is working, explain with sample code
Tämä kysymys on merkitty
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.
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
Rekisteröidy| Aiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
|---|---|---|---|---|
|
|
1
syysk. 18
|
10900 | ||
|
optional parameter fields/property
Ratkaistu
|
|
1
kesäk. 15
|
7054 | |
|
|
3
toukok. 24
|
7968 | ||
|
One2many field domain not working
Ratkaistu
|
|
2
jouluk. 21
|
7585 | |
|
|
2
toukok. 24
|
5508 |