Merge pull request !9301 from 李鹏宇/dev
This commit is contained in:
@@ -21,7 +21,7 @@ class YuthonMealExpenses(models.Model):
|
||||
select_year = fields.Selection(selection=[(str(i), str(i)) for i in range(2024, 2040)], string='年份',
|
||||
default=lambda self: str(datetime.now().year))
|
||||
meal_state = fields.Selection([('to_do', '待发送'), ('done', '已发送')], string='状态', default='to_do')
|
||||
toll_state = fields.Selection([('to_do', '未缴'), ('done', '已缴')], string='状态', default='to_do')
|
||||
toll_state = fields.Selection([('to_do', '待缴'), ('done', '已缴')], string='缴费状态', default='to_do')
|
||||
|
||||
|
||||
@api.depends('number_breakfasts', 'number_lunches')
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<field name="number_lunches"/>
|
||||
<field name="total_payment"/>
|
||||
<field name="company_id"/>
|
||||
<field name="toll_state"/>
|
||||
<field name="meal_state"/>
|
||||
<button name="send_meal" string="发送" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
|
||||
@@ -48,7 +48,8 @@ class PartyMealWizard(models.TransientModel):
|
||||
employee_list = []
|
||||
meal_ids = self.env['yuthon.meal.expenses'].search([('select_time', '=', self.meal_month),
|
||||
('select_year', '=', self.meal_year),
|
||||
('meal_state', '=', 'to_do')
|
||||
('meal_state', '=', 'to_do'),
|
||||
('toll_state', '=', 'to_do')
|
||||
])
|
||||
for meal_id in meal_ids:
|
||||
employee_list.append(meal_id.employee_id.id)
|
||||
@@ -62,7 +63,8 @@ class PartyMealWizard(models.TransientModel):
|
||||
for employee in self.employee_ids:
|
||||
meal = self.env['yuthon.meal.expenses'].search([('employee_id', '=', employee.id),
|
||||
('select_time', '=', self.select_time),
|
||||
('select_year', '=', self.select_year)])
|
||||
('select_year', '=', self.select_year),
|
||||
('toll_state', '=', 'to_do')])
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
|
||||
user_id=employee.wecom_userid,
|
||||
title="缴纳餐费提醒",
|
||||
|
||||
Reference in New Issue
Block a user