Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

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

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

openerp 6.1 : no primary key

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
moduleinstall6.1
11 Replies
10555 Tampilan
Avatar
Mohammed Alkathmi

Hi,

I've this error when I try to install a module in openerp 6.1 ProgrammingError: there is no primary key for referenced table "res_users"

Client Traceback (most recent call last):
  File "/home/irachid/Bureau/server/openerp/addons/web/common/http.py", line 180, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/home/irachid/Bureau/server/openerp/addons/web/controllers/main.py", line 1052, in call_button
    action = self.call_common(req, model, method, args, domain_id, context_id)
  File "/home/irachid/Bureau/server/openerp/addons/web/controllers/main.py", line 996, in call_common
    return self._call_kw(req, model, method, args, {})
  File "/home/irachid/Bureau/server/openerp/addons/web/controllers/main.py", line 1010, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/home/irachid/Bureau/server/openerp/addons/web/common/openerplib/main.py", line 250, in proxy
    args, kw)
  File "/home/irachid/Bureau/server/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/home/irachid/Bureau/server/openerp/addons/web/common/http.py", line 608, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)


Server Traceback (most recent call last):
  File "/home/irachid/Bureau/server/openerp/addons/web/common/http.py", line 593, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/irachid/Bureau/server/openerp/netsvc.py", line 360, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/irachid/Bureau/server/openerp/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/irachid/Bureau/server/openerp/osv/osv.py", line 167, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/irachid/Bureau/server/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/irachid/Bureau/server/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/irachid/Bureau/server/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/irachid/Bureau/server/openerp/addons/base/module/module.py", line 361, in button_immediate_install
    db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/irachid/Bureau/server/openerp/pooler.py", line 39, in restart_pool
    registry = RegistryManager.new(db_name, force_demo, status, update_module, True)
  File "/home/irachid/Bureau/server/openerp/modules/registry.py", line 202, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/home/irachid/Bureau/server/openerp/modules/loading.py", line 338, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules)
  File "/home/irachid/Bureau/server/openerp/modules/loading.py", line 253, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules)
  File "/home/irachid/Bureau/server/openerp/modules/loading.py", line 170, in load_module_graph
    init_module_models(cr, package.name, models)
  File "/home/irachid/Bureau/server/openerp/modules/module.py", line 378, in init_module_models
    result = obj._auto_init(cr, {'module': module_name})
  File "/home/irachid/Bureau/server/openerp/osv/orm.py", line 2832, in _auto_init
    self._add_log_columns(cr)
  File "/home/irachid/Bureau/server/openerp/osv/orm.py", line 3126, in _add_log_columns
    cr.execute('ALTER TABLE "%s" ADD COLUMN "%s" %s' % (self._table, field, field_def))
  File "/home/irachid/Bureau/server/openerp/sql_db.py", line 152, in wrapper
    return f(self, *args, **kwargs)
  File "/home/irachid/Bureau/server/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
ProgrammingError: there is no primary key for referenced table "res_users"

Thanks

0
Avatar
Buang
Francesco OpenCode

Can you copy the complete error of the log in a site like paste on in the answer?

Mohammed Alkathmi
Penulis

I updated the post with the whole error, thanks

Francesco OpenCode

Have you deleted an user without delete relative partner?

Mohammed Alkathmi
Penulis

I solved the problem by adding a constraint " CONSTRAINT res_users_pkey PRIMARY KEY (id) " to the table res_users, but the same error appeared for other tables, so I need to add this constraint on th Id field to all tables, have you any idea or script to do these in postgres?

Mohammed Alkathmi
Penulis

No I didn't delete any user, I think that because of the backup of database by openerp web, We have have to backup / restore databases with postgres not throught openerp

Francesco OpenCode

I use to backup database by cli every time and I've not problem

TheBrush

Did you restore database before your installation? maybe the problem was this: https://bugs.launchpad.net/openobject-server/+bug/897098/comments/15

TheBrush

Did you previously restore database before your installation? maybe was that: https://bugs.launchpad.net/openobject-server/+bug/897098/comments/15

Avatar
Gustavo
Jawaban Terbai

res_users has a unique index that builds its primary key. Looks like something is wrong with your database, can you try creating another OpenERP database and checking the res_users table has a primary key?

1
Avatar
Buang
Mohammed Alkathmi
Penulis

I solved the problem by adding a constraint " CONSTRAINT res_users_pkey PRIMARY KEY (id) " to the table res_users, but the same error appeared for other tables, so I need to add this constraint on th Id field to all tables, have you any idea or script to do these in postgres?

Avatar
Michael Karrer
Jawaban Terbai

i do have the same problem on an v8 database - seems that an restore of the database through the odoo webinterface killed my db :( the solution with stopping and starting the service does not help me because my backup is already corrupt (i think) is there a simple way to restore all primary keys?

0
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
odoo-14: I get an error when I try to install a module in Digital Ocean Diselesaikan
module install
Avatar
Avatar
1
Apr 21
6648
Unable to install module Diselesaikan
module install
Avatar
Avatar
2
Apr 15
5451
how to install a module in openerp 7.0 windows?
module install
Avatar
Avatar
1
Mar 15
4943
Click2dial module installation Diselesaikan
module install
Avatar
Avatar
Avatar
Avatar
3
Jan 24
13096
Module Installation fails in OpenERP 6.1
crm module install 6.1 openerp
Avatar
Avatar
1
Mar 15
6836
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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