Show notification and next action
13 tháng 9, 2024 bởi
Show notification and next action
iTricks
| Chưa có bình luận

Python Code

# Trả về action cho view
action = self.env.ref("goovet.action_stock_report_pivot").read()[0]
from_date_str = self.from_date.strftime('%d/%m/%y')
to_date_str = self.to_date.strftime('%d/%m/%y')

message = f'Từ {from_date_str} Đến {to_date_str}'
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
'params': {
'title': self.location_id.name,
'message': message,
'type': 'success',
'sticky': True,
'next': action,
}
}


Đăng nhập để viết bình luận