i want to use write_date from crm_history,but my odoo code always use write date from the crm_lead
one2manyfield:
'history_id': fields.one2many('crm.history', 'form_id'), #form id is the ID from crm_lead table
Implementation:
#these codes is from crm_lead model
@api.multi
@api.depends('history_id.write_date')
def _apply_prospect_date(self):
for record in self:
if record.write_date != False:
record.prospect_date = record.write_date #this part always use crm_lead write_date while i want to get from crm_history
thanks in advance