I resolved this problem....
<group string=" ">
<field name="code"/>
<field name="name"/>
<field name="nameBilhetes"/>
<field name="recinto_id" on_change="insert_piso(code,name,nameBilhetes,recinto_id)"/>
</group>
I use the on change method and on the .py i use
I query to insert into the Database.
Please mark this answer with the tick this solution resolve my problem