Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4485 มุมมอง

I have tree view in some model and i want to invisible full row depends on another model 

This is the field

pme_pmcrecid = fields.Many2one(string="Category", comodel_name="pmcategories" ,required=True )


inside the pmcategories i have disable button i want to hide full row when the button inside is TRUE

This is the model

class CategoryPreventive(models.Model):
 
_name = "pmcategories"
_description = "Preventive Category"
_rec_name ="cate_des"
 
cate_des = fields.Char(string="Category Description ", required=True)
pmc_disable = fields.Boolean(string='Disable', default=False)
pmc_code = fields.Char('Code',readonly=True , required=True , copy=False , default='New')
pmc_sortorder = fields.Integer('Sort Order' , default='1')


Xml for the main model

" rel="ugc">ir.ui.view">
pmentry.tree
pmentry


















 


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

it does not work the way i want it to work


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I guess you have to put a boolean in "pmcategory" and program the "onchange" of that field, then all you need to do is put the list inside a "group" with an invisible attribute if boolean=true

อวตาร
ละทิ้ง
ผู้เขียน

there is boolean inside the same model but how can i link can you explain more

something like this
<field name="employee_id" domain="[('user_id', '=', user_id)]" />

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 25
2291
2
ก.ค. 25
7758
2
ก.ค. 25
4181
2
ก.ค. 25
3958
2
มิ.ย. 25
2559