Hello all, how the domain fields is working, explain with sample code
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
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.
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
|
1
set 18
|
9479 | ||
|
1
giu 15
|
5756 | ||
|
3
mag 24
|
5900 | ||
|
2
dic 21
|
6040 | ||
|
2
mag 24
|
3795 |