This question has been flagged
4886 Views

Hi all,

I just downloaded openerp-7.0-20130717-231254.tar.gz. When i try to access the web client on http://x.x.x.x:8069 I get this error: ProgrammingError: column res_users.menu_id does not exist.

I checked the file base.sql and it create the table res_users like this

CREATE TABLE res_users ( id serial NOT NULL, active boolean default True, login varchar(64) NOT NULL UNIQUE, password varchar(64) default null, -- No FK references below, will be added later by ORM -- (when the destination rows exist) company_id int, partner_id int, primary key(id) );

Then, looking at the file addons/base/res/res_users.py it seems like more columns are used.

_columns = {
    'id': fields.integer('ID'),
    'login_date': fields.date('Latest connection', select=1),
    'partner_id': fields.many2one('res.partner', required=True,
     string='Related Partner', ondelete='restrict',
        help='Partner-related data of the user'),
    'login': fields.char('Login', size=64, required=True,
        help="Used to log into the system"),
    'password': fields.char('Password', size=64, invisible=True,
        help="Keep empty if you don't want the user to be able to connect on the system."),
    'new_password': fields.function(_get_password, type='char', size=64,
        fnct_inv=_set_new_password, string='Set Password',
        help="Specify a value only when creating a user or if you're "\
             "changing the user's password, otherwise leave empty. After "\
             "a change of password, the user has to login again."),
    'signature': fields.text('Signature'),
    'active': fields.boolean('Active'),
    'action_id': fields.many2one('ir.actions.actions', 'Home Action', help="If specified, this action will be opened at logon for this user, in addition to the standard menu."),
    'menu_id': fields.many2one('ir.actions.actions', 'Menu Action', help="If specified, the action will replace the standard menu for this user."),
    'groups_id': fields.many2many('res.groups', 'res_groups_users_rel', 'uid', 'gid', 'Groups'),
    # Special behavior for this field: res.company.search() will only return the companies
    # available to the current user (should be the user's companies?), when the user_preference
    # context is set.
    'company_id': fields.many2one('res.company', 'Company', required=True,
        help='The company this user is currently working for.', context={'user_preference': True}),
    'company_ids':fields.many2many('res.company','res_company_users_rel','user_id','cid','Companies'),
    # backward compatibility fields
    'user_email': fields.related('email', type='char',
        deprecated='Use the email field instead of user_email. This field will be removed with OpenERP 7.1.'),
}

Please someone explain what is wrong here? And also point out a solution ?

Regards, Martin

Avatar
Discard
Author

Can someone please tell me what is wrong here? why does res_users table not have all fields used in the software?

Author

Got it! upgraded to postgres 8.4 and then it worked!