Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Cannot create crm lead (neither through mail nor manually)

Subscribe

Get notified when there's activity on this post

This question has been flagged
crmodoo11community
2 Replies
4103 Views
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
Discard
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
Author 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
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
Comment activer notification pour odoo CRM
crm
Avatar
Avatar
Avatar
2
Aug 25
1405
CRM - Create autoresponse if new lead was created via Mail
crm
Avatar
Avatar
2
May 25
2311
Get Map View in Odoo CRM based on lead address instead of contact address
crm
Avatar
Avatar
1
Apr 25
2282
CRM management
crm
Avatar
0
Mar 25
2140
Feature request - Assign multiple teams to a stage in the pipeline
crm
Avatar
0
Mar 25
2093
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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