Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Uncaught TypeError: value.split is not a function

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
functionerrornotsplitodoo11
2 Risposte
17901 Visualizzazioni
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
Abbandona
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
Risposta migliore

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
Abbandona
Chaanto
Autore

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
Risposta migliore

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
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Uncaught TypeError: value.split is not a function Risolto
function error not split odoo11
Avatar
Avatar
Avatar
3
dic 19
14985
"The character encoding of the HTML document was not declared" when connecting to odoo11 server
error odoo11
Avatar
0
nov 21
4066
Error: The field `effective_date` does not exist - odoo 11
error odoo11
Avatar
Avatar
1
nov 19
5825
Odoo Server Error "unable to create thread pipe"
error reporting odoo11
Avatar
0
gen 22
4903
AttributeError: 'list' object has no attribute 'get'
error docker odoo11
Avatar
Avatar
1
ago 19
13783
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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