Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

unable to add column in res.users table

Naroči se

Get notified when there's activity on this post

This question has been flagged
_inherits
17 Odgovori
25734 Prikazi
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
Opusti
Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

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
Opusti
Avatar
Brett Lehrer
Best Answer

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
Opusti
Prakash
Avtor

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
Best Answer

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

0
Avatar
Opusti
Avatar
Jagdish Panchal
Best Answer

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
Opusti
Prakash
Avtor

i already tried its shows same error

Jagdish Panchal

Can u give your xml file ?

Prakash
Avtor

Hi jack updated xml file.

Jagdish Panchal

Update ans pls check

Prakash
Avtor

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
Avtor

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
Avtor

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
Best Answer

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
Opusti
Enjoying the discussion? Don't just read, join in!

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
how to change default digits of precision?
_inherits
Avatar
Avatar
1
dec. 18
20392
Reg - _inherits OpenERP
_inherits
Avatar
Avatar
1
jul. 15
7798
TypeError: The model "fleet.vehicle" specifies an unexisting parent class "fleet.vehicle"
_inherits
Avatar
Avatar
Avatar
2
mar. 15
9644
aading a new menuitem in fleet module
_inherits
Avatar
Avatar
2
mar. 15
6165
inherited view from base_calendar view
_inherits
Avatar
Avatar
2
mar. 15
11465
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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