diff --git a/soong_workflow/models/soong_workflow_node.py b/soong_workflow/models/soong_workflow_node.py
index aef18abfc..6a923149f 100644
--- a/soong_workflow/models/soong_workflow_node.py
+++ b/soong_workflow/models/soong_workflow_node.py
@@ -113,6 +113,13 @@ class SoongWorkflowNode(models.Model):
},)]
else:
val["button_ids"] = [
+ (0, 0, {
+ "name": _("上议题"),
+ "workflow_id": val['workflow_id'],
+ "sequence":-1,
+ "action_type": "code",
+ "code": "obj.action_meeting()"
+ }),
(0, 0, {
"name": _("转交"),
"workflow_id": val['workflow_id'],
@@ -151,6 +158,7 @@ class SoongWorkflowNode(models.Model):
"action_type": "code",
"has_comment": True,
},)]
+
return super().create(values)
@api.depends("bg_color", "label_color", "use_custom_colors", "flow_start", "flow_end")
diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py
index badddeb7e..a8c8ef95c 100644
--- a/yuthon_hr_attendance/__manifest__.py
+++ b/yuthon_hr_attendance/__manifest__.py
@@ -17,7 +17,6 @@
'security/ir.model.access.csv',
# 'security/approval_attendance.xml',
'data/attendance_code_data.xml',
- 'data/attendance_data.xml',
'views/inherit_hr_employee_views.xml',
'views/hr_attendance_views.xml',
'views/resource_calendar_leaves_views.xml',
@@ -30,8 +29,6 @@
'views/leave_approval.xml',
'views/remove_holiday_approval.xml',
'views/card_approval.xml',
- 'views/holiday_manage.xml',
- 'views/holiday_manage_balance.xml',
'views/attendance_scheme.xml',
'views/attendance_iot_datas.xml',
'views/all_attendance_menu.xml',
diff --git a/yuthon_hr_attendance/data/attendance_data.xml b/yuthon_hr_attendance/data/attendance_data.xml
deleted file mode 100644
index 638d617c8..000000000
--- a/yuthon_hr_attendance/data/attendance_data.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
- 加班申请
-
-
-
-
- 外出申请
-
-
-
-
-
-
-
-
-
- 请假申请
-
-
-
-
- 销假申请
-
-
-
-
- 补卡申请
-
-
-
\ No newline at end of file
diff --git a/yuthon_hr_attendance/models/__init__.py b/yuthon_hr_attendance/models/__init__.py
index 70b02613f..419f07e07 100644
--- a/yuthon_hr_attendance/models/__init__.py
+++ b/yuthon_hr_attendance/models/__init__.py
@@ -10,9 +10,8 @@ from . import duty_approval
from . import leave_approval
from . import remove_holiday_approval
from . import card_approval
-from . import holiday_manage
-from . import holiday_manage_balance
from . import attendance_iot_manager
from . import attendance_iot_datas
from . import attendance_scheme
+
diff --git a/yuthon_hr_attendance/models/holiday_manage.py b/yuthon_hr_attendance/models/holiday_manage.py
deleted file mode 100644
index 9632f9233..000000000
--- a/yuthon_hr_attendance/models/holiday_manage.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from odoo import api, fields, models, tools
-from odoo.exceptions import ValidationError
-from datetime import datetime
-
-
-class HolidayManage(models.Model):
- _name = "holiday.manage"
- _description = '假期管理'
- _rec_name = 'name'
-
- # 基础信息设置
- name = fields.Char(string="假期名称")
- # 范围,角色,部门,人员
- department_ids = fields.Many2many('hr.department', string='部门范围')
- employee_ids = fields.Many2many('hr.employee', string='人员范围')
- users_role_ids = fields.Many2many('soong.user.role', string='角色范围')
- holiday_users_ids = fields.Many2many('res.users', string="申请假期人员", compute="compute_holiday_users_ids", store=True)
-
- is_limit = fields.Boolean(string="新员工请假是否限制", help='入职即可请假')
- leave_time = fields.Selection(selection=[(str(i), str(i)) for i in range(1, 13)], string="入职月份", help='入职时长小于此月份时,不可申请此假期')
- start_time = fields.Datetime(string="生效日期", default=fields.Datetime.now)
- end_time = fields.Datetime(string="失效日期",)
- is_enable = fields.Boolean(string="是否启用", default="False", compute="compute_is_enable", store=True)
- # 请假时长核算规则
- leave_unit = fields.Selection([('day', '按天'), ('hours', '按小时')], string="请假单位")
- unit_conversion = fields.Float(string="单位换算", help='将按此规则对天与小时进行转换,有打卡规则按工作时长计算')
- time_long = fields.Selection([('nature', '自然日'), ('work', '工作日')], string="时长计算")
- # 假期余额发放规则
-
- is_quota = fields.Boolean(string="是否限额")
- issuance_method = fields.Selection([('moth', '按月自动发放'), ('year', '按年自动发放'), ('manual', '手动导入余额')], string='发放方式')
- # 按月自动发放
-
- # 按年自动发放
-
- # valid = fields.Selection([('forever', '永久有效'), ('no', '每年固定日期生效')], string="假期有效期")
- # release_time = fields.Selection([('calendar', '自然年'), ('onboard', '员工入职日期发放')], string="发放时间")
- # credit_rules = fields.Selection([('fixed', '固定额度'), ('division', '按司龄发放'),('seniority','按工龄发放')], string="额度计算规则")
- # person_year = fields.Float(string="每人每年发放")
- # is_balance= fields.Boolean(string="按实际工作时长发放余额")
- # valid_holidays = fields.Integer(string="假期有效期")
- # is_time = fields.Boolean(string="允许有效时长")
-
-
- @api.depends('department_ids', 'employee_ids', 'users_role_ids')
- def compute_holiday_users_ids(self):
- department_users_list = users_role_list = []
- for users in self:
- if users.department_ids:
- # 查看是否下级部门
- for depart in users.department_ids:
- department_users_data = users.env['hr.employee'].search([('department_id', '=', depart.id.origin)])
- department_users_list = [de.user_id.id for de in department_users_data]
- if depart.child_ids:
- for child in depart.child_ids:
- department_child_users_data = users.env['hr.employee'].search(
- [('department_id', '=', child.id.origin)])
- department_users_list += [de.user_id.id for de in department_child_users_data]
- employee_users_list = users.employee_ids.user_id.ids
- if users.users_role_ids:
- for user_id in users.users_role_ids:
- user_role_data = users.env['hr.employee'].search(
- ['|', ('user_role_id', '=', user_id.id.origin), ('user_role_ids', '=', user_id.id.origin)])
- users_role_list = [ro.user_id.id for ro in user_role_data]
- publish_user_list = department_users_list + employee_users_list + users_role_list
- false_none_list = [x for x in publish_user_list if x != False]
- users.room_users_ids = [(6, 0, list(set(false_none_list)))]
-
- @api.depends('start_time', 'end_time')
- def compute_is_enable(self):
- for rec in self:
- if rec.start_time and rec.end_time:
- if rec.start_time < datetime.now() and rec.end_time > datetime.now():
- rec.is_enable = True
- else:
- rec.is_enable = False
- else:
- rec.is_enable = False
-
-
-
-
-
-
diff --git a/yuthon_hr_attendance/models/holiday_manage_balance.py b/yuthon_hr_attendance/models/holiday_manage_balance.py
deleted file mode 100644
index 275bb553d..000000000
--- a/yuthon_hr_attendance/models/holiday_manage_balance.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-from odoo import api, fields, models, tools
-from odoo.exceptions import ValidationError
-
-
-class HolidayManageBalance(models.Model):
- _name = "holiday.manage.balance"
- _description = '假期余额'
- _rec_name = 'name'
-
- name = fields.Many2one('hr.employee', string="姓名")
- department_id = fields.Many2one('hr.department', string='部门')
- onboard_date = fields.Date(string="入职日期")
- first_data = fields.Datetime(string="首次参加工作时间")
- annual_leave = fields.Float(string="年假")
- time_off = fields.Float(string="补休")
-
- leave = fields.Char(string="事假")
- sick_leave = fields.Char(string="病假")
-
- type_leave = fields.Many2one('holiday.type.setting',string="请假类型")
- estimated_time = fields.Datetime(string="预计时长")
- actual_time = fields.Datetime(string="实际时长")
- used_time = fields.Datetime(string="已用时长")
- rest_time = fields.Datetime(string="剩余时长")
-
-
-
-
diff --git a/yuthon_hr_attendance/security/ir.model.access.csv b/yuthon_hr_attendance/security/ir.model.access.csv
index b3e4a98ad..684f152d2 100644
--- a/yuthon_hr_attendance/security/ir.model.access.csv
+++ b/yuthon_hr_attendance/security/ir.model.access.csv
@@ -3,20 +3,14 @@ access_resource_calendar_holiday,resource.calendar.holiday,model_resource_calend
access_overtime_approval,overtime.approval,model_overtime_approval,base.group_user,1,1,1,1
access_go_approval,go.approval,model_go_approval,base.group_user,1,1,1,1
access_duty_approval,duty.approval,model_duty_approval,base.group_user,1,1,1,1
-access_leave_approval,leave.approval,model_leave_approval,base.group_user,1,1,1,1
-access_holidays_approval,holidays.approval,model_holidays_approval,base.group_user,1,1,1,1
access_remove_holiday_approval,remove.holiday.approval,model_remove_holiday_approval,base.group_user,1,1,1,1
access_card_approval,card.approval,model_card_approval,base.group_user,1,1,1,1
-access_holiday_manage,holiday_manage,model_holiday_manage,base.group_user,1,1,1,1
access_attendance_iot,attendance_iot,model_attendance_iot,base.group_user,1,1,1,1
access_attendance_iot_manager,attendance_iot_manager,model_attendance_iot_manager,base.group_user,1,1,1,1
access_attendance_iot_manager_wizard,attendance_iot_manager_wizard,model_attendance_iot_manager_wizard,base.group_user,1,1,1,1
-access_holiday_manage_balance,holiday_manage_balance,model_holiday_manage_balance,base.group_user,1,1,1,1
access_attendance_iot_datas,attendance_iot_datas,model_attendance_iot_datas,base.group_user,1,1,1,1
access_attendance_scheme,attendance_scheme,model_attendance_scheme,base.group_user,1,1,1,1
-access_holidays_approvals_line,holidays.approvals.line,model_holidays_approvals_line,base.group_user,1,1,1,1
access_card_approvals_line,card.approval.line,model_card_approvals_line,base.group_user,1,1,1,1
-access_holidays_approvals_line,holidays.approvals.line,model_holidays_approvals_line,base.group_user,1,1,1,1
access_go_approvals_line,go.approvals.line,model_go_approvals_line,base.group_user,1,1,1,1
access_overtime_user_line,overtime.user.line,model_overtime_user_line,base.group_user,1,1,1,1
access_duty_approval_line,duty.approval.line,model_duty_approval_line,base.group_user,1,1,1,1
diff --git a/yuthon_hr_attendance/views/all_attendance_menu.xml b/yuthon_hr_attendance/views/all_attendance_menu.xml
index 62216cb65..4c263b4d8 100644
--- a/yuthon_hr_attendance/views/all_attendance_menu.xml
+++ b/yuthon_hr_attendance/views/all_attendance_menu.xml
@@ -20,12 +20,6 @@
parent="menu_hr_attendance_approval_request" sequence="10" action="approval_request_remove_holiday"/>
-
-
-
+
+
+
diff --git a/yuthon_issue/models/__init__.py b/yuthon_issue/models/__init__.py
index 493c668cf..313fe4791 100644
--- a/yuthon_issue/models/__init__.py
+++ b/yuthon_issue/models/__init__.py
@@ -8,3 +8,4 @@ from . import inherit_room_booking
from . import issue_approval
from . import inherit_hr_employee
from . import issue_meeting_minutes
+from . import inherit_soong_workflow_mixin
diff --git a/yuthon_issue/models/inherit_soong_workflow_mixin.py b/yuthon_issue/models/inherit_soong_workflow_mixin.py
new file mode 100644
index 000000000..791bdca43
--- /dev/null
+++ b/yuthon_issue/models/inherit_soong_workflow_mixin.py
@@ -0,0 +1,22 @@
+from odoo import api, fields, models, _
+from odoo.exceptions import UserError
+
+
+class SoongWorkflowMixin(models.AbstractModel):
+ _inherit = 'soong.workflow.mixin'
+
+ # 上议题
+ def action_meeting(self):
+ if self.is_issues:
+ raise UserError('当前议题已上会,请勿重复提交')
+ self.write({'is_issues': 'Ture'})
+ issue_id = self.env['issue.library'].create({'name': self.name})
+ self.related_issues_id = issue_id.id
+ workflow_record_id = self.env["soong.workflow.record"].search([("res_model", "=", self._name), ("res_id", "=", self.id)])
+ self.env['issue.library.approval.line'].create({
+ 'issue_library_id': issue_id.id,
+ 'workflow_record_id': workflow_record_id.id,
+ 'approval_type': workflow_record_id.workflow_id.id,
+ 'code': self.code,
+ 'approval_date': fields.Datetime.now(),
+ })
diff --git a/yuthon_performance/models/yuthon_Index_approval.py b/yuthon_performance/models/yuthon_Index_approval.py
index 12cdd88e3..296b489ba 100644
--- a/yuthon_performance/models/yuthon_Index_approval.py
+++ b/yuthon_performance/models/yuthon_Index_approval.py
@@ -35,8 +35,6 @@ class YuthonIndexApproval(models.Model):
'new_end_index_time': new.end_index_time,
'new_unit_compute': new.unit_compute,
'new_weight': new.weight,
- 'new_compute_method': new.compute_method,
- 'new_compute_act': new.compute_act,
}))
self.new_index_library_ids = new_lines
diff --git a/yuthon_performance/models/yuthon_duty_management.py b/yuthon_performance/models/yuthon_duty_management.py
index d2236e0c4..840b67ded 100644
--- a/yuthon_performance/models/yuthon_duty_management.py
+++ b/yuthon_performance/models/yuthon_duty_management.py
@@ -75,8 +75,8 @@ class YuthonDutyManagement(models.Model):
'type': 'ir.actions.act_window',
'res_model': 'yuthon.tissue.duty.approval',
'views': [(form_id, 'form')],
- 'context': {'default_change_duty_kpi_ids':self.performance_kpi_ids.ids,
- 'default_change_duty_gs_ids':self.performance_gs_ids.ids,
+ 'context': {'default_change_duty_kpi_ids': [(6, 0, self.performance_kpi_ids.ids)],
+ 'default_change_duty_gs_ids':[(6, 0, self.performance_gs_ids.ids)],
}}
diff --git a/yuthon_performance/models/yuthon_tissue_duty_approval.py b/yuthon_performance/models/yuthon_tissue_duty_approval.py
index 01d0b8445..b6b70d307 100644
--- a/yuthon_performance/models/yuthon_tissue_duty_approval.py
+++ b/yuthon_performance/models/yuthon_tissue_duty_approval.py
@@ -52,17 +52,17 @@ class YuthonTissueDutyApproval(models.Model):
}))
self.new_gs_duty_approval_ids = new_lines
- @api.model_create_multi
- def create(self, vals_list):
- res = super().create(vals_list)
- for vals in vals_list:
- if vals['new_kpi_duty_approval_ids']:
- for line in vals['new_kpi_duty_approval_ids']:
- self.env['yuthon.kpi.line'].create({
- 'performance_kpi_id':res.id,
- 'duty_index_name':line.new_duty_index_name
- })
- return res
+ # @api.model_create_multi
+ # def create(self, vals_list):
+ # res = super().create(vals_list)
+ # for vals in vals_list:
+ # if vals['new_kpi_duty_approval_ids']:
+ # for line in vals['new_kpi_duty_approval_ids']:
+ # self.env['yuthon.kpi.line'].create({
+ # 'performance_kpi_id':line.id,
+ # 'duty_index_name':line.new_duty_index_name
+ # })
+ # return res
class NewKpiDutyApproval(models.Model):
diff --git a/yuthon_performance/views/yuthon_Index_approval.xml b/yuthon_performance/views/yuthon_Index_approval.xml
index a38f48712..107d8221f 100644
--- a/yuthon_performance/views/yuthon_Index_approval.xml
+++ b/yuthon_performance/views/yuthon_Index_approval.xml
@@ -54,8 +54,6 @@
-
-
@@ -74,8 +72,6 @@
-
-
diff --git a/yuthon_performance/views/yuthon_duty_management.xml b/yuthon_performance/views/yuthon_duty_management.xml
index 645ac28df..8016fe0c9 100644
--- a/yuthon_performance/views/yuthon_duty_management.xml
+++ b/yuthon_performance/views/yuthon_duty_management.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py
index 88d4a490a..bca2c170a 100644
--- a/yuthon_property/__manifest__.py
+++ b/yuthon_property/__manifest__.py
@@ -20,6 +20,8 @@
'views/property_patrol_standard.xml',
'views/yuthon_draw_result_views.xml',
'views/yuthon_expert_database_views.xml',
+ 'views/property_rental_form_views.xml',
+ 'views/property_transaction_confirmed.xml',
'views/yuthon_resource_mgmt_config_views.xml',
'views/property_evaluate_application_views.xml',
'views/yuthon_property_evaluation_views.xml',
diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py
index ba62b2c4a..4035f3af8 100644
--- a/yuthon_property/models/__init__.py
+++ b/yuthon_property/models/__init__.py
@@ -9,4 +9,7 @@ from . import yuthon_resource_mgmt_config
from . import yuthon_draw_result
from . import yuthon_expert_database
from . import yuthon_property_evaluation
-from . import property_evaluate_application
\ No newline at end of file
+from . import property_evaluate_application
+from . import property_rental_form
+
+from . import property_transaction_confirmed
\ No newline at end of file
diff --git a/yuthon_property/models/property_evaluate_application.py b/yuthon_property/models/property_evaluate_application.py
index 763b8dd5b..b90c410e5 100644
--- a/yuthon_property/models/property_evaluate_application.py
+++ b/yuthon_property/models/property_evaluate_application.py
@@ -4,12 +4,12 @@ from odoo import models, fields, api
class PropertyEvaluateApplication(models.Model):
_name = 'property.evaluate.application'
_description = '物业评估申请'
- _inherit = 'mail.activity.mixin'
+ _inherit = ['soong.workflow.mixin']
name = fields.Char(string='标题')
code = fields.Char(string='编号', required=True, copy=False,
- default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_property_code_sequence'))
+ default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_property_code'))
main_text = fields.Html(string='正文')
is_meet = fields.Boolean(string="是否上会")
is_experts = fields.Boolean(string="是否需要专家评审")
diff --git a/yuthon_property/models/property_rental_form.py b/yuthon_property/models/property_rental_form.py
index a63b1c417..a2067c865 100644
--- a/yuthon_property/models/property_rental_form.py
+++ b/yuthon_property/models/property_rental_form.py
@@ -2,7 +2,7 @@ from odoo import models, fields, api
class PropertyRentalForm(models.Model):
- _name = 'yuthon.property.rental.form'
+ _name = 'property.rental.form'
_description = '出租申报表'
name = fields.Char(string='名称')
diff --git a/yuthon_property/models/property_transaction_confirmed.py b/yuthon_property/models/property_transaction_confirmed.py
new file mode 100644
index 000000000..3891a9447
--- /dev/null
+++ b/yuthon_property/models/property_transaction_confirmed.py
@@ -0,0 +1,15 @@
+from odoo import models, fields, api, exceptions, _
+from datetime import datetime
+from odoo.exceptions import UserError, ValidationError
+
+
+class PropertyTransactionConfirmed(models.Model):
+ _name = 'property.transaction.confirmed'
+ _description = '成交确认书'
+
+
+ name = fields.Char(string='标题')
+ property_id = fields.Char(string='物业') #后续many2many字段
+ lessee = fields.Char(string='承租人')
+ entity_type = fields.Selection([('person', '个人'), ('enterprise', '企业')], string='实体类型')
+ details = fields.Text(string='详情') #这里可以完善承租方信息,为租赁合同服务
diff --git a/yuthon_property/models/yuthon_property_evaluation.py b/yuthon_property/models/yuthon_property_evaluation.py
index aedb452b6..6dc6be45b 100644
--- a/yuthon_property/models/yuthon_property_evaluation.py
+++ b/yuthon_property/models/yuthon_property_evaluation.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api
-
+from odoo.exceptions import UserError, ValidationError
class YuthonPropertyEvaluation(models.Model):
_name = 'yuthon.property.evaluation'
@@ -20,6 +20,7 @@ class YuthonPropertyEvaluation(models.Model):
district_manager = fields.Char(string='片区负责人')
company = fields.Char(string='所属公司')
remarks = fields.Text(string='备注')
+ state = fields.Selection([('done','已评估'), ('draft','待评估'), ('ing','评估中')],string='评估状态',default='draft')
sequence = fields.Integer(string='序号', default=10)
@@ -37,4 +38,23 @@ class YuthonPropertyEvaluation(models.Model):
assessment_category = fields.Char(string='评估类别')
property_message_id = fields.Many2one('property.evaluate.application', string='关联物业评估申请')
+ def all_issue_pull(self):
+ issue_active_ids = self.env["yuthon.property.evaluation"].browse(self._context.get('active_ids', self._context.get('active_id')))
+ if self.state != 'draft':
+ raise UserError("当前状态不允许提交")
+ for i in issue_active_ids:
+ if i.state != 'draft':
+ raise UserError("当前状态不允许提交")
+ form_id = self.env.ref("yuthon_property.property_evaluate_application_form").id
+ if not issue_active_ids:
+ issue_active_ids = self
+ for record in issue_active_ids:
+ record.write({"state": "ing"})
+ return {
+ 'name': '提交评估',
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'property.evaluate.application',
+ 'views': [(form_id, 'form')],
+ 'context':{'default_property_message_ids':[(6, 0,issue_active_ids.ids)]},
+ }
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index aca0079c3..942ec8e8c 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -16,5 +16,8 @@ access_yuthon_resource_purpose,yuthon_resource_purpose,model_yuthon_resource_pur
access_yuthon_resource_management_type,yuthon_resource_management_type,model_yuthon_resource_management_type,base.group_user,1,1,1,1
access_yuthon_resource_billing_type,yuthon_resource_billing_type,model_yuthon_resource_billing_type,base.group_user,1,1,1,1
access_property_evaluate_application,property_evaluate_application,model_property_evaluate_application,base.group_user,1,1,1,1
-
+access_property_rental_form,property_rental_form,model_property_rental_form,base.group_user,1,1,1,1
+access_property_transaction_confirmed,property_transaction_confirmed,model_property_transaction_confirmed,base.group_user,1,1,1,1
+access_yuthon_property_evaluation,yuthon_property_evaluation,model_yuthon_property_evaluation,base.group_user,1,1,1,1
+access_property_eligibility_line,property_eligibility_line,model_property_eligibility_line,base.group_user,1,1,1,1
diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml
index 6fcd0dc56..6ed1f9c84 100644
--- a/yuthon_property/views/menuitem.xml
+++ b/yuthon_property/views/menuitem.xml
@@ -55,23 +55,25 @@
+ parent="yuthon_property_menu_root"/>
+
+ action="action_property_rental_form"/>
+
+ action="yuthon_property_approval.property_eligibility_action"/>
+
+ action="action_property_transaction_confirmed"/>
+ action="yuthon_property_approval.property_lease_contract_action"/>