I read the documentation for model view._buttons but honestly i dont know how to use it.
I am using it like this is this right.
@classmethod
@ModelView.button
def on_change_with_face_reg(self, name=None):
return 'http://localhost:8080/face-camera'
I want to send employee_id or emplouyee information to my web app, so after they klick the button or the fields.Function they sent their information to this app.
This is how i decllare fields.fucntion()
face_reg_web = fields.Function(fields.Char('Initialize Face'),
'on_change_with_face_reg')
And this is how I declare XML:
<field name="face_reg_web" widget="url"/>