Hi all,
i want to create an ir.actions.server action to open a form with a new record after login
for testing purpose i coded a function in my class
class kskassenbuch(models.Model):
_name = 'ks_sale.kskassenbuch'
@api.model
def serveraction(self):
raise Warning(_('Test action!'))
and in xml:
how can i post xml code? my code is not displayed after saving this post
record id="action_new_kassenbuch" model="ir.actions.server
field name="name">Kassenbuch_Actionfield name="type">ir.actions.server
field name="model_id" ref="model_ks_sale_kskassenbuch"
field name="binding_model_id" ref="model_ks_sale_kskassenbuch"
field name="code">records.serveraction()
record
(i could not post xml code here, so i wrote the xml lines without brackets, sorry)
after running this code i always get the error:
ValueError: : "'NoneType' object has no attribute 'serveraction'" while evaluating 'records.serveraction()'
for me it looks that the class is bind in the action, but i dont know what i've made wrong.
thx for any help