Odoo Help

3

How to Invisible/Hide a column in wizard stock.transfer_details ids ?

By
Miftahussalam
on 1/27/15, 10:53 PM 1,206 views

I added two field in the wizard column, like this :


in .py

division = fields.Selection([('Unit','Unit'),('Sparepart','Sparepart'),('Umum','Umum')], 'Division')

chassis_number = fields.Char('Chassis Number')


in .xml

<field name="division"/>

<field name="chassis_number" attrs="{'invisible': [('division','!=','Unit')]}"/>


I need to hide chassis_number field when division is not Unit. And I tried the code like above, but it doesn't work. The effect so as read only. Is there anyone have solution?

0

Try following:

  • 1./ <field name="chassis_number" attrs="{'invisible': [('division','not in',['Unit'])]}"/> 

OR

  • 2./ <field name="chassis_number" attrs="{'invisible': [('division','in',['Sparepart','Umum'])]}"/>

Hope this helps !!.

Hi Emipro.. I have tried it, but same as before. Are you have other solution?

Miftahussalam
on 1/28/15, 2:00 AM

Check whether you didn't put same field twice on the view. i.e "Division"

Emipro Technologies Pvt. Ltd.
on 1/28/15, 7:10 AM

I have check and there is only one field on the view

Miftahussalam
on 1/29/15, 4:44 AM

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: 1/27/15, 10:53 PM
Seen: 1206 times
Last updated: 6/7/17, 2:40 AM