Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4520 Widoki

Hello Guys!!!

Can anyone help me know how to change this function to be able to close the popup automatically after clicking on 'Save' Button.

@api.multi

 def test(self,args):

  res_id = False

  for mail in self :

   res_id = mail.id

  view_id = self.env['ir.ui.view'].search([('model', '=', 'hr.employee'), ('name', '=', 'view.hr.employee.form')])

   return {

        'name': "Employee",

        'view_type': 'form',

        'res_model': 'hr.employee',

        'view_mode': 'form',

        'nodestroy': False,

           'views': [[view_id.id, 'form']],

        'res_id': res_id,

        'target': 'new',

        'create': False,

        'context': {},

        'flags': {'form': {'action_buttons': False}}, 

        'type': 'ir.actions.act_window',

   }

Best regards.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
gru 23
6961
0
sie 17
3304
0
mar 21
6463
3
lip 20
20740
2
sty 19
6773