Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Uncaught TypeError: value.split is not a function

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
functionerrornotsplitodoo11
2 Odpowiedzi
17915 Widoki
Awatar
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
Awatar
Odrzuć
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

Awatar
Jignesh Mehta
Najlepsza odpowiedź

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
Awatar
Odrzuć
Chaanto
Autor

Hello Jignesh Mehta,

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

Uncaught TypeError: Cannot read property 'split' of undefined

Awatar
Janbaz Aga
Najlepsza odpowiedź

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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Uncaught TypeError: value.split is not a function Rozwiązane
function error not split odoo11
Awatar
Awatar
Awatar
3
gru 19
14999
"The character encoding of the HTML document was not declared" when connecting to odoo11 server
error odoo11
Awatar
0
lis 21
4073
Error: The field `effective_date` does not exist - odoo 11
error odoo11
Awatar
Awatar
1
lis 19
5826
Odoo Server Error "unable to create thread pipe"
error reporting odoo11
Awatar
0
sty 22
4906
AttributeError: 'list' object has no attribute 'get'
error docker odoo11
Awatar
Awatar
1
sie 19
13783
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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