添加功能

This commit is contained in:
zhou
2025-03-12 11:29:43 +08:00
parent 12d4a9b437
commit cd57b75995
14 changed files with 34 additions and 24 deletions
+4 -4
View File
@@ -94,7 +94,7 @@
context="{'employee_id': employee_id}"
options="{'no_create': True, 'no_open': True, 'request_type': 'leave'}"
readonly="state in ['cancel', 'refuse', 'validate', 'validate1']"
width="200px"
width="300px"
/>
<!-- <field name="holiday_status_id"-->
<!-- domain="[-->
@@ -114,7 +114,7 @@
<!-- readonly="state in ['cancel', 'refuse', 'validate', 'validate1']"-->
<!-- width="200px"-->
<!-- />-->
<field name="leave_documents_ids" widget="preview_many2many" options="{'preview_type': 'button', 'preview_string': ' '}" string=" " width="150px" readonly="1"/>
<field name="leave_documents_ids" widget="preview_many2many" options="{'preview_type': 'button', 'preview_string': ' '}" string=" " width="100px" readonly="1"/>
<field name="request_date_from" width="300px" string="开始日期"/>
<field name="request_date_to" width="300px" string="结束日期"/>
<field name="number_of_days_display" string="天" width="100px"/>
@@ -154,9 +154,9 @@
context="{'employee_id': employee_id}"
options="{'no_create': True, 'no_open': True, 'request_type': 'leave'}"
readonly="state in ['cancel', 'refuse', 'validate', 'validate1']"
width="200px"
width="300px"
/>
<field name="leave_documents_ids" widget="preview_many2many" options="{'preview_type': 'button', 'preview_string': ' '}" string=" " width="150px"/>
<field name="leave_documents_ids" widget="preview_many2many" options="{'preview_type': 'button', 'preview_string': ' '}" string=" " width="100px"/>
<field name="request_unit_hours" column_invisible="True" force_save="1"/>
<field name="request_date_from" width="300px" string="请假日期"/>
<field name="request_hour_from" width="200px"/>
@@ -63,9 +63,9 @@
<xpath expr="//field[@name='job_id']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<!-- <xpath expr="//field[@name='stage_id']" position="attributes">-->
<!-- <attribute name="column_invisible">1</attribute>-->
<!-- </xpath>-->
<xpath expr="//field[@name='stage_id']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='partner_mobile']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
@@ -80,6 +80,7 @@
</xpath>
<xpath expr="//field[@name='name']" position="after">
<field name="department_id" string="部门"/>
<field name="is_interview_status" string="状态"/>
</xpath>
<xpath expr="//field[@name='create_date']" position="attributes">
<attribute name="string">创建时间</attribute>
@@ -101,7 +102,7 @@
<record id='view_crm_case_categ0_act_job1' model='ir.actions.act_window'>
<field name='name'>面试信息</field>
<field name='res_model'>hr.applicant</field>
<field name='view_mode'>kanban,tree,form,pivot,graph,calendar,activity</field>
<field name='view_mode'>tree,kanban,form,pivot,graph,calendar,activity</field>
<field name="context">{'search_default_stage':1}</field>
<!-- <field name="domain">[('stage_id.name','!=','人才库')]</field>-->
</record>
@@ -159,9 +159,6 @@
<attribute name="name">action_create_new_job</attribute>
<attribute name="type">object</attribute>
</xpath>
<xpath expr="//a[@name='874']" position="attributes">
<attribute name="string">新建人员信息</attribute>
</xpath>
</field>
</record>
</odoo>
@@ -36,7 +36,7 @@ class HrApplicant(models.Model):
'res_model': 'yuthon.interview.approval',
"views": [[form_id, "form"]],
"context": {
'default_name': ','.join(name_list) + '面试申请表',
'default_name': ','.join(name_list) + '面试申请',
'default_job_id': self.job_id.id,
'default_department_id': self.department_id.id,
'default_applicant_ids': hr_applicant_list,
@@ -20,10 +20,10 @@ class YuthonInterviewApproval(models.Model):
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_interview_approval_code'))
applicant_ids = fields.One2many('interview.approval.line', 'interview_approval_id', string='应聘面试信息')
is_issues = fields.Boolean(string='是否上会')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
('thlc', '天河粮储')], string="公司")
yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司")
related_issues_id = fields.Many2one('issue.library', string="关联议题")
active = fields.Boolean('Active', default=True, tracking=True)
room_id = fields.Many2one('room.booking', string="会议室")
def _get_default_name_title(self):
return self._description if self._description else self._name
@@ -31,6 +31,7 @@ class YuthonInterviewApproval(models.Model):
def scheduling_of_meetings(self):
form_id = self.env.ref("room.room_booking_view_form").id
meeting_type_id = self.sudo().env["room.meeting.type"].search([("name", "=", "面试")], limit=1)
employee_ids = []
for applicant in self.applicant_ids:
for employee_id in applicant.employee_ids:
@@ -41,6 +42,10 @@ class YuthonInterviewApproval(models.Model):
'res_model': 'room.booking',
"views": [[form_id, "form"]],
"context": {
'default_name': self.name,
'default_yuthon_company': self.yuthon_company,
'default_interview_id': self.id,
'default_meeting_type_id': meeting_type_id.id,
'default_room_users_ids': [(6, 0, employee_ids)],
}
}
@@ -95,7 +100,7 @@ class InterviewApprovalLine(models.Model):
def button_applicant_ids(self):
self.ensure_one()
applicant = self.env['hr.applicant'].search([('name', '=', self.name)], limit=1)
applicant = self.env['hr.applicant'].search([('partner_name', '=', self.name)], limit=1)
if applicant:
return {
'type': 'ir.actions.act_window',
@@ -22,6 +22,9 @@
<div name="recruitment_target" position="after">
<field name="is_pub"/>
</div>
<xpath expr="//field[@name='no_of_recruitment']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
+3 -2
View File
@@ -8,7 +8,8 @@ class RoomBooking(models.Model):
is_issue = fields.Boolean(string="是否关联议题")
issue_meeting_line_ids = fields.One2many('issue.meeting.line', 'meeting_booking_id', string="关联议题明细行")
number_of_meetings = fields.Integer(string='会议次数')
company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="公司")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
string='公司')
def bottom_meeting_approval(self):
library_data = []
@@ -31,7 +32,7 @@ class RoomBooking(models.Model):
'default_meeting_type_id': self.meeting_type_id.id,
'default_meeting_date': self.start_datetime,
'default_number_of_meetings': self.number_of_meetings,
'default_company_page':self.company_page,
'default_yuthon_company':self.yuthon_company,
'default_meeting_minutes_ids': library_data
}}
+2 -1
View File
@@ -11,7 +11,8 @@ class IssueMeetingMinutes(models.Model):
name = fields.Char(string='名称')
number_of_meetings = fields.Integer(string='会议次数')
company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="公司")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
string='公司')
meeting_id = fields.Many2one('room.booking', string='会议名称', required=True)
meeting_type_id = fields.Many2one('room.meeting.type', string="会议类型")
meeting_date = fields.Datetime(string="会议时间")
+1 -1
View File
@@ -9,7 +9,7 @@
<field name="is_issue"/>
</xpath>
<xpath expr="//field[@name='department_id']" position="before">
<field name="company_page"/>
<field name="yuthon_company"/>
</xpath>
<xpath expr="//field[@name='meeting_type_id']" position="after">
<field name="number_of_meetings"/>
@@ -30,7 +30,7 @@
</group>
<group>
<field name="number_of_meetings" invisible="1"/>
<field name="company_page" invisible="1"/>
<field name="yuthon_company" invisible="1"/>
</group>
</group>
<notebook>
@@ -7,6 +7,7 @@
<tree string="物业管理">
<header>
<!-- <field name="state" widget="statusbar"/>-->
<button name="put_merge_approval" string="合并" type="object"/>
<button name="put_property_handover" string="物业移交" type="object"/>
<button name="put_declare_approval" type="object" string="提交出租申报"/>
</header>
@@ -16,6 +17,7 @@
<field name="management_area" digits="[16, 4]"/>
<field name="rent_area" digits="[16, 4]"/>
<field name="equity_area" digits="[16, 4]"/>
<button name="put_split_approval" type="object" string="拆分" class="btn btn-primary"/>
<button name="put_offline_approval" type="object" string="提交线下审批" class="btn btn-primary"/>
<button name="put_adjustment_approval" type="object" string="调整出租条件" class="btn btn-primary"/>
</tree>
@@ -15,7 +15,7 @@ class PropertyInformation(models.Model):
default=lambda self: self.env['ir.sequence'].next_by_code('property_information_code'))
property_documents_ids = fields.Many2many('documents.document', string="物业信息文件")
purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
original_property_id = fields.Many2one('property.management', string="关联物业管理变更审批")
property_name = fields.Char(string="物业名称")
company_id = fields.Many2one('res.company', string="所属公司")
@@ -51,7 +51,6 @@ class PropertyInformationDetailLines(models.Model):
new_property_id = fields.Many2one('property.management', string="新物业信息")
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
new_admin = fields.Char(string="新管理员")
admin_id = fields.Many2one('res.users', string="管理员")
new_precincts = fields.Many2one('yuthon.precinct.message', string="新片区")
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
@@ -63,6 +63,7 @@
<field name="tenure_type"/>
<field name="admin_id"/>
<field name="precinct"/>
<field name="purpose_id"/>
<field name="property_id"/>
</tree>
</field>
@@ -72,10 +73,10 @@
<tree editable="bottom">
<field name="new_property_id" column_invisible="1"/>
<field name="company_id"/>
<field name="new_admin"/>
<field name="tenure_type"/>
<field name="admin_id"/>
<field name="new_precincts"/>
<field name="purpose_id"/>
<field name="tenure_type"/>
</tree>
</field>
</group>