Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
5139 Weergaven

Hello,

I created a button in a new model and trying to change the status bar from status1 to status2 using this button, so I went to server actions and created an action for that by executing a python code. but keeps getting all types of errors.

My question is: what code I should put into this Server Action in order to get executed and the button does its transition

Avatar
Annuleer
Beste antwoord

Hi,
To change state you don't need to create a server action. you can do it in following way in your python file.
def button_name(self):
      self.write({'state': 'status2'})

Regards

Avatar
Annuleer
Auteur

Thank you for the answer it worked!

Gerelateerde posts Antwoorden Weergaven Activiteit
2
jun. 23
3815
4
jan. 22
7224
1
mrt. 15
5181
0
mrt. 23
1782
1
apr. 22
6379