I get trouble linking a button to a function (python) from my model. I searched on the net but got only few informations for Odoo 8. That is my code right now:
My function from my model (mymodule.service):
def main_val(self, context=None):
if context is None:
context = {}
[...]
The view associated:
<record model="ir.ui.view" id="view_myodule_clients_tree">
<field name="name">mymodule.clients.tree</field>
<field name="model">mymodule.service</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<field name="display_name" position="after">
<button name="main_val" type="object" string="Bill" class="oe_highlight" />
</field>
</field>
</record>
I keep having this error:
Error details:
Field `function` does not exist
and I can't figure out why.
Do you have any idea? thanks