I am struggling with a supposedly easy task in Odoo 12 CE.
In my custom module I can print a report from the drop-down menu without problem.
The code in my report that seems to work fine:
<report
id="report_service_registration"
string="Workorder Info"
model="yacht.service.registration"
report_type="qweb-html"
name="yacht_repair_management.yacht_service_report"
file="yacht_repair_management.yacht_service_report"
print_report_name="'Job Info- %s' % (object.customer)"/>
Now I have created an action button in my form view.
I need that button to do exactly the same as the "dropdown print".
Here the code for the button in my form:
<button class="oe_stat_button"
name="%(my_report)d"
string="WO Info"
type="action"
icon="fa-print"
help="Print Workorder Sheet">
</button>
I tried all kinds of names e.g. (yacht_service_registration.my_report) yes,
even with the id (report_service_registration).
The button appears just fine in the form but there is no action whatsoever when clicking.