Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
7114 Visualizzazioni

How do we know that we are going to work in record or recordsets (multiple) or model. I just want to use some function in .py file, then how would I know whether i have to work on record, multiple records or in model?

Thanks

Avatar
Abbandona
Risposta migliore

Hi Bhuwan,

It always depends on the logic of your code. Mostly any function gets called from the button, must have api.multi.

If you have a function and you are calling it from another function with multiple recordsets, you should apply api.multi..

If you have another function and you always calls it with single record set, you can use api.one (Better to use api.multi and apply self.ensure_one()).

Avatar
Abbandona
Autore

Will you please suggest me with some example, you know I am a beginner and wants to know more about it? And what about model? Thank you for your reply too.

Post correlati Risposte Visualizzazioni Attività
5
feb 19
10320
1
feb 24
2753
1
giu 22
6438
1
ott 20
8810
2
set 23
61414