hi there,


is it possible to create a button that will just call one function, without creating a Wizard or a Workflow?


ie:


[in party_form.xml]

<button name="say_hello" string="Say Hello" icon="tryton-connect" />


[in party.py, inside the Party class]

def say_hello(cls, parties):
    print "Hello, excuse me, can you tell me where I am..."


when i try this, i get the following dialog box after clicking the button:

"Calling method say_hello on model party.party is not allowed!".


am i doing something wrong? i tried adding "@classmethod" and "@ModelView.button" as decorators, with no luck...


thank you,

yaco\

--
gcoop Cooperativa de Software Libre

Santiago Peresón
[email protected]
http://www.gcoop.coop

Juan Ramirez de Velasco 508 A
Ciudad Autónoma de Buenos Aires, Argentina
(0054 11) 4855-4390

Reply via email to