odoo - 视图返回页面 - 1

1. 返回并刷新目标页面(列表,form视图可以将view_mode改为form)
return {
'type': 'ir.actions.client',
'view_type': 'form',
'view_mode': 'tree',
'res_model': 'sku.cost',
'tag': 'reload',
}


2. 返回符合条件的记录
return {
'view_type': 'form',
'view_mode': 'tree',
'res_model': 'oig.finance.day.interest',
'type': 'ir.actions.act_window',
'domain': [('oig_finance_id', '=', self.oig_finance_id.id), ('day_interest_create_month', '=', self.month)], # 筛选条件
'target': 'new',
}

3. 返回到指定记录的form表单
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'oig.pricing.instant',
'type': 'ir.actions.act_window',
'res_id': oig_pricing_result.id,
'context': self.env.context,
'target': 'new',
}
posted @ 2020-08-30 17:48  10132714  阅读(541)  评论(0编辑  收藏  举报