Journal Voucher (JV) import Error (KeyError: 'line_id')

Asked by mm alam

Hi Every one,

I am getting an error (KeyError: 'line_id') while trying to import the Journal Voucher (JV) form. Please help me out from this situation.

The csv file look like the following:

Period/Database ID,Journal/Database ID,Date,Entries/Name,Entries/Account/Database ID,Entries/Debit,Entries/Credit
11,1,2010-05-13,Depreciation For Visiting Faculty Hostel,171,837865.0,
,,,Depreciation For Students Hostel,171,4119504.0,0.0
,,,Depreciation For SIMS,171,2182464.0,0.0
,,,Depreciation For IMS,171,1130982.0,0.0

The error is as follows:

Environment Information :
System : Linux-2.6.31-21-generic-i686-with-Ubuntu-9.10-karmic
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic
Operating System Release : 2.6.31-21-generic
Operating System Version : #59-Ubuntu SMP Wed Mar 24 07:28:56 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.4
OpenERP-Client Version : 5.0.9
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 245, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 74, in __call__
    return getattr(self, method)(*params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base_module_record/base_module_record.py", line 38, in execute
    res = super(recording_objects_proxy, self).execute(*args, **argv)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 576, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 861, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 816, in process_liness
    res = process_liness(self, datas, prefix + [field], current_module, relation_obj._name, newfd, position)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 636, in process_liness
    model_rel = fields_def[field_name]['relation']
KeyError: 'line_id'

Please help me, as where is the problem. I have taken care of each and every step.
The import involves a one2many relationship and i have done as completely prescribed by the OpenERP documentation.

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anup(SerpentCS) (anup-serpent) said :
#1

Hello Masum

    We don't have a field name line_ids in journal Voucher. And If you are importing a csv file. And the field line_ids does not exist in journal voucher so we can not import it either. And also the names Entries/* will not be imported as there is no such name. We have Real Entry Account Entry and Voucher Lines but not Entries. Please recheck it by using the names that exist in the account.voucher.

Thanks.

Can you help with this problem?

Provide an answer of your own, or ask mm alam for more information if necessary.

To post a message you must log in.