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

unable to add column in res.users table

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
_inherits
17 Replies
25691 Tampilan
Avatar
Prakash

In OpenERP 7.0-20131109-002558 added the below code:-

class res_users(osv.osv): 
      _inherit = "res.users" 

      _columns = {
            'fieldname_id'  : fields.many2one("master.table",  "Data"),
      }

res_users()

Depends added in __openerp__.py

"depends" :  ["base", "master_module"],

xml Code

<?xml version="1.0"?>
<openerp>
    <data>
    <record model="ir.ui.view" id="view_resuser_field_form">
        <field name="name">resusers_field_form</field>
        <field name="model">res.users</field>
        <field name="inherit_id" ref="base.view_users_form"/>
        <field name="type">form</field>
        <field name="arch" type="xml">
        <xpath expr="//notebook" position="inside">
            <page string="Exta Details">
               <group col="4">
                  <field name="fieldname_id"/>
                </group>
             </page>
        </xpath>
        </field>
    </record>
    </data>
</openerp>

After restarting the server its shows blank white page in the log file below error shows:-

File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\openerp\addons\base\res\res_users.py", line 363, in context_get
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\.\openerp\osv\orm.py", line 486, in __getattr__
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\.\openerp\osv\orm.py", line 401, in __getitem__
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\openerp\addons\base\res\res_users.py", line 810, in read
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\openerp\addons\base\res\res_users.py", line 272, in read
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\.\openerp\osv\orm.py", line 3612, in read
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\.\openerp\osv\orm.py", line 3664, in _read_flat
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\.\openerp\sql_db.py", line 161, in wrapper
  File "D:\Program Files\OpenERP 7.0-20131109-002558\Server\server\.\openerp\sql_db.py", line 226, in execute
ProgrammingError: column res_users.fieldname_id does not exist
LINE 1: ...",res_users."gmail_password",res_users."alias_id",res_users....
                                                             ^

2014-04-08 09:40:41,312 2544 INFO cvw_new werkzeug: 127.0.0.1 - - [08/Apr/2014 09:40:41] "POST /web/session/get_session_info HTTP/1.1" 200 -

Note: using inherit able to add column in other table

1
Avatar
Buang
Avatar
Niyas Raphy (Walnut Software Solutions)
Jawaban Terbai

Hi,

In this case, when you add fields to res.partner model or res.users model, try to upgrade the corresponding module from the command line as the user interface wont be accessible due to the internal server error.

To upgrade the module from the command line / terminal:

odoo-bin -c odoo.conf -d database_name -u module_name


See an example here:  How To Upgrade Module From Terminal in Odoo


Another trick way you can follow is that, before restarting the service, open the corresponding apps page, open the app to upgrade in apps menu, immediately after restarting the service click the upgrade button.


Thanks
4
Avatar
Buang
Avatar
Brett Lehrer
Jawaban Terbai

This is caused by an OpenERP bug modifying res.users or res.partner in an already installed module. Before the module is upgraded, new fields are found on startup since the module itself has already been installed, and it's trying to run a flat query on them before you get a chance to upgrade! Try manually starting the server:

./openerp-server -c server_config_file.conf -d mydatabase -u this_modified_module

This will upgrade the module this_modified_module in your database "mydatabase" as the server starts itself up, which gets around this bug.

3
Avatar
Buang
Prakash
Penulis

Thanks for giving information. I am using windows i already fixed issues by adding column in pg_admin directly and updating the module.

Avatar
Med Said BARA
Jawaban Terbai

Is the master_module, the module you are trying to install or a module already installed ?

0
Avatar
Buang
Avatar
Jagdish Panchal
Jawaban Terbai

Hi,

Try this code

class res_users(osv.Model):
    _inherit = 'res.users'
    _columns = {
            'fieldname_id'  : fields.many2one("master.table",  "Data"),
      }
res_users()

<openerp>
    <data>


        <record id="view_users_form_inherit" model="ir.ui.view">
            <field name="name">res.users.form.inherit</field>
            <field name="model">res.users</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="base.view_users_form"/>
            <field name="arch" type="xml">
            <xpath expr="//notebook" position="inside">
                <page string="Exta Details">
                   <group col="4">
                      <field name="manager_id" invisible='1'/>
                    </group>
                 </page>
            </xpath>

            </field>
        </record>

    </data>
</openerp>
0
Avatar
Buang
Prakash
Penulis

i already tried its shows same error

Jagdish Panchal

Can u give your xml file ?

Prakash
Penulis

Hi jack updated xml file.

Jagdish Panchal

Update ans pls check

Prakash
Penulis

updated your source code and checked it shows same error.

Jagdish Panchal

pls upgrade your module with my code because its woking at my end.

Prakash
Penulis

In my case after restarting server its shows blank page. At the log file shows same error.

Jagdish Panchal

its shows blank page ? means its add Page "Exta Details" on User Form ?

Prakash
Penulis

After typing http://localhost:8069 its shows blank white page unable to create field in res_users table using python file. I fixed the issue by created the field using pgadmin tools.

Jagdish Panchal

Nice, but this code is working at my end

Serge

You do a --update on your module ?

where you added :"depends" : ["base", "master_module"], ??????

Avatar
Mihir Dave
Jawaban Terbai

Try updating the module from command line itself. using

python openerp-server  -c config_file.conf -u <module name>

You can even select database using -d <db_name>

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
how to change default digits of precision?
_inherits
Avatar
Avatar
1
Des 18
20377
Reg - _inherits OpenERP
_inherits
Avatar
Avatar
1
Jul 15
7791
TypeError: The model "fleet.vehicle" specifies an unexisting parent class "fleet.vehicle"
_inherits
Avatar
Avatar
Avatar
2
Mar 15
9631
aading a new menuitem in fleet module
_inherits
Avatar
Avatar
2
Mar 15
6155
inherited view from base_calendar view
_inherits
Avatar
Avatar
2
Mar 15
11457
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