@@ -99,11 +99,16 @@ class RoomBooking(models.Model):
|
||||
meet.issue_library_id.issue_state = False
|
||||
|
||||
if self.code:
|
||||
self.env['issue.library.approval.line'].create({
|
||||
'issue_library_id': meet.issue_library_id.id,
|
||||
'code': self.code,
|
||||
'approval_date': fields.Datetime.now() + timedelta(hours=8),
|
||||
})
|
||||
exists = self.env['issue.library.approval.line'].search([
|
||||
('issue_library_id', '=', meet.issue_library_id.id),
|
||||
('code', '=', self.code)
|
||||
], limit=1)
|
||||
if not exists:
|
||||
self.env['issue.library.approval.line'].create({
|
||||
'issue_library_id': meet.issue_library_id.id,
|
||||
'code': self.code,
|
||||
'approval_date': fields.Datetime.now() + timedelta(hours=8),
|
||||
})
|
||||
|
||||
@api.depends_context('uid', 'company')
|
||||
@api.depends('company_id')
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="公告管理" decoration-success="notice_state == 'yes'"
|
||||
decoration-info="notice_state == 'no'"
|
||||
decoration-muted="notice_state == 'stop'">
|
||||
decoration-muted="notice_state == 'stop'" default_order="create_date1 desc">
|
||||
<field name="name" required="1"/>
|
||||
<field name="notice_type_id" string="类型" class="list_ids_width"/>
|
||||
<field name="users_id" string="发布人" class="list_ids_width"/>
|
||||
@@ -125,7 +125,7 @@
|
||||
<tree string="公告管理" edit="false" delete="false" create="false"
|
||||
decoration-danger="is_notice_roger == 'no'"
|
||||
decoration-success="is_notice_roger == 'yes'"
|
||||
js_class="custom_notice_tree_button">
|
||||
js_class="custom_notice_tree_button" default_order="create_date1 desc">
|
||||
<field name="name"/>
|
||||
<field name="notice_type_id" string="类型"/>
|
||||
<field name="users_id" string="发布人" class="list_ids_width"/>
|
||||
|
||||
Reference in New Issue
Block a user