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 new database

Subscribe

Get notified when there's activity on this post

This question has been flagged
databasecreatepostgresqlodooOdoo13.0
2 Replies
8420 Views
Avatar
Syrine

Hello odoo community,

I am using odoo 13E,postgresql 12.5 and everything was working normally, and then when i create a new database I got an internal server error.

This is my log:

Traceback (most recent call last):

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 139, in dispatch_rpc

    result = dispatch(method, params)

  File "/home/syrine/Documents/odoo13/odoo/service/db.py", line 451, in dispatch

    return g[exp_method_name](*params)

  File "<decorator-gen-4>", line 2, in exp_create_database

  File "/home/syrine/Documents/odoo13/odoo/service/db.py", line 40, in if_db_mgt_enabled

    return method(self, *args, **kwargs)

  File "/home/syrine/Documents/odoo13/odoo/service/db.py", line 118, in exp_create_database

    _create_empty_database(db_name)

  File "/home/syrine/Documents/odoo13/odoo/service/db.py", line 103, in _create_empty_database

    raise DatabaseExists("database %r already exists!" % (name,))

odoo.service.db.DatabaseExists: database 'database11' already exists!

2021-02-27 21:26:33,493 38529 INFO None odoo.sql_db: ConnectionPool(used=0/count=9/max=64): Closed 1 connections to 'user=odoo13 password=xxx dbname=database11 host=localhost port=5432 sslmode=prefer' 

2021-02-27 21:26:33,493 38529 INFO None odoo.sql_db: ConnectionPool(used=0/count=8/max=64): Closed 1 connections to 'user=odoo13 password=xxx dbname=new_db04 host=localhost port=5432 sslmode=prefer' 

2021-02-27 21:26:33,508 38529 INFO None werkzeug: 127.0.0.1 - - [27/Feb/2021 21:26:33] "POST /web/database/create HTTP/1.1" 200 - 34 0.021 0.247

2021-02-27 21:26:36,706 38529 INFO new_db04 werkzeug: 127.0.0.1 - - [27/Feb/2021 21:26:36] "GET /web?db=database11 HTTP/1.1" 302 - 1 0.001 0.013

2021-02-27 21:26:36,734 38529 INFO ? odoo.http: Generating nondb routing 

2021-02-27 21:26:36,739 38529 INFO ? werkzeug: 127.0.0.1 - - [27/Feb/2021 21:26:36] "GET /web?db=database11 HTTP/1.1" 302 - 1 0.002 0.010

2021-02-27 21:26:36,768 38529 INFO database11 odoo.modules.loading: loading 1 modules... 

2021-02-27 21:26:36,777 38529 INFO database11 odoo.modules.loading: 1 modules loaded in 0.01s, 0 queries 

2021-02-27 21:26:36,802 38529 INFO database11 odoo.modules.loading: Modules loaded. 

2021-02-27 21:26:36,804 38529 INFO database11 odoo.addons.base.models.ir_http: Generating routing map for key None 

2021-02-27 21:26:36,808 38529 INFO database11 werkzeug: 127.0.0.1 - - [27/Feb/2021 21:26:36] "GET /web?db%3Ddatabase11 HTTP/1.1" 303 - 12 0.006 0.043

2021-02-27 21:26:36,881 38529 INFO database11 werkzeug: 127.0.0.1 - - [27/Feb/2021 21:26:36] "GET /web/login HTTP/1.1" 500 - 4 0.002 0.046

2021-02-27 21:26:36,886 38529 ERROR database11 werkzeug: Error on request:

