Hi all:
I'm trying to change res_partner.py and wanna add some fields in it,but when I restart my pycharm,when I clicked any module,it warns me:
Odoo Server Error
Traceback (most recent call last):
File "D:\odoo\test_1\odoo\api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 13
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\odoo\test_1\odoo\fields.py", line 980, in __get__
value = record.env.cache.get(record, self)
File "D:\odoo\test_1\odoo\api.py", line 1041, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('res.partner(13,).display_name', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\odoo\test_1\odoo\http.py", line 654, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "D:\odoo\test_1\odoo\http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "D:\odoo\test_1\odoo\tools\pycompat.py", line 87, in reraise
raise value
File "D:\odoo\test_1\odoo\http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "D:\odoo\test_1\odoo\http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "D:\odoo\test_1\odoo\service\model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "D:\odoo\test_1\odoo\http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "D:\odoo\test_1\odoo\http.py", line 939, in __call__
return self.method(*args, **kw)
File "D:\odoo\test_1\odoo\http.py", line 517, in response_wrap
response = f(*args, **kw)
File "d:\odoo\test_1\addons\web\controllers\main.py", line 904, in search_read
return self.do_search_read(model, fields, offset, limit, domain, sort)
File "d:\odoo\test_1\addons\web\controllers\main.py", line 926, in do_search_read
offset=offset or 0, limit=limit or False, order=sort or False)
File "D:\odoo\test_1\odoo\models.py", line 4569, in search_read
result = records.read(fields)
File "D:\odoo\test_1\odoo\models.py", line 2787, in read
vals[name] = convert(record[name], record, use_name_get)
File "D:\odoo\test_1\odoo\fields.py", line 2159, in convert_to_read
return (value.id, value.sudo().display_name)
File "D:\odoo\test_1\odoo\fields.py", line 984, in __get__
self.determine_value(record)
File "D:\odoo\test_1\odoo\fields.py", line 1085, in determine_value
record._prefetch_field(self)
File "D:\odoo\test_1\odoo\models.py", line 2832, in _prefetch_field
result = records.read([f.name for f in fs], load='_classic_write')
File "D:\odoo\test_1\odoo\models.py", line 2770, in read
self._read_from_database(stored, inherited)
File "D:\odoo\test_1\odoo\models.py", line 2897, in _read_from_database
cr.execute(query_str, params)
File "D:\odoo\test_1\odoo\sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "D:\odoo\test_1\odoo\sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedColumn: column res_partner.lzqbdk does not exist
LINE 1: ...re" as "partner_share","res_partner"."tz" as "tz","res_partn...
^
So is there a correct way to change base module?
Thanks
Look how to customize odoo modules: https://github.com/sehrishnaz/learnopenerp/wiki