İç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

Column x does not exist error (custom module)

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
inheritancecustom-moduleadd-new-field
2 Cevaplar
23798 Görünümler
Avatar
Glenn

Hello everyone

 

I've added a column to my custom module as show in the example below:

class res_partner(osv.osv): 
_inherit = 'res.partner'
_columns = { 'x_invoice_partner': fields.boolean('Invoice partner', help="Select this if you want to send invoices to this person")

Then I added that field to my custom XML file as shown below:

<record id="view_partner_form" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field eval="1" name="priority"/>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='use_parent_address']" position="after">
<field name="x_invoice_partner"/> </xpath>
</field> </record>

When I save this and restart the server I get this message: "column res_partner.x_invoice_partner does not exist" when I want to login. What exactly am I doing wrong here? Thanks in advance

EDIT: Sorry @zbik apparently I don't have enough karma to react to someone's response, I can't update the module since I get the error message when login. So I can't get past the login screen and thus can't get to the settings. Thanks in advance

 

0
Avatar
Vazgeç
Zbik

You have a spaces or tabs before _inherit and before _columns?

Glenn
Üretici

@zbik Yes I have a tab before both of them, sorry I couldn't properly edit it in the post

Zbik

You have a column 'x_invoice_partner' in database? (you upgrade your module or only restart the server?)

Glenn
Üretici

@zbik I've only restarted the server, I've read something about updating the database with a command in the terminal, is this needed?

Zbik

Maybe add a column in the database manually, should help.

Zbik

You update all modules by (if ubuntu or debian): $su - odoo -s /bin/bash $/usr/bin/openerp-server -d YOURDATABASE -u all --stop-after-init --config="/etc/openerp/openerp-server.conf"

Zbik

If you are logged in, then remove from the database, and you perform Upgrade.

Avatar
Zbik
En İyi Yanıt

Update your module on admin site Settings/Local Modules. You remove filter "Apps", search your module name, open view, and click on "Upgrade".

3
Avatar
Vazgeç
Avatar
Med Said BARA
En İyi Yanıt

To avoid any confusion and If you just want to add a new field "x_invoice_partner'" to the class res_partner and display it in the base.view_partner_form;

Give to your class a distinguished name: my_respartner and use a "Class Inheritance" by adding  _name = 'res.partner' in your class definition.

class my_respartner(osv.osv): 

_name = 'res.partner'

_inherit = 'res.partner' 


_columns = 

     { 'x_invoice_partner': fields.boolean('Invoice partner', help="Select this if you want to send invoices to this person")

 

Do the same for the view in .xml (to avoid any confusion and form name conflict): 

<record id="view_partner_form_sendinvoice" model="ir.ui.view"> or 

<field name="name">res.partner.form.sendinvoice</field>

<field name="model">res.partner</field>

<field name="inherit_id" ref="base.view_partner_form"/>

<field name="arch" type="xml">
<xpath expr="//field[@name='use_parent_address']" position="after">
<field name="x_invoice_partner"/> 

</xpath>
</field>

</record>

Last, respect the indentation.

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
Getting error while extending hr.employee to add custom fields. Can someone help? Çözüldü
employee custom-module add-new-field
Avatar
Avatar
Avatar
5
Ara 22
7821
How to correctly inherit 1 view from 2 different inheritances.
views inheritance inheriting custom-module
Avatar
0
May 21
2763
Can't inherit base.view_partner_form of res.partner
inheritance
Avatar
Avatar
Avatar
Avatar
Avatar
4
Şub 25
4600
Include in inherit from JS class
inheritance
Avatar
Avatar
1
Ağu 24
3188
How to Override a method in parent class in JS Çözüldü
inheritance
Avatar
Avatar
2
Kas 24
4680
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