Traceback (most recent call last):

  File "/home/syrine/Documents/odoo13/venv_13/lib/python3.7/site-packages/werkzeug/serving.py", line 270, in run_wsgi

    execute(self.server.app)

  File "/home/syrine/Documents/odoo13/venv_13/lib/python3.7/site-packages/werkzeug/serving.py", line 258, in execute

    application_iter = app(environ, start_response)

  File "/home/syrine/Documents/odoo13/odoo/service/server.py", line 439, in app

    return self.app(e, s)

  File "/home/syrine/Documents/odoo13/odoo/service/wsgi_server.py", line 142, in application

    return application_unproxied(environ, start_response)

  File "/home/syrine/Documents/odoo13/odoo/service/wsgi_server.py", line 117, in application_unproxied

    result = odoo.http.root(environ, start_response)

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 1287, in __call__

    return self.dispatch(environ, start_response)

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 1257, in __call__

    return self.app(environ, start_wrapped)

  File "/home/syrine/Documents/odoo13/venv_13/lib/python3.7/site-packages/werkzeug/wsgi.py", line 766, in __call__

    return self.app(environ, start_response)

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 1457, in dispatch

    result = ir_http._dispatch()

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_http.py", line 238, in _dispatch

    return cls._handle_exception(e)

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_http.py", line 206, in _handle_exception

    return request._handle_exception(exception)

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 750, in _handle_exception

    return super(HttpRequest, self)._handle_exception(exception)

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/home/syrine/Documents/odoo13/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_http.py", line 234, in _dispatch

    result = request.dispatch()

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 809, in dispatch

    r = self._call_function(**self.params)

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 350, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/home/syrine/Documents/odoo13/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 342, in checked_call

    result.flatten()

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 1236, in flatten

    self.response.append(self.render())

  File "/home/syrine/Documents/odoo13/odoo/http.py", line 1229, in render

    return env["ir.ui.view"].render_template(self.template, self.qcontext)

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_ui_view.py", line 1191, in render_template

    return self.browse(self.get_view_id(template)).render(values, engine)

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_ui_view.py", line 1087, in get_view_id

    return view and view.id or self.env['ir.model.data'].xmlid_to_res_id(template, raise_if_not_found=True)

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_model.py", line 1694, in xmlid_to_res_id

    return self.xmlid_to_res_model_res_id(xmlid, raise_if_not_found)[1]

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_model.py", line 1685, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-25>", line 2, in xmlid_lookup

    

  File "/home/syrine/Documents/odoo13/odoo/tools/cache.py", line 90, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_model.py", line 1674, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

ValueError: External ID not found in the system: web.login - - -

2021-02-27 21:27:22,407 38529 WARNING ? odoo.addons.base.models.ir_cron: Skipping database new_db04 because of modules to install/upgrade/remove.





I used an existed database and try to install any app i got this :




