餐饮收集任务生成
This commit is contained in:
@@ -294,6 +294,8 @@ class YuthonCatering(models.Model):
|
||||
'lunch': True,
|
||||
})
|
||||
|
||||
|
||||
|
||||
def batch_confirm_catering(self):
|
||||
records = self.env['yuthon.catering'].browse(self._context.get('active_ids', []))
|
||||
records.write({
|
||||
@@ -303,9 +305,9 @@ class YuthonCatering(models.Model):
|
||||
})
|
||||
|
||||
def fill_march6_missing_catering(self):
|
||||
"""表3月6日缺失员工的餐饮收集任务数据"""
|
||||
"""表3月9日缺失员工的餐饮收集任务数据"""
|
||||
from datetime import date as date_cls
|
||||
target_date = date_cls(2026, 3, 6)
|
||||
target_date = date_cls(2026, 3, 9)
|
||||
conf_records = self.env['yuthon.catering.conf'].search([])
|
||||
if not conf_records:
|
||||
return
|
||||
@@ -340,6 +342,7 @@ class YuthonCatering(models.Model):
|
||||
(2026, 1),
|
||||
(2026, 2),
|
||||
]
|
||||
|
||||
all_dates = []
|
||||
for y, m in target_months:
|
||||
d = date_cls(y, m, 1)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<button name="task_catering22" string="一次修复" type="object" class="btn btn-primary"/>
|
||||
<button name="batch_confirm_catering" string="批量确认" type="object" class="btn btn-primary"/>
|
||||
<button name="batch_generate_catering" string="批量生成12/1/2月餐饮数据" type="object" class="btn btn-primary"/>
|
||||
<button name="fill_march6_missing_catering" string="表3月6日缺失数据" type="object" class="btn btn-primary"/>
|
||||
<button name="fill_march6_missing_catering" string="表3月9日缺失数据" type="object" class="btn btn-primary"/>
|
||||
</header>
|
||||
<field name="date"/>
|
||||
<field name="week_day" readonly="1"/>
|
||||
|
||||
Reference in New Issue
Block a user