@@ -28,7 +28,7 @@ class RoomBooking(models.Model):
|
||||
office_id = fields.Many2one(related="room_id.office_id", string="Office", readonly=True, store=True)
|
||||
company_id = fields.Many2one(related="organizer_id.employee_id.company_id", string="Company", readonly=True, store=True)
|
||||
|
||||
department_id = fields.Many2one('hr.department', related='organizer_id.employee_id.department_id', string="申请人部门")
|
||||
department_id = fields.Many2one('hr.department', related='organizer_id.employee_id.department_id', string="部门")
|
||||
is_notice = fields.Boolean(string="是否发布通知", default=True)
|
||||
is_hour = fields.Boolean(string="提前一小时", default=True)
|
||||
is_day = fields.Boolean(string="提前一天", default=True)
|
||||
@@ -41,21 +41,30 @@ class RoomBooking(models.Model):
|
||||
host = fields.Many2one('res.users', string="主持人")
|
||||
stationed_group = fields.Boolean(string="驻组参会")
|
||||
other_company_user_ids = fields.Many2many('other.meet.employee', string="其他人员")
|
||||
|
||||
fleet_id = fields.Many2one('fleet.vehicle', string="车辆")
|
||||
meeting_place = fields.Char(string="会议地点")
|
||||
meeting_sing_ids = fields.One2many('room.meeting.sign', 'room_booking_id', string="签到详情")
|
||||
meeting_data = fields.Html(string="会议说明", sanitize=False)
|
||||
wechat_meetingid = fields.Char("企业微信会议室ID")
|
||||
|
||||
documents_ids = fields.Many2many('ir.attachment', string="会议材料附件")
|
||||
is_meeting = fields.Boolean(compute="_compute_is_meeting", store=True)
|
||||
should_user = fields.Integer(string="应到")
|
||||
right_user = fields.Integer(string="实到")
|
||||
driver = fields.Many2one('hr.employee', string="司机")
|
||||
partner_ids = fields.Many2many('res.partner', string="日程安排人员")
|
||||
is_this_company = fields.Boolean(string='是否为本公司', default=True)
|
||||
|
||||
# 关联流程
|
||||
relevancy_type = fields.Selection([('none', '无')], string="关联流程类型")
|
||||
|
||||
@api.depends('meeting_type_id')
|
||||
def _compute_is_meeting(self):
|
||||
for record in self:
|
||||
if record.meeting_type_id:
|
||||
record.is_meeting = record.meeting_type_id.name in ['党委会', '班子会', '董事会']
|
||||
else:
|
||||
record.is_meeting = False
|
||||
|
||||
@api.depends('room_users_ids')
|
||||
def _compute_room_users(self):
|
||||
for i in self:
|
||||
|
||||
@@ -143,19 +143,23 @@
|
||||
<field name="name" required="1" string="标题"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="stop_datetime" invisible="1"/>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="stop_datetime" invisible="1"/>
|
||||
<field name="start_datetime" string="会议时间" widget="daterange"
|
||||
options="{'end_date_field': 'stop_datetime'}"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="organizer_id" widget="many2one_avatar_user"/>
|
||||
<field name="organizer_id"/>
|
||||
<field name="meeting_type"/>
|
||||
<field name="driver" invisible="meeting_type != 'exterior'"/>
|
||||
<field name="fleet_id" invisible="meeting_type != 'exterior'"/>
|
||||
<field name="meeting_place" invisible="meeting_type != 'exterior'"/>
|
||||
<field name="room_id" string="会议地点" domain=""/>
|
||||
<field name="is_this_company"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="department_id" widget="ztree_select"/>
|
||||
@@ -165,7 +169,7 @@
|
||||
</group>
|
||||
<group col="4">
|
||||
<group>
|
||||
<field name="host"/>
|
||||
<field name="host" domain = "[('company_id', '=', company_id), ('user_id.name', '!=', 'Administrator')] if is_this_company else []"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="stationed_group"/>
|
||||
@@ -179,6 +183,7 @@
|
||||
</group>
|
||||
<group col="5">
|
||||
<group>
|
||||
<field name="is_meeting" invisible="1"/>
|
||||
<field name="is_hour" invisible="not is_notice"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -219,6 +224,9 @@
|
||||
<button name="button_meeting_data" string="座位排列" type="object" class="oe_highlight"/>
|
||||
<field name="meeting_data" widget="tinymce"/>
|
||||
</page>
|
||||
<page string="附件" invisible="is_meeting">
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
|
||||
@@ -88,7 +88,9 @@ class SoongWorkflowNode(models.Model):
|
||||
employee_ids = fields.Many2many('hr.employee', string='抄送/传阅人员')
|
||||
is_end = fields.Boolean(string="结束", default=False)
|
||||
department_id = fields.Many2many('hr.department', string='部门转入范围')
|
||||
is_concatenation = fields.Boolean(string="是否串并", default=False, help='并:任何人均给意见,最后一个完成的人转交到下一节点.串:都会收到消息,但任意一个人转交后,即到下一节点,其他人将不再显示,相当于收回.')
|
||||
approval_concatenation = fields.Selection([('chuan', '串申'), ('bing', '并申')], string="审批形式", default="bing",
|
||||
help='并:任何人均给意见,最后一个完成的人转交到下一节点.'
|
||||
'串:都会收到消息,但任意一个人转交后,即到下一节点,其他人将不再显示,相当于收回.')
|
||||
|
||||
@api.onchange("is_apostille")
|
||||
def onchange_is_apostille(self):
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="is_concatenation"/>
|
||||
<field name="approval_concatenation" widget="redio"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Buttons">
|
||||
|
||||
@@ -149,7 +149,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
record_id = self.env[self.res_model].search([('id', '=', self.res_id)])
|
||||
for employee in self.employee_ids:
|
||||
action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0]
|
||||
url = f'https://oa.thtzjt.com/web?oauth_access_token={employee.user_id.oauth_access_token}&oauth_uid={employee.wecom_userid}#id={record_id.id}&cids=2&action={action_id.id}&model={record_id._name}&view_type=form'
|
||||
url = f'https://oa.thtzjt.com/web?wecom_fields={employee.user_id.wecom_fields}&oauth_uid={employee.wecom_userid}#id={record_id.id}&cids=2&action={action_id.id}&model={record_id._name}&view_type=form'
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
|
||||
user_id=employee.wecom_userid,
|
||||
title=record_id._description,
|
||||
|
||||
@@ -17,6 +17,8 @@ class YuthonFixesApproval(models.Model):
|
||||
now_type = fields.Selection([('days', '按天'), ('hours', '按小时')], string="修正类型", default="hours")
|
||||
now_days = fields.Float(string="现休假时长(天)")
|
||||
now_hours = fields.Float(string="现休假时长(小时)", tracking=True)
|
||||
increase = fields.Float(string="增加时长(小时)")
|
||||
decrease = fields.Float(string="减少时长(小时)")
|
||||
holiday_status = fields.Selection([('annual', '年假'), ('overtime', '加班时')], string="休假类型", default="annual")
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
@@ -91,8 +93,5 @@ class YuthonFixesApproval(models.Model):
|
||||
if self.users_id and self.now_type == 'hours':
|
||||
if self.users_id and self.original_hours and self.now_hours and self.holiday_status_id:
|
||||
self.name = self.users_id.name + f'原{self.holiday_status_id.name}'+ str(self.original_hours) + '小时' + '改为' + str(self.now_hours) + '小时'
|
||||
elif self.users_id and self.now_type == 'days':
|
||||
if self.users_id and self.original_days and self.now_days and self.holiday_status_id:
|
||||
self.name = self.users_id.name + f'原{self.holiday_status_id.name}'+ str(self.original_days) + '天' + '改为' + str(self.now_days) + '天'
|
||||
|
||||
|
||||
|
||||
@@ -48,12 +48,9 @@
|
||||
<field name="users_id"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="holiday_status"/>
|
||||
<field name="original_days" invisible="now_type != 'days'" readonly="1"/>
|
||||
<field name="correction_quota_day" invisible="now_type != 'days'"/>
|
||||
<field name="now_days" invisible="now_type != 'days'" readonly="1"/>
|
||||
<field name="original_hours" invisible="now_type != 'hours'" readonly="1"/>
|
||||
<field name="correction_quota_hour" invisible="now_type != 'hours'"/>
|
||||
<field name="now_hours" invisible="now_type != 'hours'" readonly="1"/>
|
||||
<field name="original_hours" readonly="1"/>
|
||||
<field name="decrease"/>
|
||||
<field name="increase"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="is_issues" invisible="is_issues == False"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
@@ -66,7 +63,6 @@
|
||||
<group>
|
||||
<field name="remarks" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="now_type" invisible="1"/>
|
||||
<field name="vacation_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -118,6 +118,22 @@ class GoApprovals(models.Model):
|
||||
self.is_day = False
|
||||
self.is_half = False
|
||||
|
||||
@api.onchange('days')
|
||||
def _onchange_calculate_end_date(self):
|
||||
"""根据开始日期和天数计算结束日期"""
|
||||
if self.statr_date and self.days:
|
||||
# 计算结束日期
|
||||
self.end_date = self.statr_date + timedelta(days=self.days)
|
||||
|
||||
@api.onchange('hours')
|
||||
def _onchange_calculate_end_datetime(self):
|
||||
"""根据开始时间、天数和小时计算结束时间"""
|
||||
if self.date_start and self.hours:
|
||||
# 计算时间增量
|
||||
delta = timedelta(hours=self.hours or 0)
|
||||
# 计算结束时间
|
||||
self.date_end = self.date_start + delta
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ class HrAttendance(models.Model):
|
||||
abnormal_employees.append(employee)
|
||||
|
||||
for emp in abnormal_employees:
|
||||
url = f'https://oa.thtzjt.com/web?oauth_access_token={emp.user_id.oauth_access_token}&oauth_uid={emp.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.attendance&view_type=form&menu_id={menu_id.id}'
|
||||
url = f'https://oa.thtzjt.com/web?wecom_fields={emp.user_id.wecom_fields}&oauth_uid={emp.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.attendance&view_type=form&menu_id={menu_id.id}'
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='attendance',
|
||||
user_id=emp.wecom_userid,
|
||||
title="打卡异常提醒",
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="reason_application"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<field name="employee_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="is_issues" invisible="is_issues == False"/>
|
||||
<field name="meal"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<field name="details"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
</group>
|
||||
|
||||
@@ -69,19 +69,19 @@ class YuthonMessageLogin(models.Model):
|
||||
is_relatives_work = fields.Boolean(string='本单位是否有亲属')
|
||||
# 附件
|
||||
image_1920 = fields.Image("一寸照")
|
||||
id_card_id = fields.Many2one('documents.document', string='身份证')
|
||||
id_card_id = fields.Many2one('ir.attachment', string='身份证')
|
||||
expirationDate = fields.Date(string='身份证有效期')
|
||||
residence_permit = fields.Char(string='居住证(非本市提供的办理证明,截图也可)')
|
||||
is_expertise = fields.Boolean(string='专业证书/职称')
|
||||
social_security_id = fields.Many2one('documents.document', string='社保清单')
|
||||
social_security_id = fields.Many2one('ir.attachment', string='社保清单')
|
||||
social_validity = fields.Date(string='截至到入职前')
|
||||
is_bank_card = fields.Boolean(string='银行卡储蓄卡')
|
||||
bank_name = fields.Char(string='开户行')
|
||||
bank_phone = fields.Char(string='卡号')
|
||||
is_driving_license = fields.Boolean(string='驾驶证')
|
||||
driving_license_id = fields.Many2one('documents.document', string='驾驶证')
|
||||
driving_license_id = fields.Many2one('ir.attachment', string='驾驶证')
|
||||
driving_license_validity = fields.Date(string='有效期')
|
||||
resignation_id = fields.Many2one('documents.document', string='离职证明')
|
||||
resignation_id = fields.Many2one('ir.attachment', string='离职证明')
|
||||
medical_exam_cost = fields.Float(string='体检费用(含乙肝)')
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
issues_result = fields.Html(string="会议结果")
|
||||
@@ -156,7 +156,7 @@ class EducationalDetailsLine(models.Model):
|
||||
_description = '学历证(全日制)'
|
||||
|
||||
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
graduation_id = fields.Many2one('documents.document', string="毕业证书")
|
||||
graduation_id = fields.Many2one('ir.attachment', string="毕业证书")
|
||||
validation_reports = fields.Char(string="验证报告")
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ class EducationalDetailsLine1(models.Model):
|
||||
_description = '学历证(非全日制)'
|
||||
|
||||
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
graduation_id = fields.Many2one('documents.document', string="毕业证书")
|
||||
graduation_id = fields.Many2one('ir.attachment', string="毕业证书")
|
||||
validation_reports = fields.Char(string="验证报告")
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ class EducationalDetailsLine2(models.Model):
|
||||
_description = '学位证'
|
||||
|
||||
degree_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
graduation_id = fields.Many2one('documents.document', string="学位证")
|
||||
graduation_id = fields.Many2one('ir.attachment', string="学位证")
|
||||
|
||||
|
||||
class CertificateDetailLine(models.Model):
|
||||
@@ -182,7 +182,7 @@ class CertificateDetailLine(models.Model):
|
||||
_description = '专业证书'
|
||||
|
||||
certificate_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
professional_certificates_id = fields.Many2one('documents.document', string="专业证书/职称")
|
||||
professional_certificates_id = fields.Many2one('ir.attachment', string="专业证书/职称")
|
||||
professional_certificate_validity = fields.Date(string="有效期")
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<field name="party_time"/>
|
||||
<field name="house_hold"/>
|
||||
<field name="house_type"/>
|
||||
<field name="login_document_id"/>
|
||||
<field name="login_document_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="phone"/>
|
||||
@@ -208,15 +208,15 @@
|
||||
<page string="附件">
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="id_card_id"/>
|
||||
<field name="social_security_id"/>
|
||||
<field name="id_card_id" widget="preview_many2one"/>
|
||||
<field name="social_security_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="expirationDate"/>
|
||||
<field name="social_validity"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="resignation_id"/>
|
||||
<field name="resignation_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
@@ -224,7 +224,7 @@
|
||||
<field name="certificate_ids" invisible="not is_expertise">
|
||||
<tree editable="bottom">
|
||||
<field name="certificate_id" column_invisible="1"/>
|
||||
<field name="professional_certificates_id"/>
|
||||
<field name="professional_certificates_id" widget="preview_many2one"/>
|
||||
<field name="professional_certificate_validity"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -232,28 +232,28 @@
|
||||
<field name="bank_name" invisible="not is_bank_card"/>
|
||||
<field name="bank_phone" invisible="not is_bank_card"/>
|
||||
<field name="is_driving_license"/>
|
||||
<field name="driving_license_id" invisible="not is_driving_license"/>
|
||||
<field name="driving_license_id" invisible="not is_driving_license" widget="preview_many2one"/>
|
||||
<field name="driving_license_validity" invisible="not is_driving_license"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="attachment_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="diploma_id" column_invisible="1"/>
|
||||
<field name="graduation_id"/>
|
||||
<field name="graduation_id" widget="preview_many2one"/>
|
||||
<field name="validation_reports"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="part_time_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="diploma_id" column_invisible="1"/>
|
||||
<field name="graduation_id"/>
|
||||
<field name="graduation_id" widget="preview_many2one"/>
|
||||
<field name="validation_reports"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="degree_id_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="degree_id" column_invisible="1"/>
|
||||
<field name="graduation_id"/>
|
||||
<field name="graduation_id" widget="preview_many2one"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<field name="number_of_meetings"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='sign']" position="before">
|
||||
<page string="关联议题" invisible="is_issue == False">
|
||||
<page string="关联议题" invisible="not is_meeting">
|
||||
<field name="issue_meeting_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="meeting_booking_id" column_invisible="1"/>
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
<field name="code">property_report_repair_code</field>
|
||||
<field name="prefix">BX%(y)s%(month)s%(day)s</field>
|
||||
<field name="padding">3</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -12,11 +12,11 @@ class PropertyRentRelief(models.Model):
|
||||
code = fields.Char(string="报修编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('property_report_repair_code'))
|
||||
users_id = fields.Many2one('res.users', string="报修人", default=lambda self: self.env.user.id)
|
||||
repairer_date = fields.Date(string="报修时间", default=fields.Date.today())
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="报修部门")
|
||||
repairer_date = fields.Date(string="报修日期", default=fields.Date.today())
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
repairer_address = fields.Char(string="报修人地址")
|
||||
picture_id = fields.Many2one('ir.attachment', string="图片上传")
|
||||
fault = fields.Text(string="故障信息")
|
||||
fault = fields.Text(string="描述")
|
||||
|
||||
urgency = fields.Selection([('low', '低'), ('middle', '中'), ('high', '高')], string="紧急程度")
|
||||
possible_causes = fields.Selection([('software', '软件问题'), ('hardware', '硬件问题')], string="可能原因")
|
||||
|
||||
@@ -47,27 +47,29 @@
|
||||
<field name="users_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="repairer_date"/>
|
||||
<field name="department_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
<field name="repairer_date"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="设备信息">
|
||||
<field name="device_ids" string=" ">
|
||||
<tree editable="bottom">
|
||||
<field name="report_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="device_specs"/>
|
||||
<field name="mac"/>
|
||||
<field name="ip"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="故障信息">
|
||||
<group>
|
||||
<field name="fault"/>
|
||||
<field name="picture_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="设备信息">
|
||||
<field name="device_ids" string=" ">
|
||||
<tree editable="bottom">
|
||||
<field name="report_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="device_specs"/>
|
||||
<field name="mac"/>
|
||||
<field name="ip"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<group string="处理信息">
|
||||
<field name="possible_causes"/>
|
||||
<field name="software_id" invisible="possible_causes != 'software'"/>
|
||||
|
||||
@@ -112,7 +112,7 @@ class YuthonNotice(models.Model):
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '通知公告'), ('parent_id', '!=', False)])
|
||||
conf_old = self.env['yuthon.confirm.users'].search([('notice_id', '=', self.id), ('employee_id', 'in', self.users_ids.ids)])
|
||||
for user_id in self.users_ids:
|
||||
url = f'https://oa.thtzjt.com/web?oauth_access_token={user_id.oauth_access_token}&oauth_uid={user_id.employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=yuthon.notice&view_type=form&menu_id={menu_id.id}'
|
||||
url = f'https://oa.thtzjt.com/web?wecom_fields={user_id.wecom_fields}&oauth_uid={user_id.employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=yuthon.notice&view_type=form&menu_id={menu_id.id}'
|
||||
if conf_old:
|
||||
for co in conf_old:
|
||||
co.write({'state': 'no'})
|
||||
|
||||
@@ -18,7 +18,7 @@ class PayslipSendWizard(models.Model):
|
||||
if not employee_id.wecom_userid:
|
||||
raise UserError("请同步{}的企业微信".format(employee_id.name))
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的薪资')])
|
||||
url = f'https://oa.thtzjt.com/web?oauth_uid={employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
|
||||
url = f'https://oa.thtzjt.com/web?wecom_fields={employee_id.user_id.wecom_fields}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task',
|
||||
user_id=employee_id.wecom_userid,
|
||||
title="薪资确认",
|
||||
@@ -30,7 +30,7 @@ class PayslipSendWizard(models.Model):
|
||||
if not employee_id.wecom_userid:
|
||||
raise UserError("请同步{}的企业微信".format(employee_id.name))
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的薪资')])
|
||||
url = f'https://oa.thtzjt.com/web?oauth_uid={employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
|
||||
url = f'https://oa.thtzjt.com/web?wecom_fields={employee_id.user_id.wecom_fields}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task',
|
||||
user_id=employee_id.wecom_userid,
|
||||
title="薪资确认",
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='preferences']" position="after">
|
||||
<group>
|
||||
<field name="wecom_fields"/>
|
||||
</group>
|
||||
<page string="企业微信">
|
||||
<group>
|
||||
<field name="wecom_fields"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -102,7 +102,7 @@ class YuthonWillTask(models.Model):
|
||||
self.users_ids = [(6, 0, user_ids)]
|
||||
|
||||
def read_number(self):
|
||||
return self.search_count([('state', '=', 'will'), ('users_ids', 'in', self.env.user.id)])
|
||||
return self.search_count([('task_state', '=', 'will'), ('users_ids', 'in', self.env.user.id)])
|
||||
|
||||
def will_task_time(self):
|
||||
# 任务状态判断
|
||||
|
||||
Reference in New Issue
Block a user