i have custom class like this ,
.py
#for parent class
class wtc_proses_birojasa(osv.osv):
_name = "wtc.proses.birojasa"
_columns = {
================================================
'type' : fields.selection([('reg', 'REG'), ('adv','ADV')], 'Type'),
'proses_birojasa_line': fields.one2many('wtc.proses.birojasa.line','proses_birojasa_id',string="Table Biro Jasa"),
=================================================
}
# for one2many
class wtc_proses_birojasa_line(osv.osv):
_name = "wtc.proses.birojasa.line"
_columns = {
=============================
'no_notice' : fields.char('No Notice'),
==============================
}
===================================================================================================
i want to make 'no_notice' required when user choose 'REG' in 'type' selection, i already use this xml code but it didn't work
<field name="no_notice" attrs="{'required': [('parent.type','=','reg')]}"/>
anyone know how to solve it ?
sorry for my bad english , thanks in advance