@@ -122,7 +122,7 @@ class YuthonSalaryActive(models.Model):
|
||||
def salary_confirm(self):
|
||||
self.write({'confirm_status': 'confirm'})
|
||||
|
||||
def payslip_transmit(self):
|
||||
def action_payslip_send(self):
|
||||
url=f"https://phone.thtzjt.com/phone/Salary/{self.id}/{self.employee_id.user_id.id}"
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(
|
||||
category='salary', user_id=self.employee_id.wecom_userid,
|
||||
@@ -135,7 +135,7 @@ class YuthonSalaryActive(models.Model):
|
||||
# )
|
||||
self.write({'confirm_status': 'un_confirm'})
|
||||
|
||||
def all_payslip_transmit(self):
|
||||
def all_payslip_send(self):
|
||||
salary_ids = self.env["yuthon.salary.active"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for rec in salary_ids:
|
||||
url = f"https://phone.thtzjt.com/phone/Salary/{rec.id}/{rec.employee_id.user_id.id}"
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="工资单归档" create="1" edit="0" delete="1">
|
||||
<header>
|
||||
<button name="all_payslip_transmit" type="object" string="批量发送" class="oe_highlight"/>
|
||||
<button name="all_payslip_send" type="object" string="批量发送" class="oe_highlight"/>
|
||||
</header>
|
||||
<!-- 操作按钮 + 状态 -->
|
||||
<button type="object" name="payslip_transmit" string="发送" class="oe_highlight"/>
|
||||
<button type="object" name="action_payslip_send" string="发送" class="oe_highlight"/>
|
||||
<field name="confirm_status"/>
|
||||
<field name="employee_id" string="员工"/>
|
||||
<field name="department_id" column_invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user