餐饮定时任务
This commit is contained in:
@@ -361,6 +361,23 @@ class YuthonMealExpenses(models.Model):
|
||||
})
|
||||
return True
|
||||
|
||||
def action_test_monthly_reminder(self):
|
||||
"""手动测试月度提醒"""
|
||||
# 调用定时任务方法
|
||||
result = self.cron_send_monthly_meal_reminder()
|
||||
|
||||
# 显示成功通知
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'display_notification',
|
||||
'params': {
|
||||
'title': '测试完成',
|
||||
'message': '月度提醒测试已执行,请查看日志确认结果',
|
||||
'type': 'success',
|
||||
'sticky': False,
|
||||
}
|
||||
}
|
||||
|
||||
def action_view_detail(self):
|
||||
self.ensure_one()
|
||||
date_start, date_end = self._get_date_range()
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<button name="action_generate_missing_mar" string="批量生成2026年3月缺失数据" type="object" class="btn btn-blue"/>
|
||||
<button name="action_mark_meal_sent" string="批量标记已发送" type="object" class="btn btn-blue"/>
|
||||
<button name="action_batch_send_reminder" string="批量催缴" type="object" class="btn btn-blue"/>
|
||||
<button name="action_test_monthly_reminder" string="测试月度提醒" type="object" class="btn btn-blue"/>
|
||||
</header>
|
||||
<field name="select_year"/>
|
||||
<field name="select_time"/>
|
||||
|
||||
Reference in New Issue
Block a user