Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

How to uninstall / upgrade a module when web page is not accessible

Odoberať

Get notified when there's activity on this post

This question has been flagged
moduleuninstallupgrade
6 Replies
30452 Zobrazenia
Avatar
Kibong Moon

I installed a custom module which turned out to have error in xml file. I stopped server and fixed the error. But I cannot access any page after server restart.

It seems that the server still has the problematic module. I need to upgrade the module first. But I cannot access upgrade menu.

Is there a way to upgrade or uninstall a module outside the web?

Regards,

Kibong

2
Avatar
Zrušiť
Avatar
Stephen Mack
Best Answer

You can update a module using the command line.

Upgrade would be: odoo.py -d <database> -u <module> -c <config file>

There is no command line option to delete a module

4
Avatar
Zrušiť
Bole

For uninstall module via terminal you can always do: psql - database -c "update ir_module_module set state='uninstalled' where name='module' ;" ... true not realy using orm but that is commandline way to quickly "uninstall" module.. it will not remove any data, just mark the module uninstalled...

iWesabe Technologies

+1

Avatar
Ivan
Best Answer

This is not supposed to be the "proper" way, but this is what I use if the database I am using for developement has been foobared.  Use psql (or PgAdmin III) to access the database, open the ir_module_module table, then change the value of the state field of the module you want to change.  The values are: 'uninstalled', 'to install', 'installed', 'to upgrade', 'to remove'.

You must be very careful so that it does not make the database more foobared:

  • never make modules that are 'uninstalled' to be 'installed' or 'to upgrade'.  Always make it 'to install' so that it is installed properly during the next refresh.
  • never make 'installed' module to be 'uninstalled'.  Always try to go through 'to remove' state first so that it is uninstalled properly
  • never delete any record.  Do it from the UI once it is up.
3
Avatar
Zrušiť
Setiawan

What do you mean by next refresh? How do we refresh the db? Restarting server?

Avatar
Alberto Rubio
Best Answer

You can update modules when web page is not accesible with a psql command.
 

sudo su postgres
psql -d database_name
UPDATE ir_module_module SET state = 'to upgrade' where name = 'module_name';


0
Avatar
Zrušiť
Avatar
Kibong Moon
Autor Best Answer

Dear Stephen & Ivan,

Thank you!

Pardon me that I couldn't leave comment right below your answers due to shortage of karma.

Regards,

Kibong

0
Avatar
Zrušiť
Avatar
Devendra Kavthekar
Best Answer

There are some manual ways but have a look at my pull request:

https://github.com/odoo/odoo/pull/12373

(If a patch link can help: https://patch-diff.githubusercontent.com/raw/odoo/odoo/pull/12373.patch)

And my stackoverflow answer:

http://stackoverflow.com/questions/21485630/how-to-uninstall-manually-openerp-module#answer-41760541

The pull request has been there for a long time but they dont have time. ;)

A Video of how it is helpful:

    https://www.youtube.com/watch?v=7jtmDM0wfFQ

0
Avatar
Zrušiť
Avatar
Dale
Best Answer

Thanks for the above advice


I have tried the command above but I get the error CRITICAL <database> openerp.service.server: Failed to initialize the database. What else can I try?


Below is the error:



odoo@ubuntu:~/addons/website_report$ /opt/odoo/odoo.py -d MMC_Live -u website_report -c /etc/odoo-server.conf

ERROR: couldn't create the logfile directory. Logging to the standard output.

2015-07-14 12:39:49,424 1995 INFO ? openerp: OpenERP version 8.0

2015-07-14 12:39:49,425 1995 INFO ? openerp: addons paths: ['/opt/odoo/.local/share/Odoo/addons/8.0', u'/opt/odoo/addons', '/opt/odoo/openerp/addons']

2015-07-14 12:39:49,425 1995 INFO ? openerp: database hostname: localhost

2015-07-14 12:39:49,425 1995 INFO ? openerp: database port: 5432

2015-07-14 12:39:49,425 1995 INFO ? openerp: database user: odoo

2015-07-14 12:39:49,641 1995 INFO ? openerp.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069

2015-07-14 12:39:49,663 1995 INFO MMC_Live openerp.modules.loading: loading 1 modules...

2015-07-14 12:39:49,902 1995 INFO MMC_Live openerp.modules.loading: 1 modules loaded in 0.24s, 0 queries

2015-07-14 12:39:52,791 1995 CRITICAL MMC_Live openerp.service.server: Failed to initialize database `MMC_Live`.

Traceback (most recent call last):

File "/opt/odoo/openerp/service/server.py", line 909, in preload_registries

registry = RegistryManager.new(dbname, update_module=update_module)

File "/opt/odoo/openerp/modules/registry.py", line 366, in new

openerp.modules.load_modules(registry._db, force_demo, status, update_module)

File "/opt/odoo/openerp/modules/loading.py", line 326, in load_modules

modobj.button_upgrade(cr, SUPERUSER_ID, ids)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

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

File "/opt/odoo/openerp/addons/base/module/module.py", line 542, in button_upgrade

self.update_list(cr, uid)

File "/opt/odoo/openerp/api.py", line 241, in wrapper

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

File "/opt/odoo/openerp/addons/base/module/module.py", line 654, in update_list

handler.load_addons()

File "/opt/odoo/openerp/http.py", line 1298, in load_addons

m = __import__('openerp.addons.' + module)

File "/opt/odoo/openerp/modules/module.py", line 80, in load_module

mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)

File "/opt/odoo/.local/share/Odoo/addons/8.0/auto_backup/__init__.py", line 23, in <module>

import backup_scheduler

File "/opt/odoo/.local/share/Odoo/addons/8.0/auto_backup/backup_scheduler.py", line 33, in <module>

raise ImportError('This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)')

ImportError: This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)

^C2015-07-14 12:40:01,877 1995 INFO MMC_Live openerp.service.server: Initiating shutdown

2015-07-14 12:40:01,877 1995 INFO MMC_Live openerp.service.server: Hit CTRL-C again or send a second signal to force the shutdown.

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Uninstall module programatically using boolean Solved
module uninstall
Avatar
Avatar
1
nov 19
5784
Uninstall Module where the source code is not there anymore Solved
module uninstall
Avatar
1
mar 16
5721
Custom field gets removed on module upgrade? [SOLVED] Solved
module upgrade
Avatar
Avatar
1
mar 15
6208
Can't uninstall module
module uninstall
Avatar
Avatar
1
mar 15
9054
base_partner_merge_automatic__base_partner_merge_automatic_fkey Solved
module upgrade v14
Avatar
1
nov 22
2522
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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