当我要卸载自己的模块时,它会出错。(OpenErp ver 7)在我的课堂上我也输入了不同的修改。但我没有清除所有这些东西并只保留以下代码。请帮助我找出问题所在..现在当我尝试安装 address_book 模块时发生了这个错误
File "/home/priyan/Software/openerp-7.0-20130309-002120/openerp/modules/registry.py", line 218, in new
openerp.modules.load_modules(registry.db, force_demo, status, update_module)
File "/home/priyan/Software/openerp-7.0-20130309-002120/openerp/modules/loading.py", line 416, in load_modules
pool.get('ir.module.module').module_uninstall(cr, SUPERUSER_ID, mod_ids_to_remove)
File "/home/priyan/Software/openerp-7.0-20130309-002120/openerp/addons/base/module/module.py", line 439, in module_uninstall
ir_model_constraint._module_data_uninstall(cr, uid, constraint_ids, context)
File "/home/priyan/Software/openerp-7.0-20130309-002120/openerp/addons/base/ir/ir_model.py", line 533, in _module_data_uninstall
WHERE cs.contype=%s and cs.conname=%s and cl.relname=%s""", ('f', name, model_obj._table))
AttributeError: 'NoneType' object has no attribute '_table'
这是我的 view.xml 文件
<?xml version="1.0"?>
<openerp>
<data>
<!-- 1st part of the sim_view start -->
<record model="ir.ui.view" id="worker_form">
<field name="name">Basic Data</field>
<field name="model">checkroll.plucker</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Worker_test">
<field name="reg_no" />
<field name="worker_name" />
<field name="spouse_name" />
<field name="gender" />
<field name="epf_no" />
</form>
</field>
</record>
<!--2nd part of the sim_view start -->
<record model="ir.ui.view" id="worker_tree">
<field name="name">Basic Data</field>
<field name="model">checkroll.plucker</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Worker_test"><!-- which columns need to shows in OpenERP List View -->
<field name="reg_no" />
<field name="worker_name" />
<field name="spouse_name" />
</tree>
</field>
</record>
<!-- 3rd part of the sim_view start -->
<record model="ir.actions.act_window" id="action_worker_reg">
<field name="name">Worker Registration</field><!-- This shows what should
screen caption in form/tree views -->
<field name="res_model">checkroll.plucker</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
</data>
</openerp>
这是我的类文件
from openerp.osv import fields, osv
import random
class checkroll(osv.osv):
_name = "checkroll.plucker"
_description = "This table is for keeping personal data of plucker"
_columns = {
'reg_no': fields.char('Registration Number', size=256, required=True),
'worker_name': fields.char('Worker Name', size=256, required=True),
'spouse_name': fields.char('Spouse Name', size=256),
'gender' : fields.selection((('male', 'Male'), ('female', 'Female'), ('middle', 'Test')), 'Gender', required=True),
'epf_no':fields.char('EPF Number', size=256)
}
checkroll()