Odoo Server Error
Traceback (most recent call last): File "/home/syrine/Documents/odoo13/odoo/http.py", line 624, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/syrine/Documents/odoo13/odoo/http.py", line 310, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/syrine/Documents/odoo13/odoo/tools/pycompat.py", line 14, in reraise raise value File "/home/syrine/Documents/odoo13/odoo/http.py", line 669, in dispatch result = self._call_function(**self.params) File "/home/syrine/Documents/odoo13/odoo/http.py", line 350, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/syrine/Documents/odoo13/odoo/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/home/syrine/Documents/odoo13/odoo/http.py", line 339, in checked_call result = self.endpoint(*a, **kw) File "/home/syrine/Documents/odoo13/odoo/http.py", line 915, in __call__ return self.method(*args, **kw) File "/home/syrine/Documents/odoo13/odoo/http.py", line 515, in response_wrap response = f(*args, **kw) File "/home/syrine/Documents/odoo13/addons/web/controllers/main.py", line 1331, in call_button action = self._call_kw(model, method, args, kwargs) File "/home/syrine/Documents/odoo13/addons/web/controllers/main.py", line 1319, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/home/syrine/Documents/odoo13/odoo/api.py", line 387, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "/home/syrine/Documents/odoo13/odoo/api.py", line 374, in _call_kw_multi result = method(recs, *args, **kwargs) File "<decorator-gen-60>", line 2, in button_immediate_install File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_module.py", line 72, in check_and_log return method(self, *args, **kwargs) File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install return self._button_immediate_function(type(self).button_install) File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function modules.registry.Registry.new(self._cr.dbname, update_module=True) File "/home/syrine/Documents/odoo13/odoo/modules/registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/home/syrine/Documents/odoo13/odoo/modules/loading.py", line 423, in load_modules loaded_modules, update_module, models_to_check) File "/home/syrine/Documents/odoo13/odoo/modules/loading.py", line 315, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "/home/syrine/Documents/odoo13/odoo/modules/loading.py", line 274, in load_module_graph module.flush() File "/home/syrine/Documents/odoo13/odoo/models.py", line 5494, in flush self.recompute() File "/home/syrine/Documents/odoo13/odoo/models.py", line 5936, in recompute process(field) File "/home/syrine/Documents/odoo13/odoo/models.py", line 5920, in process recs.mapped(field.name) File "/home/syrine/Documents/odoo13/odoo/models.py", line 5302, in mapped recs = recs._mapped_func(operator.itemgetter(name)) File "/home/syrine/Documents/odoo13/odoo/models.py", line 5261, in _mapped_func vals = [func(rec) for rec in self] File "/home/syrine/Documents/odoo13/odoo/models.py", line 5261, in <listcomp> vals = [func(rec) for rec in self] File "/home/syrine/Documents/odoo13/odoo/models.py", line 5726, in __getitem__ return self._fields[key].__get__(self, type(self)) File "/home/syrine/Documents/odoo13/odoo/fields.py", line 999, in __get__ self.compute_value(recs) File "/home/syrine/Documents/odoo13/odoo/fields.py", line 1113, in compute_value records._compute_field_value(self) File "/home/syrine/Documents/odoo13/odoo/models.py", line 3998, in _compute_field_value getattr(self, field.compute)() File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_module.py", line 231, in _get_views module.reports_by_module = "\n".join(sorted(r.name for r in browse('ir.actions.reports'))) File "/home/syrine/Documents/odoo13/odoo/addons/base/models/ir_module.py", line 225, in browse return self.env[model].browse(imd_models[model]).exists() File "/home/syrine/Documents/odoo13/odoo/api.py", line 463, in __getitem__ return self.registry[model_name]._browse(self, (), ()) File "/home/syrine/Documents/odoo13/odoo/modules/registry.py", line 177, in __getitem__ return self.models[model_name] KeyError: 'ir.actions.reports'




Any help would be very appreciated 

thank you 

0
Avatar
Discard
Avatar
Kiran K
Best Answer

'database11' is an already existing database. That's why you can't create a new database,

change database name and try

odoo.service.db.DatabaseExists: database 'database11' already exists!

Warning raised because there is a cron job being executed at that moment,
The module operations like install, upgrade, uninstall cant perform when some cron jobs are executing.
 

Hope it helps,

Kiran

1
Avatar
Discard
Divyansh Tripathi

You can check the list of databases present by going to the link /web/database/manager if you can't find the database in the list then there are chances that there are more than one Odoo instances running in your system and Database 11 is already present in any of those instances.

Syrine
Author

That's the problem, there is no database with this name. I have tried this many times.

For cron job, I follow those steps :Settings → Technical → Scheduled Actions

I unchecked the active field for all scheduled actions and still can't install any module,

I got this in my log : KeyError: 'ir.actions.reports' - - -

Avatar
Begineer
Best Answer

Hello,

odoo.service.db.DatabaseExists: database 'database11' already exists!


Your error says database name is duplicated.

Change the database name and try again.

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
psycopg2.ProgrammingError: can't adapt type 'dict'
postgresql odoo Odoo13.0
Avatar
0
May 22
2786
How odoo does this thing?
database postgresql odoo
Avatar
0
Apr 22
2884
Get specific Account_Voucher and Account_Journal for sale_order and sale_order_line
database postgresql odoo
Avatar
0
Jun 20
2792
How to connect to Odoo Database via ODBC
database postgresql odoo ODBC
Avatar
Avatar
Avatar
2
May 24
4989
Database creation error: relation "ir_model" does not exist LIGNE 1 : SELECT * FROM ir_model WHERE state='manual' ^
database create pycharm Odoo13.0
Avatar
0
Feb 22
12434
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