@@ -53,13 +53,13 @@ class HrLeave(models.Model):
|
||||
hour_batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', ondelete='cascade')
|
||||
leave_documents_ids = fields.Many2many(related='holiday_status_id.leave_documents_id', string="假期详情说明", readonly=True)
|
||||
details = fields.Text(string="假期流程说明")
|
||||
custom_document_ids = fields.Many2many(
|
||||
string='文件',
|
||||
comodel_name='ir.attachment',
|
||||
relation='leave_custom_doc_rel',
|
||||
column1='leave_id',
|
||||
column2='attachment_id'
|
||||
)
|
||||
# custom_document_ids = fields.Many2many(
|
||||
# string='文件',
|
||||
# comodel_name='ir.attachment',
|
||||
# relation='leave_custom_doc_rel',
|
||||
# column1='leave_id',
|
||||
# column2='attachment_id'
|
||||
# )
|
||||
request_hour_from = fields.Selection([
|
||||
('0', '00:00'), ('0.5', '00:30'),
|
||||
('1', '1:00'), ('1.5', '1:30'),
|
||||
@@ -219,6 +219,13 @@ class HolidaysRequestBatch(models.Model):
|
||||
leave_by_day = fields.Boolean(string='请假单位(天)', default=True)
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
default='normal')
|
||||
custom_document_ids = fields.Many2many(
|
||||
string='文件',
|
||||
comodel_name='ir.attachment',
|
||||
relation='leave_custom_doc_rel',
|
||||
column1='leave_id',
|
||||
column2='attachment_id'
|
||||
)
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="请假审批">
|
||||
<field name="employee_id" column_invisible="1"/>
|
||||
<field name="custom_document_ids" widget="preview_many2many" options="{'show_select_btn': false}"/>
|
||||
<field name="name"/>
|
||||
<field name="users_id"/>
|
||||
</tree>
|
||||
@@ -51,6 +50,7 @@
|
||||
<field name="users_id"/>
|
||||
<field name="employee_id" invisible="1" force_save="1"/>
|
||||
<field name="text"/>
|
||||
<field name="custom_document_ids" widget="preview_many2many" options="{'show_select_btn': false}"/>
|
||||
<field name="is_hour"/>
|
||||
<field name="is_day"/>
|
||||
<field name="yuthon_company" invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user