跳至內容
選單
此問題已被標幟
1 回覆
4919 瀏覽次數

plz give some answers...

頭像
捨棄
最佳答案

I guess that what you wanna do is use a button to trigger the report download. If that is your case you could do it like:

def get_label(self, cr, uid, ids, context=None):

    if ids:

       if not isinstance(ids, list):

           ids = [ids]

       context = dict(context or {}, active_ids=ids, active_model=self._name)

   return {

      'type': 'ir.actions.report.xml',

      'report_name': 'mrp.product_label_document',

      'context': context,

   }

頭像
捨棄