Skip to Content
Menu
This question has been flagged
1 Reply
3301 Views

Hello Everyone.. 

I have a button in my form view from which a pop up window is open for a particular employee..on this pop up window.. i have a new button for employee salary detail. which brings detail about salary of employee on line level...but when i open pop up window and make some inputs and confirm it..this record is not saving.. i also pass res_id : self.id.

please help me..

Avatar
Discard
Best Answer

Hi,

Can you try passing the res_id like in below function.

def button_action(self):
  ctx = self.env['model.popup']
  model = ctx.create({
'reference'self.id,
'employee_details_line': [(0, 0, {
'employee_id'self.employee_id.id,
'salary'self.employee_id.salary,

})]
  })
return {
'name''Salary Details',
'type''ir.actions.act_window',
'res_model''model.popup',
'view_mode''form',
'view_type''form',
'target''current',
'res_id': model.id
  }

Regards

Avatar
Discard