# How do I actually user ModelView.\_button

**URL:** https://discuss.tryton.org/t/how-do-i-actually-user-modelview-button/7813
**Category:** Developer
**Created:** [September 9, 2024, 2:54am UTC](https://discuss.tryton.org/t/how-do-i-actually-user-modelview-button/7813 "2024-09-09T02:54:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Siobhan](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@Siobhan](https://discuss.tryton.org/u/Siobhan)
#### Post date: [September 9, 2024, 2:54am UTC](https://discuss.tryton.org/t/how-do-i-actually-user-modelview-button/7813/1 "2024-09-09T02:54:37Z")

</div>

I read the documentation for [model view.\_buttons](https://docs.tryton.org/latest/server/ref/models.html#trytond.model.ModelView._buttons) but honestly i dont know how to use it.

I am using it like this is this right.

```auto
    @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()`

```auto

    face_reg_web = fields.Function(fields.Char('Initialize Face'),
        'on_change_with_face_reg')

```

And this is how I declare XML:

```auto

    <field name="face_reg_web" widget="url"/>

```
