如何解决循环多次返回 'ir.actions.act_url' odoo
如何在 'ir.actions.act_url'
内循环 multipe return for
。
这是我的模块:
@api.multi
def export_multi_worksheets(self):
...
for j,row_emp in enumerate(list_emp):
...
workbook.close()
return {
'type': 'ir.actions.act_url','target': 'self','url': '{}web/binary/worksheet_export/report?file_format=xlsx&file_name={}'.format(http.request.httprequest.host_url,file_name)
}
这是我的看法:
<record id="hr_worksheet_multi_export_action" model="ir.actions.server">
<field name="name">Export Batch</field>
<field name="model_id" ref="ess.model_hr_ess_worksheet"/>
<field name="binding_model_id" ref="ess.model_hr_ess_worksheet"/>
<field name="state">code</field>
<field name="code">
action = self.export_multi_worksheets(cr,uid,context['active_ids'],context=context)
</field>
<field eval="True" name="condition"/>
</record>
在第一次返回第二行的非循环之后。这种情况如何循环导出多个文件?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。