Odoo Help

0

how to trigger Boolean field to show new form

By
Rahul Nimgade
on 8/12/16, 2:12 AM 270 views

Hello All,

i want to make one boolean field when i clicked(checked) it open new form...please anyone help me to solve this

eg: if i create two fields warranty_active, warranty_expired ,   so when i check for warranty_active then select_warranty_period should be show...if i select expired then not



Thank you....!

You just want to show one extra field i.e. select_warranty_period on click of boolean field right?

Asmita Chavan
on 8/12/16, 7:35 AM
1
Asmita Chavan
On 8/12/16, 8:08 AM

Ok, If you will observe the xml code in Product view for Sales tab:

<page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}" name="sales">

here, sale_ok is Boolean field in product.product model, and in attrs it is written to make field invisible when value of sale_ok is False.

Likewise,

In your case:

If you want to make field invisible, on click of warranty_active field :

Then you have to write ,

<field name="select_warranty_period" attrs="{'invisible': [('warranty_active', '=', False)]}">

0
Ajeet Yadav
On 8/12/16, 8:43 AM

You need to add attrs in view when boolean field will checked warranty_expired will be visible.

<field name="warranty_expired" attrs="{'invisible':[('warranty_active','=','1')]}"/>

0
Rahul Nimgade
On 8/12/16, 7:43 AM

yes........exactly...like in product(menu) if we clicked on 'can be sold' then only 'sale'(page) is open

thank you...!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/12/16, 2:12 AM
Seen: 270 times
Last updated: 8/12/16, 8:43 AM