1
This commit is contained in:
@@ -127,8 +127,6 @@ class SoongWorkflowRecord(models.Model):
|
||||
for rec in self:
|
||||
if rec.node_id.flow_start:
|
||||
rec.approve_state = "start"
|
||||
elif rec.node_id.flow_end:
|
||||
rec.approve_state = "end"
|
||||
else:
|
||||
rec.approve_state = "pending"
|
||||
|
||||
|
||||
@@ -196,6 +196,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
record_id.log_ids[-1].write({"comment": self.comment_note_id.name,
|
||||
"approval_state": "3",
|
||||
"lase_click_date": fields.Datetime.now()})
|
||||
self.env['soong.workflow.record'].search([('code', '=', record_id.code)]).write({'state': 'end'})
|
||||
if self.node_btn_name == "分发":
|
||||
if self.employee_ids:
|
||||
record_id.log_ids[-1].write({"comment": self.comment_note_id.name,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="意见">
|
||||
<group invisible="node_btn_name in ['分发', '结束']">
|
||||
<group invisible="node_btn_name in ['分发', '结束', '收回']">
|
||||
<field name="comment_note_id" required="1"/>
|
||||
<field name="node_btn_id" invisible="1"/>
|
||||
<field name="node_btn_name" invisible="1"/>
|
||||
@@ -29,6 +29,9 @@
|
||||
<div invisible="node_btn_name != '结束'">
|
||||
<h2>当前流程是否结束,请确认</h2>
|
||||
</div>
|
||||
<div invisible="node_btn_name != '收回'">
|
||||
<h2>当前流程是否收回,请确认</h2>
|
||||
</div>
|
||||
<group invisible="node_btn_name != '分发'">
|
||||
<field name="comment_note_id" required="node_btn_name != '结束'" string="分发意见"/>
|
||||
<field name="employee_ids" widget="many2many_tags" string="董事长" domain="[('user_role_id.name', '=', '董事长')]"/>
|
||||
|
||||
@@ -375,7 +375,7 @@ class HrAttendanceMonthDetail(models.Model):
|
||||
|
||||
def button_put(self):
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的确认'), ('parent_id', '!=', False)])
|
||||
str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=list'.format(self.id, menu_id.id, menu_id.action.id)
|
||||
str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=form'.format(self.id, menu_id.id, menu_id.action.id)
|
||||
we_id = self.env['hr.employee'].search([('id', '=', self.employee_id.id)]).wecom_userid
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok', user_id=we_id, title="考勤确认",
|
||||
description=self.employee_id.name + '请确认你的考勤:',
|
||||
@@ -394,7 +394,7 @@ class HrAttendanceMonthDetail(models.Model):
|
||||
detail_ids = self.env["hr.attendance.month.detail"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for detail in detail_ids:
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的确认'), ('parent_id', '!=', False)])
|
||||
str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=list'.format(
|
||||
str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=form'.format(
|
||||
self.id, menu_id.id, menu_id.action.id)
|
||||
we_id = self.env['hr.employee'].search([('id', '=', detail.employee_id)]).wecom_userid
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='attendance', user_id=we_id, title="考勤确认",
|
||||
@@ -495,7 +495,7 @@ class HrAttendanceMonthDetail(models.Model):
|
||||
attendance_details = self.env['hr.attendance.month.detail'].search([])
|
||||
for detail in attendance_details:
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的确认'), ('parent_id', '!=', False)])
|
||||
str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=list'.format(
|
||||
str = 'https://oa.thtzjt.com/web#id={}&cids=1&menu_id={}&action={}&model=hr.attendance.month.detail&view_type=form'.format(
|
||||
self.id, menu_id.id, menu_id.action.id)
|
||||
we_id = self.env['hr.employee'].search([('id', '=', detail.employee_id)]).wecom_userid
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='attendance', user_id=we_id, title="考勤确认",
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<field name="model">hr.attendance.year</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="hr attendance year" editable="top" js_class="custom_month_statements_button">
|
||||
<field name="year" />
|
||||
</tree>
|
||||
<field name="year"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -21,28 +21,28 @@
|
||||
<field name="model">hr.attendance.month</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="hr attendance month" js_class="custom_month_statements_button">
|
||||
<field name="current_year" />
|
||||
<field name="current_month" />
|
||||
<field name="current_year"/>
|
||||
<field name="current_month"/>
|
||||
<field name="is_statistics"/>
|
||||
<field name="statistics_time"/>
|
||||
<field name="yuthon_company" />
|
||||
<field name="yuthon_company"/>
|
||||
<button name="action_show_details" string="汇总明细" type="object" title="Show Details" icon="fa-list"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_hr_attendance_month_form" model="ir.ui.view">
|
||||
<record id="view_hr_attendance_month_form" model="ir.ui.view">
|
||||
<field name="name">hr.attendance.month.form</field>
|
||||
<field name="model">hr.attendance.month</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="hr attendance month">
|
||||
<sheet>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="current_year" />
|
||||
<field name="current_month" />
|
||||
<field name="is_statistics"/>
|
||||
<field name="current_year"/>
|
||||
<field name="current_month"/>
|
||||
<field name="is_statistics"/>
|
||||
<field name="statistics_time"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -59,24 +59,26 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="hr attendance detail" editable="bottom">
|
||||
<header>
|
||||
<button class="oe_stat_button" name="send_confirm_attendance" string="发送考勤确认" type="object" icon="fa-bars"/>
|
||||
<button class="oe_stat_button" name="update_attendance_month" string="更新考勤明细" type="object" icon="fa-bars"/>
|
||||
<button class="oe_stat_button" name="send_confirm_attendance" string="发送考勤确认" type="object"
|
||||
icon="fa-bars"/>
|
||||
<button class="oe_stat_button" name="update_attendance_month" string="更新考勤明细" type="object"
|
||||
icon="fa-bars"/>
|
||||
</header>
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id" optional="hide"/>
|
||||
<field name="current_year" />
|
||||
<field name="current_month" />
|
||||
<field name="current_year"/>
|
||||
<field name="current_month"/>
|
||||
<field name="entry_date"/>
|
||||
<field name="expected_date"/>
|
||||
<field name="work_overtime" />
|
||||
<field name="work_overtime"/>
|
||||
<!-- todo 需要什么字段往上加什么-->
|
||||
<!-- 打卡-->
|
||||
<field name="come_late"/>
|
||||
<field name="is_early_card" />
|
||||
<field name="is_no_card" />
|
||||
<field name="is_early_card"/>
|
||||
<field name="is_no_card"/>
|
||||
<field name="is_work"/>
|
||||
<!-- 请假-->
|
||||
<field name="unpaid_leave" />
|
||||
<field name="unpaid_leave"/>
|
||||
<field name="cop_leave"/>
|
||||
<field name="annual_leave"/>
|
||||
<field name="duty_off_leave"/>
|
||||
@@ -95,7 +97,8 @@
|
||||
<field name="holiday_id"/>
|
||||
<field name="note"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="state" widget="badge" decoration-info="state == 'unconfirmed'" decoration-success="state == 'confirmed'"/>
|
||||
<field name="state" widget="badge" decoration-info="state == 'unconfirmed'"
|
||||
decoration-success="state == 'confirmed'"/>
|
||||
<button name="button_put" string="发送" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -104,22 +107,20 @@
|
||||
<field name="name">hr.attendance.month.detail.tree</field>
|
||||
<field name="model">hr.attendance.month.detail</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="hr attendance detail" editable="bottom">
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id" optional="hide"/>
|
||||
<field name="current_year" />
|
||||
<field name="current_month" />
|
||||
<tree string="hr attendance detail">
|
||||
<field name="current_year"/>
|
||||
<field name="current_month"/>
|
||||
<field name="entry_date"/>
|
||||
<field name="expected_date"/>
|
||||
<field name="work_overtime" />
|
||||
<field name="work_overtime"/>
|
||||
<!-- todo 需要什么字段往上加什么-->
|
||||
<!-- 打卡-->
|
||||
<field name="come_late"/>
|
||||
<field name="is_early_card" />
|
||||
<field name="is_no_card" />
|
||||
<field name="is_early_card"/>
|
||||
<field name="is_no_card"/>
|
||||
<field name="is_work"/>
|
||||
<!-- 请假-->
|
||||
<field name="unpaid_leave" />
|
||||
<field name="unpaid_leave"/>
|
||||
<field name="cop_leave"/>
|
||||
<field name="annual_leave"/>
|
||||
<field name="duty_off_leave"/>
|
||||
@@ -135,32 +136,85 @@
|
||||
<field name="recovery_sick_leave"/>
|
||||
<field name="exam_leave"/>
|
||||
<!-- 其他-->
|
||||
<field name="holiday_id"/>
|
||||
<field name="holiday_id" invisible="1"/>
|
||||
<field name="note"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="state" widget="badge" decoration-info="state == 'unconfirmed'" decoration-success="state == 'confirmed'"/>
|
||||
<field name="yuthon_company" invisible="1"/>
|
||||
<field name="state" widget="badge" decoration-info="state == 'unconfirmed'"
|
||||
decoration-success="state == 'confirmed'"/>
|
||||
<button name="button_confirm" string="确认" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_hr_attendance_month_detail_form" model="ir.ui.view">
|
||||
<record id="view_hr_attendance_month_detail_form1" model="ir.ui.view">
|
||||
<field name="name">hr.attendance.month.detail.tree</field>
|
||||
<field name="model">hr.attendance.month.detail</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create="0" delete="0" edit="0">
|
||||
<sheet>
|
||||
<header>
|
||||
<button name="button_confirm" string="确认" type="object" class="btn-primary"/>
|
||||
</header>
|
||||
<group>
|
||||
<group>
|
||||
<field name="current_year"/>
|
||||
<field name="current_month"/>
|
||||
<field name="entry_date"/>
|
||||
<field name="expected_date"/>
|
||||
<field name="work_overtime"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="come_late"/>
|
||||
<field name="is_early_card"/>
|
||||
<field name="is_no_card"/>
|
||||
<field name="is_work"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="unpaid_leave"/>
|
||||
<field name="cop_leave"/>
|
||||
<field name="annual_leave"/>
|
||||
<field name="duty_off_leave"/>
|
||||
<field name="marriage_leave"/>
|
||||
<field name="general_off_leave"/>
|
||||
<field name="maternity_leave"/>
|
||||
<field name="family_planning_leave"/>
|
||||
<field name="bereavement_leave"/>
|
||||
<field name="home_visit_leave"/>
|
||||
<field name="parents_meeting_leave"/>
|
||||
<field name="general_sick_leave"/>
|
||||
<field name="hospital_sick_leave"/>
|
||||
<field name="recovery_sick_leave"/>
|
||||
<field name="exam_leave"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="holiday_id" invisible="1"/>
|
||||
<field name="note"/>
|
||||
<field name="yuthon_company" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_hr_attendance_month_detail_form" model="ir.ui.view">
|
||||
<field name="name">hr.attendance.month.detail.form</field>
|
||||
<field name="model">hr.attendance.month.detail</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="hr attendance month detail">
|
||||
<sheet>
|
||||
<group>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="current_year" />
|
||||
<field name="current_month" />
|
||||
<field name="current_year"/>
|
||||
<field name="current_month"/>
|
||||
<field name="required_attendance_days"/>
|
||||
<field name="actual_attendance_days"/>
|
||||
<field name="holiday_id"/>
|
||||
<!-- <field name="company_area"/>-->
|
||||
<!-- <field name="company_area"/>-->
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="compensatory_leave"/>
|
||||
<field name="leave_of_absence"/>
|
||||
<field name="leave_of_sick"/>
|
||||
@@ -169,19 +223,19 @@
|
||||
<field name="statutory_leave"/>
|
||||
<field name="note"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="state" />
|
||||
<field name="state"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="客户签名" name="customer_signature">
|
||||
<group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="客户签名" name="customer_signature">
|
||||
<group>
|
||||
<field name="signed_by"/>
|
||||
<field name="signed_on"/>
|
||||
<field name="signature" widget="image"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -191,13 +245,13 @@
|
||||
<field name="model">hr.attendance.month.detail</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="attendance_year_id" />
|
||||
<field name="current_month" />
|
||||
<field name="attendance_year_id"/>
|
||||
<field name="current_month"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_by_current_year_id" string="年份" context="{'group_by':'attendance_year_id'}"/>
|
||||
<filter name="group_by_current_month" string="月份" context="{'group_by':'current_month'}"/>
|
||||
<!-- <filter name="group_by_company_id" string="公司" context="{'group_by':'company_id'}"/>-->
|
||||
<!-- <filter name="group_by_department_id" string="部门" context="{'group_by':'department_id'}"/>-->
|
||||
<!-- <filter name="group_by_company_id" string="公司" context="{'group_by':'company_id'}"/>-->
|
||||
<!-- <filter name="group_by_department_id" string="部门" context="{'group_by':'department_id'}"/>-->
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -210,8 +264,8 @@
|
||||
<field name="search_view_id" ref="view_hr_attendance_month_detail_search"/>
|
||||
<field name="context">
|
||||
{
|
||||
"search_default_group_by_current_year_id":1,
|
||||
"search_default_group_by_current_month":1
|
||||
"search_default_group_by_current_year_id":1,
|
||||
"search_default_group_by_current_month":1
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
@@ -220,17 +274,11 @@
|
||||
<field name="res_model">hr.attendance.month.detail</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('employee_id.user_id', '=', uid)]</field>
|
||||
<field name="search_view_id" ref="view_hr_attendance_month_detail_search"/>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_hr_attendance_month_detail_tree1')})]"/>
|
||||
<field name="context">
|
||||
{
|
||||
"search_default_group_by_current_year_id":1,
|
||||
"search_default_group_by_current_month":1
|
||||
}
|
||||
</field>
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_hr_attendance_month_detail_tree1')}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_hr_attendance.view_hr_attendance_month_detail_form1')})]"/>
|
||||
</record>
|
||||
<record id="all_data_attendance_put_month" model="ir.actions.server">
|
||||
<record id="all_data_attendance_put_month" model="ir.actions.server">
|
||||
<field name="name">批量发送</field>
|
||||
<field name="model_id" ref="yuthon_hr_attendance.model_hr_attendance_month_detail"/>
|
||||
<field name="binding_model_id" ref="yuthon_hr_attendance.model_hr_attendance_month_detail"/>
|
||||
@@ -244,4 +292,4 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.button_compute_all()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
</odoo>
|
||||
@@ -20,9 +20,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="评估申请" create="0">
|
||||
<sheet>
|
||||
<header>
|
||||
<button name="put_property_record" type="object" string="提交备案申请" class="oe_highlight"/>
|
||||
</header>
|
||||
<group col="4">
|
||||
<group>
|
||||
<field name="code" string="流水号" readonly="1"/>
|
||||
|
||||
Reference in New Issue
Block a user