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

Error:

Uncaught TypeError: value.split is not a function


http://localhost:8099/web/content/417-9eb0f92/web.assets_backend.js:1036

Traceback:

TypeError: value.split is not a function

    at Class._getDisplayName (http://localhost:8099/web/content/417-9eb0f92/web.assets_backend.js:1036:101)

    at http://localhost:8099/web/content/417-9eb0f92/web.assets_backend.js:1041:219

    at Function._.map._.collect (http://localhost:8099/web/content/383-91f685c/web.assets_common.js:13:270)

    at Object.<anonymous> (http://localhost:8099/web/content/417-9eb0f92/web.assets_backend.js:1041:186)

    at Object.<anonymous> (http://localhost:8099/web/content/383-91f685c/web.assets_common.js:802:681)

    at fire (http://localhost:8099/web/content/383-91f685c/web.assets_common.js:796:299)

    at Object.fireWith [as resolveWith] (http://localhost:8099/web/content/383-91f685c/web.assets_common.js:801:198)

    at Object.deferred.<computed> [as resolve] (http://localhost:8099/web/content/383-91f685c/web.assets_common.js:803:56)

    at Object.<anonymous> (http://localhost:8099/web/content/383-91f685c/web.assets_common.js:3869:358)

    at Object.<anonymous> (http://localhost:8099/web/content/383-91f685c/web.assets_common.js:802:681)


CODE >>>> 

@api.multi
def name_get(self):
res = []
for select in self :
if select.scs_contribut == 'commi' :
name = select.name_commi
elif select.scs_contribut == 'exco':
name = 'Exco From ' + str(select.period_start) + 'to ' + str(select.period_end)
else:
name = select.name_scs
res.append((select.id, name))
return res

 

               



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

1 . Ensure the value of  select.period_start  and select.period_end not equal to false.

Thanks 

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

may be some value of 

select.name_commi  or 

select.name_scs

is False?

Use next 

name = select.name_scs if select.name_scs else "empty"
name = select.name_commi if select.name_commi else "empty"



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ม.ค. 24
16655
0
พ.ย. 21
3226
1
พ.ย. 19
4919
0
ม.ค. 22
3971
1
ส.ค. 19
13783