跳至内容
菜单
此问题已终结
3201 查看

hello i want to ask how to show hidden button when the value field1 is same with value field2?
i have 3 field and 1 button

#3 field

name_id = fields.Many2one(comodel_name='oeh.medical.patient',

            string="Nama Pasien", ondelete='set null', index=True)

medical_record = fields.Char(related='name_id.identification_code' , string='Nomor Medical Record', invisible=True)

check_medical_record = fields.Char(string='Masukan Medical Record')

#1 button

 @api.multi

    def action_check_medical_record(self):


first i want to invisible field medical_record that related to name_id..
when user choose name_id, the hidden field medical_record will automatically set the value identification.code from model oeh.medical.patient.. 

After that user must fill the check_medical_record field.. if value from hidden field medical_record is same with check_medical_record then the button will show..




形象
丢弃
相关帖文 回复 查看 活动
1
4月 24
4284
1
10月 20
3201
1
4月 24
1661
1
1月 24
14307
1
9月 18
3676