当前位置: 动力学知识库 > 问答 > 编程问答 >

inheritance - Why "sequence" field not found in inherited class(ir_model_fields) in Odoo V8 while uninstalling custom module?

问题描述:

Note :

I had added 'sequence' field in class named ir.model.fields

I am trying to uninstall customized module as below but system shows below Error log

My customized code:

from openerp.osv import fields, osv

class ir_model_fields(osv.osv):

_inherit = 'ir.model.fields'

_order = 'sequence'

_columns = {

'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list."),

}

Error log

Please find Error log When uninstalling the custom module: File

"/home/odoo-erp/workspace/8odoo/openerp/models.py", line 3273, in

_read_from_database order_str = self._generate_order_by(None, query) File "/home/odoo-erp/workspace/8odoo/openerp/models.py", line 4652, in

_generate_order_by order_by_elements = self._generate_order_by_inner(self._table, order_spec, query) File

"/home/odoo-erp/workspace/8odoo/openerp/models.py", line 4631, in

_generate_order_by_inner

raise ValueError(_("Sorting field %s not found on model %s") % (order_field, self._name))

ValueError: Sorting field sequence not found on model ir.model.fields

Expected Result : Module should be uninstalled

Thanks.

分享给朋友:
您可能感兴趣的文章:
随机阅读: