Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

CRM App threw error messages after removing fields from tree view

By
Zemekis
on 3/8/13, 1:15 PM 2,124 views

After configuring openERP 7.0 to my needs and installing CRM, I thought it's time to uploaed some leads. Which I did and it worked fine. Just the lead tree view had some fields which were not necessary. So I activated the developer mode and removed the fields from the tree view. However, when I got back I got an error message (field not defined or empty) and the leads wouldn't show anymore. Since I couldn't remember which fields I just removed I thought I uninstall the CRM app and re-install it. Uninstall went without a hitch but re-installation failed. I got the following error message:

OpenERP Server Error

Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1083, in call_button
    action = self._call_kw(req, model, method, args, {})
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1071, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 43, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 295, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/wizard/base_module_upgrade.py", line 90, in upgrade_module
    pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 39, in restart_pool
    registry = RegistryManager.new(db_name, force_demo, status, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 214, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 347, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 258, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 167, in load_module_graph
    init_module_models(cr, package.name, models)
  File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 374, in init_module_models
    result = obj._auto_init(cr, {'module': module_name})
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3162, in _auto_init
    default = self._defaults[k](self, cr, SUPERUSER_ID, context)
  File "/usr/lib/pymodules/python2.7/openerp/addons/crm/crm_lead.py", line 320, in <lambda>
    'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_company.py", line 216, in _company_default_get
    return user.company_id.id
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 484, in __getattr__
    return self[name]
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 399, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 793, in read
    res = super(users_view, self).read(cr, uid, ids, fields, context=context, load=load)
  File "/usr/lib/pymodules/python2.7/openerp/addons/base/res/res_users.py", line 268, in read
    result = super(res_users, self).read(cr, uid, ids, fields=fields, context=context, load=load)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3604, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3680, in _read_flat
    res2 = self.pool.get(table).read(cr, user, [x[col] for x in res], cols, context, load)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3604, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3656, in _read_flat
    cr.execute(query, [tuple(sub_ids)] + rule_params)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 162, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 227, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column res_partner.section_id does not exist
LINE 1: ..._partner."is_company",res_partner."vat_subjected",res_partne...
                                                             ^

So now, I am f**d. Any idea what I can do?

That didn't work. I still get the same error messages. CRM app is displayed without a button in the App section.

And "Start planned Update" shows crm: to install portal_crm: to install portal_hr_employees: to install sale_crm: to install

And when I hit the update button I get that error message.

Zemekis
on 3/8/13, 4:41 PM
2

Daniel Reis

--Daniel Reis--
3436
| 6 7 9
Lisbon, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt


Daniel Reis
On 3/8/13, 5:00 PM
  1. You should never remove standard module fields from the database structure. Instead, edit the view's XML architecture, so they aren't visible for the user.

  2. Updating the module should reinstall it and restore the original settings. The Upgrade option should be available in the Settinngs > Installed Apps menu. Probably a server restart will be required for changes to take effect. Another possibility is to manualy (re)start the OpenERP server addind the option -u crm (update the "crm" module).

0

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 3/8/13, 1:19 PM

You should perform a restart of the server and then retry to install the module.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/8/13, 1:15 PM
Seen: 2124 times
Last updated: 3/16/15, 8:10 AM