Hello,
in the mrp.production form, i added a new action menu
This menu do few things on the data and at the end must print the production order (like if you click on print menu)/
I try with many code but no one works
Here an example :
def print_of(self):
res = self\.env\.ref\('mrp\.action_report_production_order'\)\.report_action\(self\)
\ \ \ \ \ \ \ \ _logger\.critical\("RES="\+str\(res\)\)
\ \ \ \ \ \ \ \ return\ res
and\ the\ content\ of\ the\ log\ :
RES=\{'context':\ \{'lang':\ 'en_GB',\ 'tz':\ 'Europe/Paris',\ 'uid':\ 2,\ 'allowed_company_ids':\ \[1\],\ 'active_id':\ 24871,\ 'active_ids':\ \[24871\],\ 'active_model':\ 'mrp\.production',\ 'mail_notify_force_send':\ False\},\ 'data':\ None,\ 'type':\ 'ir.actions.report', 'report_name': 'mrp.report_mrporder', 'report_type': 'qweb-pdf', 'report_file': 'mrp.report.mrp_production_templates', 'name': 'Production Order'}
It seems that RES is ok but nothing is printed/generated!!!
Do you know where is my error or if there is an other way to do that ?