İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

many2many field: "module" violates not-null constraint

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
integrityerrormany2many
3 Cevaplar
5450 Görünümler
Avatar
Fernando Sarabia

Hi!

I have something really strange happening in one of my models.  I am using Odoo 11 and I am trying to create a many2many field, but I get the error below:

- If instead of defining a many2many field I define the field as many2one, everything works perfectly.

- If I use many2many field and set store = False, then model works fine too, but the values are of course, not stored.

- If I remove the store = False, then I get the error below.

As you can see from the error, there is a parameter 'module' that receives a null (None) value.  I have no clue why.

Any insights would be greatly appreciated.

Fernando


2018-10-14 16:28:58,185 26090 ERROR trial_db1 odoo.sql_db: bad query: b" INSERT INTO ir_model_relation (name, date_init, date_update, module, model)\n                        VALUES ('founda_point_founda_point_tag_rel', now() AT TIME ZONE 'UTC', now() AT TIME ZONE 'UTC',\n                                (SELECT id FROM ir_module_module WHERE name=NULL),\n                                (SELECT id FROM ir_model WHERE model='founda.point')) "

ERROR: null value in column "module" violates not-null constraint

DETAIL:  Failing row contains (14, founda_point_founda_point_tag_rel, 129, null, 2018-10-14 16:28:51.967784, 2018-10-14 16:28:51.967784, null, null, null, null).


2018-10-14 16:28:58,188 26090 WARNING trial_db1 odoo.modules.loading: Transient module states were reset

2018-10-14 16:28:58,194 26090 ERROR trial_db1 odoo.modules.registry: Failed to load registry

Traceback (most recent call last):

  File "/opt/odoo_11/server/odoo/modules/registry.py", line 85, in new

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

  File "/opt/odoo_11/server/odoo/modules/loading.py", line 380, in load_modules

    loaded_modules, update_module, models_to_check)

  File "/opt/odoo_11/server/odoo/modules/loading.py", line 274, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/opt/odoo_11/server/odoo/modules/loading.py", line 153, in load_module_graph

    registry.init_models(cr, model_names, {'module': package.name})

  File "/opt/odoo_11/server/odoo/modules/registry.py", line 311, in init_models

    func()

  File "/opt/odoo_11/server/odoo/addons/base/ir/ir_model.py", line 1076, in _reflect_relation

    cr.execute(query, (table, module, model._name))

  File "/opt/odoo_11/server/odoo/sql_db.py", line 155, in wrapper

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

  File "/opt/odoo_11/server/odoo/sql_db.py", line 232, in execute

    res = self._obj.execute(query, params)

psycopg2.IntegrityError: null value in column "module" violates not-null constraint

DETAIL:  Failing row contains (14, founda_point_founda_point_tag_rel, 129, null, 2018-10-14 16:28:51.967784, 2018-10-14 16:28:51.967784, null, null, null, null).

0
Avatar
Vazgeç
Cyril Gaspard (GEM)

Hi,

where is your code ? it's a fields function ?

Bye

Avatar
Fernando Sarabia
Üretici En İyi Yanıt

Hi, this does not happen when creating a record.  The errors occurs before when initializing (installing) the database for the first time.  In addition, 'module' is not a field in the table... or a value that I define...    'module' is an internal variable in ir_model.py that for some reason, is not passing the name of the module, but it is getting a None value.  This does not occur when I define any of the other models in the same model.
In respond to Cyril, this is not a function.  It is a simple model definition with a many2many field.


0
Avatar
Vazgeç
Cyril Gaspard (GEM)

Hi,

no code of your field definition ?

Did you add in module dependencies section in __manifest__.py, the module where is defined relation object you are using in your m2m field ?

Bye

Avatar
Leelapriskila
En İyi Yanıt

Hi,

This is due to your trying to create a record in database with none value for required fields, Try to give values for all the required field before create that record.

(14, founda_point_founda_point_tag_rel, 129, null, 2018-10-14 16:28:51.967784, 2018-10-14 16:28:51.967784, null, null, null, null)  in this record some of the null fields may declared as required .

Regards,

Leelapriskila

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

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
ODOO V16 Associate Parts to a Finished Good
many2many
Avatar
Avatar
1
Şub 24
2900
Custom Model Data in Many2many field without storing in Database
many2many
Avatar
0
Tem 24
4314
Why a new record is creating when selecting in Many2Many field
many2many
Avatar
0
Tem 22
60
How to overwrite field many2many?
many2many
Avatar
Avatar
1
Tem 22
4010
How to apply domain filter on many2many field? Çözüldü
many2many
Avatar
Avatar
Avatar
2
Ara 23
34593
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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