Hello,
I encounter a problem I explain:
I have a model 'Patient' inherits from res_partner I had a link to have visibility of the total charged to the patient
the problem is that when I make up the field ' partner_id ' my link works but to create a record , the field must be filled partner_id.
I do not know how to fix the problem
<div class="oe_button_box" name="button_box">
<field name="partner_id" attrs="{'invisible':1}" />
<button class="oe_stat_button" type="object" name="consultation_meeting" icon="fa-calendar">
<field string="Visite(s)" name="consultation_count" widget="statinfo" modifiers="{'readonly': true}"/>
</button>
<button type="action" class="oe_stat_button" id="invoice_button" icon="fa-pencil-square-o" name="205" context="{'search_default_partner_id':partner_id,'default_partner_id':partner_id}">
<div class="o_form_field o_stat_info">
<span class="o_stat_value">
<field name="total_invoiced" widget="monetary" options="{'currency_field': 'currency_id'}" modifiers="{'readonly': true}"/>
</span>
<span class="o_stat_text"> Facturé </span>
</div>
</button>
</div>