Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Cannot create crm lead (neither through mail nor manually)

Subscriure's

Get notified when there's activity on this post

This question has been flagged
crmodoo11community
2 Respostes
4028 Vistes
Avatar
PeterN

Hi!

My incoming mails don't create crm leads. My log:

2019-01-09 22:47:36,719 4102 ERROR XXXXX odoo.sql_db: bad query: b'INSERT INTO "crm_lead" ("id", "date_open", "message_bounce", "priority", "stage_id", "probability", "type", "color", "team_id", "date_last_stage_update", "active", "company_id", "user_id", "name", "email_from", "email_cc", "partner_id", "partner_name", "contact_name", "title", "street", "street2", "city", "state_id", "country_id", "phone", "mobile", "zip", "function", "website", "opt_out", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval(\'crm_lead_id_seq\'), \'2019-01-09 22:47:36\', 0, \'0\', 1, 0.0, \'lead\', 0, 1, \'2019-01-09 22:47:36\', true, \'False\', NULL, \'test3\', \'XXXXX \', \'\', 1181, NULL, \'Manfred Meyer\', NULL, \'\', \'sdfsf\', \'sdfsd\', NULL, 44, \'+414564654\', NULL, \'1212\', NULL, NULL, false, 5, 5, (now() at time zone \'UTC\'), (now() at time zone \'UTC\')) RETURNING id'
ERROR: invalid input syntax for integer: "False"
LINE 1: ..., 0.0, 'lead', 0, 1, '2019-01-09 22:47:36', true, 'False', N...
                                                             ^

2019-01-09 22:47:36,719 4102 INFO XXXXX odoo.addons.fetchmail.models.fetchmail: Failed to process mail from imap server info@XXXXX.
Traceback (most recent call last):
  File "/home/odoo/odoo-11.0/addons/fetchmail/models/fetchmail.py", line 179, in fetch_mail
    res_id = MailThread.with_context(**additionnal_context).message_process(server.object_id.model, data[0][1], save_original=server.original, strip_attachments=(not server.attach))
  File "/home/odoo/odoo-11.0/addons/mail/models/mail_thread.py", line 1306, in message_process
    thread_id = self.message_route_process(msg_txt, msg, routes)
  File "/home/odoo/odoo-11.0/addons/mail/models/mail_thread.py", line 1215, in message_route_process
    thread = MessageModel.message_new(message_dict, custom_values)
  File "/home/odoo/odoo-11.0/addons/crm/models/crm_lead.py", line 1185, in message_new
    return super(Lead, self).message_new(msg_dict, custom_values=defaults)
  File "/home/odoo/odoo-11.0/addons/mail/models/mail_thread.py", line 1342, in message_new
    return RecordModel.create(data)
  File "/home/odoo/odoo-11.0/addons/crm/models/crm_lead.py", line 298, in create
    return super(Lead, self.with_context(context, mail_create_nolog=True)).create(vals)
  File "/home/odoo/odoo-11.0/addons/mail/models/mail_thread.py", line 238, in create
    thread = super(MailThread, self).create(values)
  File "/home/odoo/odoo-11.0/odoo/models.py", line 3373, in create
    record = self.browse(self._create(old_vals))
  File "/home/odoo/odoo-11.0/odoo/models.py", line 3466, in _create
    cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
  File "/home/odoo/odoo-11.0/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/home/odoo/odoo-11.0/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.DataError: invalid input syntax for integer: "False"
LINE 1: ..., 0.0, 'lead', 0, 1, '2019-01-09 22:47:36', true, 'False', N...
                                                             ^

Also, if I try to manually create a lead, get this error after clicking on 'create' (not if I am Administrator, then it's working...):

Traceback (most recent call last):
  File "/home/odoo/odoo-11.0/odoo/fields.py", line 937, in __get__
    value = record.env.cache.get(record, self)
  File "/home/odoo/odoo-11.0/odoo/api.py", line 960, in get
    value = self._data[field][record.id][key]
KeyError: (<odoo.sql_db.Cursor object at 0x7f1f5473e0f0>, 5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/odoo/odoo-11.0/odoo/http.py", line 651, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/odoo-11.0/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/odoo/odoo-11.0/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/home/odoo/odoo-11.0/odoo/http.py", line 693, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/odoo-11.0/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/odoo-11.0/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/odoo-11.0/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/odoo-11.0/odoo/http.py", line 937, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/odoo-11.0/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/odoo-11.0/addons/web/controllers/main.py", line 934, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/odoo-11.0/addons/web/controllers/main.py", line 926, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/odoo-11.0/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/odoo-11.0/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/odoo/odoo-11.0/odoo/models.py", line 1509, in name_get
    result.append((record.id, convert(record[name], record)))
  File "/home/odoo/odoo-11.0/odoo/models.py", line 4759, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/home/odoo/odoo-11.0/odoo/fields.py", line 941, in __get__
    self.determine_value(record)
  File "/home/odoo/odoo-11.0/odoo/fields.py", line 1042, in determine_value
    record._prefetch_field(self)
  File "/home/odoo/odoo-11.0/odoo/models.py", line 2647, in _prefetch_field
    result = records.read([f.name for f in fs], load='_classic_write')
  File "/home/odoo/odoo-11.0/odoo/models.py", line 2591, in read
    self._read_from_database(stored, inherited)
  File "/home/odoo/odoo-11.0/odoo/models.py", line 2710, in _read_from_database
    cr.execute(query_str, params)
  File "/home/odoo/odoo-11.0/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/home/odoo/odoo-11.0/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.DataError: invalid input syntax for integer: "False"
LINE 16: ...overdue_msg"."res_id") WHERE "res_company".id IN ('False') A...
                                                              ^


0
Avatar
Descartar
Yenthe Van Ginneken (Mainframe Monkey)

Can you still reproduce it on the latest Odoo? Update your source code, update the module and try again.

Avatar
PeterN
Autor Best Answer

I just updated my odoo, upgraded the crm-app, but I am still getting this error!

EDIT: Problem solved. I set some crm-default values in odoo8 that were causing these problems. After removing them everything is working.

Thank you for your help.

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
Comment activer notification pour odoo CRM
crm
Avatar
Avatar
Avatar
2
d’ag. 25
1320
CRM - Create autoresponse if new lead was created via Mail
crm
Avatar
Avatar
2
de maig 25
2232
Get Map View in Odoo CRM based on lead address instead of contact address
crm
Avatar
Avatar
1
d’abr. 25
2189
CRM management
crm
Avatar
0
de març 25
2058
Feature request - Assign multiple teams to a stage in the pipeline
crm
Avatar
0
de març 25
2018
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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