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
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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>
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Nov 24
|
1487 | ||
|
1
Nov 24
|
1196 | ||
|
2
Sep 24
|
1047 | ||
Update stock quantity
Solved
|
|
1
Aug 24
|
2456 | |
|
3
Aug 24
|
2687 |