i made some boolean field in some model and i made many2one field depends on the boolean model i need to invisible full line if the boolean was true is that possible?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Hi,
yes it is possible, check out this links:
1. Forum Link: https://www.odoo.com/forum/help-1/attrs-multiple-condition-boolean-and-17889
2. Explaining Video : https://youtu.be/a7By61G3cds
the main idea is to use attrs with condition/conditions on fields which located in the model ,
for example:
Note: you can add this code into inherited view
Hope this will help.
but mine its not inherit it is ,many2one only will it work?
This my code
<record id="preventive_entry_tree" model="ir.ui.view">
<field name="name">pmentry.tree</field>
<field name="model">pmentry</field>
<field name="arch" type="xml">
<tree string="Product" default_order='pme_pmj_sortorder'>
<field name="pme_pmj_sortorder" optional="show"/>
<field name="pme_date" readonly="True" optional="show" />
<field name="pme_users" readonly="True" optional="show" />
<field name="pme_shift" optional="show" />
<field name="pme_pmcrecid" context="{'show_code':True}" optional="show" />
<field name="pme_pmj_description" optional="show" />
<field name="pme_query" optional="hide" />
<field name="pme_pmj_threshold" optional="hide" />
<field name="pme_value" optional="hide" />
<field name="pme_act_take" optional="hide" />
<field name="pme_pmj_testcycle" optional="hide" />
<field name="pme_status" optional="show" />
<field name="pme_rea_typ" optional="hide" />
<field name="pme_rea_des" optional="hide" />
</tree>
</field>
</record>
in ""pme_pmj_sortorder"" i have disable button in the same model i want when it is disable the full row including other fields to be invsible
This is the form also in case you need it
record id="preventive_entry_form" model="ir.ui.view">
<field name="name">pmentry.form</field>
<field name="model">pmentry</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="pme_pmj_sortorder" editable="bottom" />
<field name="pme_date" readonly="True" />
<field name="pme_users" readonly="True" />
<field name="pme_shift" />
<field name="pme_pmcrecid" context="{'show_code':True}" />
<field name="pme_pmj_description" />
<field name="pme_query" />
<field name="pme_pmj_threshold" />
<field name="pme_value" />
<field name="pme_act_take" />
<field name="pme_pmj_testcycle" />
<field name="pme_status" />
<field name="pme_rea_typ" />
<field name="pme_rea_des" />
</group>
</sheet>
</form>
</field>
</record>
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden| Gerelateerde posts | Antwoorden | Weergaven | Activiteit | |
|---|---|---|---|---|
|
|
1
dec. 25
|
419 | ||
|
|
3
sep. 25
|
3848 | ||
|
|
0
aug. 25
|
1228 | ||
|
|
1
aug. 25
|
3635 | ||
|
|
2
jul. 25
|
9272 |