Odoo Ayuda

0

0
3 Answers
0
Sameer
25/4/19 6:13

I think a fields_view_get method would be of use to you in this case. fields_view_get method is executed whenever a view loads. Try this below code.

@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False):
res = super(ChrimsAccountGroup, self).fields_view_get(view_id=view_id, view_type=view_type,
toolbar=toolbar, submenu=submenu)
# Write your code here which should be executed on view load
return res

Hope it solves your issue.


0
Rishan Malaka
25/4/19 4:36

call your function on default create function.

@api.model
def create(self, values):
# Call your function here
autoRun()
return super(test, self).create(values)


Realizar una pregunta
Keep Informed
1 seguidor(es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now