2017-03-06 16 views

答えて

0
def print_report(self, cr, uid, ids, context=None): 
    active_id = context.get('active_id', []) 
    datas = {'ids' : [active_id]} 
    return { 
     'type': 'ir.actions.report.xml', 
     'report_name': 'pos.receipt', # mention your report name here 
     'datas': datas, 
    } 
0

、それは非常に単純です。あなたのビューで :あなたのモデルで

<button name="generate_report" type="object" string="Generate report"/> 

@api.multi 
def generate_report(self): 

    return { 
       'type': 'ir.actions.report.xml', 
       'report_name': 'myModule.my_report' 
      } 
関連する問題