Hello all
Is there a way to call a method in the .py file from the xml without define a new field?
E.g.:
model.py
@api.model
def get_companies(self):
return self.env['res.partner'].search(['is_company', '=', True])
view.py
<field name="get_companies" colspan="4" nolabel="1">
<tree string="Companies">
<field name="id"/>
<field name="name"/>
<field name="vat"/>
</tree>
</field>
Regards
Alejandro