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

Hi everyone,

Is there anyway to return to kanban view (or some other kind of view) after creating a record?

Thanks in advice

Awatar
Odrzuć

If you mean to return automatically to kanban view after clicking the standard red "Save" button, then not without quite a change in the UI framework. @Bruno had indicated how you can do that if you can live with additional click away.

Autor

Yes @Ivan, I mean that. Because I just inherited and modified the "Save" method from partner, and sometimes the company_id is changed (maybe you remember from some other of my posts...) and that gives me an error when the new partner id is returned (because the user that created it has no permissions into the new company_id) so I just wanted to return to Kanban view after creating the partner instead of returning any other in the function.

Najlepsza odpowiedź

Inherit the  create method

like 

def create(cr,uid,vals,context=none):

super(curent_model).create(cr,uid,vals)

  return {

                     'name' : 'Module name',

                      'view_type' : 'form',

                      'view_mode' : 'form',

                       'view_id': False,

                        'res_model' : 'res.partner',

                        'context' : context,

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

                         'target' : 'current',

                     }

Awatar
Odrzuć
Najlepsza odpowiedź

Just click on the "kanban view" icon on top right after your record is created.

Awatar
Odrzuć
Autor

Thanks for the help, but maybe I did not explained well my question... Check my other comment...

Powiązane posty Odpowiedzi Widoki Czynność
5
sie 24
46761
2
kwi 24
2597
3
cze 23
5912
2
cze 23
4797
3
mar 23
10365