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

Cannot create invoices: column account_invoice_line.purchase_line_id does not exist

By
Matthew Laney
on 11/1/13, 4:51 PM 1,198 views

Here is the traceback. Can anyone help explain what is wrong here?

OpenERP Server Error

Client Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, 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 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, 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 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/mail/mail_thread.py", line 242, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4473, in create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/usr/lib/pymodules/python2.7/openerp/osv/fields.py", line 560, in set
    result += obj._store_get_values(cr, user, [id_new], act[2].keys(), context)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4541, in _store_get_values
    fresults[fid] = [id2 for id2 in function[id_mapping_fnct_](self, cr, SUPERUSER_ID, ids, context) if id2]
  File "/usr/lib/pymodules/python2.7/openerp/addons/account/account_invoice.py", line 164, in _get_invoice_line
    result[line.invoice_id.id] = True
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 486, in __getattr__
    return self[name]
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 401, 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/osv/orm.py", line 3608, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 3660, in _read_flat
    cr.execute(query, [tuple(sub_ids)] + rule_params)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column account_invoice_line.purchase_line_id does not exist
LINE 1: ...ny_id",account_invoice_line."account_analytic_id",account_in...
0

Acespritech

--Acespritech--
839
| 3 2 6
India
--Acespritech--

Having 8+ years of OpenERP Experience. We are Specialized in OpenERP/CRM Solutions, software development, Web development, E commerce solutions & other open source solutions.


Skype : acespritech

Email : info@acespritech.com

Acespritech
On 11/2/13, 3:57 AM

Hi Matthew,

You are trying to do some operation(fetch,delete,create,update) on purchase_line_id of account invoice line object.

The problem is the field purchase_line_id is not there in the database of account invoice line object.
There maybe some possibilities you are getting this error:

  1. Maybe you want to fetch purchase line id value from other object but by mistake you've specified wrong object(account invoice line) name.
  2. Maybe the field(purchase_line_id) which is defined in the module is not loaded in the database.
  3. Maybe you are trying to perform some operations on purchase_line_id before defining it.

Apply above possibilities then you'll surely get the solution or the cause of error.

Thanks,
www.acespritech.com

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

2 follower(s)

Stats

Asked: 11/1/13, 4:51 PM
Seen: 1198 times
Last updated: 3/16/15, 8:10 AM