添加功能

This commit is contained in:
李鹏宇
2025-12-26 18:13:00 +08:00
parent 2f43e0f73f
commit fd7bbf5599
3 changed files with 7 additions and 6 deletions
@@ -5,9 +5,9 @@
<field name="model">yuthon.department.change</field>
<field name="arch" type="xml">
<tree string="部门变更审批">
<!-- <header>-->
<!-- <button name="approval_end" type="object" string="结束" dclass="oe_highlight"/>-->
<!-- </header>-->
<!-- <header>-->
<!-- <button name="approval_end" type="object" string="结束" dclass="oe_highlight"/>-->
<!-- </header>-->
<field name="code"/>
<field name="name"/>
</tree>
@@ -42,6 +42,7 @@ class InheritPurchaseOrder(models.Model):
for order in order_ids:
order.button_cancel()
def end_approval(self):
self.button_confirm()
self.state = 'purchase'
@@ -30,9 +30,9 @@ class InheritRoomBooking(models.Model):
domain = [
('start_datetime', '>=', today_start),
('start_datetime', '<=', today_end),
'|',
('stop_datetime', '=', False),
('stop_datetime', '>', current_datetime)
# '|',
# ('stop_datetime', '=', False),
# ('stop_datetime', '>', current_datetime)
]
# 4. 查询符合条件的记录(先获取记录集,再统计数量,便于输出会议时间)
matching_records = self.search(domain)