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

def default_domain_users(self):

at=[]

userx = self.env.user.login

if userx == "bendjeddou.o":

ids_biens=self.env['gmat.journaleline'].search([('exp_P','=',0),('rapJor_ids','=',self.id)])

for item in ids_biens:

at.append(item.bien_id.id)

else:

ids_biens=self.env['gmat.journaleline'].search([('rapJor_ids','=',self.id)])

for item in ids_biens:

at.append(item.bien_id.id)

return [('id','in', at)]

user_filter = fields.Many2one('gmat.nbien',domain=default_domain_users)

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

try self._id or self.ids[0]

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

hi hilari, no working this instruction


อวตาร
ละทิ้ง

then check the self object. and from where this function is called

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 23
20429
1
มี.ค. 15
3863
0
เม.ย. 24
1975
4
พ.ย. 23
6089
0
ต.ค. 23
1826