Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Uncaught TypeError: value.split is not a function

Subscribe

Get notified when there's activity on this post

This question has been flagged
functionerrornotsplitodoo11
2 Replies
17897 Views
Avatar
Chaanto
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 :

class HRContributionTechIndustry(models.Model): _name = 'hr.contribut.tech' _description = 'Contributions to Tech Industry' tech_contribut = fields.Selection([ ('commi', 'International/National Tech Committees'), ('judge', 'Judge/Assessor/Mentor/Author/Speaker of Tech-related Awards, Programmes or Events'), ], string='Tech Industry') name_commi = fields.Char(string='Name of Tech-related Committee', required=False) name_judge = fields.Char(string='Judge/Assessor/Mentor/Author/Speaker of Tech-related Awards, Programmes or Events', required=False) position_judge = fields.Selection([ ('judge', 'Judge'), ('assessor', 'Assessor'), ('author', 'Author'), ('mentor', 'Mentor'), ('speaker', 'Speaker'), ('other', 'Others') ],string='Position') position_commi = fields.Selection([ ('chairman', 'Chairman'), ('cmember', 'Committe Member'), ('other', 'Others') ],string='Position') please_specify = fields.Char('Please Specify') period_start =fields.Date('Start Date') period_end =fields.Date('End Date') @api.model def name_get(self): for select in self : if select.tech_contribut == 'commi' : res = [] for rec in self : name = rec.name_commi res.append((rec.id, name)) return res else : res = [] for rec in self : name = rec.name_judge res.append((rec.id, name)) return res



XML >>>

record model="ir.ui.view" id="hr_contributtech_form_view"> <field name="name">hr.contribut.tech.form</field> <field name="model">hr.contribut.tech</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Contributions to Tech Industry"> <sheet> <group> <field name="tech_contribut" required='1'/> <field name="name_commi" attrs="{'invisible': [('tech_contribut', '!=', 'commi')], 'required': [('tech_contribut', '=', 'commi')]}"/> <field name="name_judge" attrs="{'invisible': [('tech_contribut', '!=', 'judge')], 'required': [('tech_contribut', '=', 'judge')]}"/> <field name="position_judge" attrs="{'invisible': [('tech_contribut', '!=', 'judge')], 'required': [('tech_contribut', '=', 'judge')]}"/> <field name="position_commi" attrs="{'invisible': [('tech_contribut', '!=', 'commi')], 'required': [('tech_contribut', '=', 'commi')]}"/> <field name="please_specify" attrs="{'invisible': [('position_judge', '!=', 'other')], 'required': [('position_judge', '=', 'other')]}"/> <field name="please_specify" attrs="{'invisible': [('position_commi', '!=', 'other')], 'required': [('position_commi', '=', 'other')]}"/> <field name="period_start" required='True'/> <field name="period_end" required='1'/> </group> </sheet> </form> </field> </record> <record id="hr_contributtech_search_view" model="ir.ui.view"> <field name="name">hr.contribut.tech.search</field> <field name="model">hr.contribut.tech</field> <field name="arch" type="xml"> <search string="Event Name"> <field name="name_commi"/> <field name="name_judge"/> </search> </field> </record> <record model="ir.actions.act_window" id="action_hr_contributtech"> <field name="name">Contributions to Tech Industry</field> <field name="type">ir.actions.act_window</field> <field name="res_model">hr.contribut.tech</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> <field name="view_id" ref="hr_contributtech_tree_view"/> <!--<field name="search_view_id" ref="hr_contributtech_search_view"/>--> </record> <menuitem action="action_hr_contributtech" id="menu_hr_contributtech" parent="menu_participant_config" sequence="15"/>

0
Avatar
Discard
Yenthe Van Ginneken (Mainframe Monkey)

Update your code to the latest version. If the issue is still here then please report it at https://github.com/odoo/odoo

Avatar
Jignesh Mehta
Best Answer

Hello Chaanto,


Please try below code:

@api.multi
def name_get(self):
    result = []
    for select in self:
        if select.tech_contribut == 'commi' :
            name = rec.name_commi
        else:
            name = rec.name_judge
        result.append((select.id, name))
    return result


Hope it will works for you.

Thanks,

1
Avatar
Discard
Chaanto
Author

Hello Jignesh Mehta,

i already tried it before but it still got an error.

Uncaught TypeError: Cannot read property 'split' of undefined

Avatar
Janbaz Aga
Best Answer

Hello Chaanto,
    This issue is because in the  name  you are not using type string

@ api.multi
def name_get (self):
    result = []
    for select in self:
        if select.tech_contribut == 'commi':
            name = rec.name_commi
        else:
            name = rec.name_judge
        result.append ((select.id, name)) # In this 'name' field should be string
    return result

Please try the above code It will works
Thanks

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Uncaught TypeError: value.split is not a function Solved
function error not split odoo11
Avatar
Avatar
Avatar
3
दिस॰ 19
14985
"The character encoding of the HTML document was not declared" when connecting to odoo11 server
error odoo11
Avatar
0
नव॰ 21
4066
Error: The field `effective_date` does not exist - odoo 11
error odoo11
Avatar
Avatar
1
नव॰ 19
5825
Odoo Server Error "unable to create thread pipe"
error reporting odoo11
Avatar
0
जन॰ 22
4903
AttributeError: 'list' object has no attribute 'get'
error docker odoo11
Avatar
Avatar
1
अग॰ 19
13783
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now