请告诉我; 在 OpenERP 7 中,我创建了两个类和从这些类生成的两个表。最后我调用了这些类,例如 checkroll() 和 workoffer()。现在它的工作完美&事情是想要从一个类生成的两个表是错误的或根据openERP标准正确。?还有其他方法可以实现吗?
from openerp.osv import fields, osv
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()
class workoffer(osv.osv):
_name = "checkroll.work.offer"
_description = "This table is for keeping work offer data"
_columns = {
'date': fields.date("Date"),
'division': fields.char('Division', size=256, required=True),
'work' : fields.selection((('plucking', 'Plucking'), ('tapping', 'Tapping'), ('sundry_worker', 'Sundry Worker')), 'Work', required=True),
'epf_no':fields.char('EPF Number', size=256)
}
workoffer()