i have custom module
and have 2 model
class AttendanceSheet(models.Model):
_name = 'attendance.sheet'
_inherit = ['mail.thread.cc', 'mail.activity.mixin']
_description = 'Hr Attendance Sheet'
name = fields.Char("name")
employee_id = fields.Many2one(comodel_name='hr.employee', string='Employee',
required=True)
batch_id = fields.Many2one('attendance.sheet.batch')
.....
class AttendanceSheetBatch(models.Model):
_name = 'attendance.sheet.batch'
name = fields.Char("name")
department_id = fields.Many2one('hr.department', 'Department Name',
required=True)
date_from = fields.Date(string='Date From', readonly=True, required=True,
default=lambda self: fields.Date.to_string(
date.today().replace(day=1)), )
date_to = fields.Date(string='Date To', readonly=True, required=True,
default=lambda self: fields.Date.to_string(
(datetime.now() + relativedelta(months=+1, day=1,
days=-1)).date()))
payslip_batch_id = fields.Many2one(comodel_name='hr.payslip.run',
string='Payslip Batch')
att_sheet_ids = fields.One2many('attendance.sheet', 'batch_id')
.....
i have added all depends
i check security file
change name of one2many and mane2one
all of my solution dosn't work
when i cahnge from one2many to many2many it work
!!!!!!
it work well on test database
but when i add it to stage give me this error
can you help????