diff --git a/yuthon_hr_attendance/models/yuthon_duty_plan.py b/yuthon_hr_attendance/models/yuthon_duty_plan.py
index e9c61f15e..263136d08 100644
--- a/yuthon_hr_attendance/models/yuthon_duty_plan.py
+++ b/yuthon_hr_attendance/models/yuthon_duty_plan.py
@@ -36,13 +36,6 @@ class YuthonDutyPlan(models.Model):
next_month = (month % 12) + 1
next_year = year + (1 if next_month == 1 else 0) # 如果是12月,年份加1
last_day_of_month = datetime(next_year, next_month, 1)
- existing_slots = self.env['planning.slot'].search([
- ('role_id.name', '=', '联安粮库'),
- ('start_datetime', '>=', first_day_of_month),
- ('start_datetime', '<=', last_day_of_month),
- ])
- if len(existing_slots) > 0:
- raise UserError(f"该月已经有排程,请选择其他时间。")
else:
next_month = (month % 12) + 1
next_year = year + (1 if next_month == 1 else 0)
@@ -50,13 +43,6 @@ class YuthonDutyPlan(models.Model):
next_next_month = (next_month % 12) + 1
next_next_year = next_year + (1 if next_next_month == 1 else 0)
last_day_of_month = datetime(next_next_year, next_next_month, 1)
- existing_slots = self.env['planning.slot'].search([
- ('role_id.name', '=', '联安粮库'),
- ('start_datetime', '>=', first_day_of_month),
- ('start_datetime', '<=', last_day_of_month),
- ])
- if len(existing_slots) > 0:
- raise UserError(f"该月已经有排程,请选择其他时间。")
latest_slot = self.env['planning.slot'].search([('role_id.name', '=', '联安粮库')], order='start_datetime desc',limit=1)
if latest_slot:
latest_month = latest_slot.start_datetime.month
diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py
index 59545d7bd..3afe9edaa 100644
--- a/yuthon_hr_employee/models/yuthon_hr_employee.py
+++ b/yuthon_hr_employee/models/yuthon_hr_employee.py
@@ -56,7 +56,8 @@ class YuthonHrEmployee(models.Model):
user_number_start_time = fields.Date(string="身份证开始时间")
user_number_end_time = fields.Date(string="身份证到期时间")
is_identification = fields.Boolean(string="是否填写身份证")
- card_documents_id = fields.Many2one('ir.attachment', string="身份证")
+ card_documents_id = fields.Many2one('ir.attachment', string="身份证正面")
+ card_back_documents_id = fields.Many2one('ir.attachment', string="身份证反面")
hukou_documents_id = fields.Many2one('ir.attachment', string="户口本")
marriage_documents_id = fields.Many2one('ir.attachment', string="结婚证")
nation = fields.Selection(nation_list, string="民族")
diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
index 3afb36681..a8cedfbf9 100644
--- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
+++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
@@ -107,6 +107,7 @@
+
diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py
index 84d719c12..cc0a4686e 100644
--- a/yuthon_property/__manifest__.py
+++ b/yuthon_property/__manifest__.py
@@ -47,6 +47,7 @@
'views/property_check_room_views.xml',
'views/property_check_stairs_views.xml',
'views/property_check_decorate_views.xml',
+ 'views/property_evaluation_plan_view.xml',
'views/property_other_list_views.xml',
'views/property_bank_statements_views.xml',
'views/property_water_reading_views.xml',
@@ -55,6 +56,7 @@
'views/property_accounts_receivable_views.xml',
'wizard/yuthon_property_wizard_views.xml',
'wizard/property_meter_wizard_views.xml',
+ 'wizard/rental_scheme_wizard_views.xml',
'wizard/property_tenant_wizard_views.xml',
'wizard/property_water_wizard_views.xml',
'wizard/property_statements_wizard_views.xml',
diff --git a/yuthon_property/models/__init__.py b/yuthon_property/models/__init__.py
index c66541ca1..3b7184f4f 100644
--- a/yuthon_property/models/__init__.py
+++ b/yuthon_property/models/__init__.py
@@ -40,4 +40,5 @@ from . import property_deposit_list
from . import property_accounts_receivable
from . import property_construction_unit
from . import property_accounting_unit
-from . import property_subject_form
\ No newline at end of file
+from . import property_subject_form
+from . import property_evaluation_plan
\ No newline at end of file
diff --git a/yuthon_property/models/property_evaluation_plan.py b/yuthon_property/models/property_evaluation_plan.py
new file mode 100644
index 000000000..5cda15983
--- /dev/null
+++ b/yuthon_property/models/property_evaluation_plan.py
@@ -0,0 +1,52 @@
+from odoo import models, fields, api
+from odoo.exceptions import UserError, ValidationError
+
+
+class PropertyEvaluationPlan(models.Model):
+ _name = 'property.evaluation.plan'
+ _description = '物业评估方案'
+
+ name = fields.Char(string='物业名称')
+ evaluation_area = fields.Float(string='评估面积(m²)')
+ assessment_category = fields.Selection([('rent_money', '租金'), ('value', '价值')], string="评估类别")
+ owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
+ registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
+ registered_id2 = fields.Many2one('yuthon.purpose.evidence', string='设定用途')
+ rent_id = fields.Many2one('rent.free.setting', string="办法")
+ start_lease_period = fields.Selection(selection=[(str(i), str(i)) for i in range(1, 7)], string='租期开始',
+ default='1')
+ end_lease_period = fields.Selection(selection=[(str(i), str(i)) for i in range(1, 7)], string='租期结束',
+ default='6')
+ annual_increase_percentage = fields.Float(string='每年递增(%)', igits=(6, 2))
+ is_pust = fields.Boolean(string='是否已提交')
+ remake = fields.Text(string='备注')
+
+ def put_assessment_approval(self):
+ property_evaluation_ids = self.env["property.evaluation.plan"].browse(
+ self._context.get('active_ids', self._context.get('active_id')))
+ form_id = self.env.ref('yuthon_property_approval.property_evaluate_application_form').id
+ property_list = []
+ for i in property_evaluation_ids:
+ property_list.append([0, 0, {
+ 'property_evaluation_id': i.id,
+ }])
+ return {
+ 'name': '提交物业评估',
+ 'view_mode': 'form',
+ 'res_model': 'property.evaluate.application',
+ 'type': 'ir.actions.act_window',
+ 'views': [(form_id, 'form')],
+ "context": {
+ 'default_property_ids': property_list,
+ 'default_is_property': True,
+ }
+ }
+
+ def rental_scheme_wizard(self):
+ return {
+ 'name': '整租方案弹窗',
+ 'type': 'ir.actions.act_window',
+ 'view_mode': 'form',
+ 'res_model': 'rental.scheme.wizard',
+ 'target': 'new',
+ }
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 067f1e0d6..201efcd38 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -208,32 +208,8 @@ class YuthonProperty(models.Model):
}
def put_assessment_approval(self):
- property_ids = self.env["yuthon.property"].browse(
- self._context.get('active_ids', self._context.get('active_id')))
- if not property_ids:
- if self.state != 'to':
- raise UserError("当前状态不允许提交")
- else:
- for i in property_ids:
- if i.state != 'to':
- raise UserError("当前状态不允许提交")
- form_id = self.env.ref('yuthon_property_approval.property_evaluate_application_form').id
- property_list = []
- for i in property_ids:
- property_list.append([0, 0, {
- 'property_id': i.id,
- }])
- return {
- 'name': '提交物业评估',
- 'view_mode': 'form',
- 'res_model': 'property.evaluate.application',
- 'type': 'ir.actions.act_window',
- 'views': [(form_id, 'form')],
- "context": {
- 'default_property_ids': property_list,
- 'default_is_property' : True,
- }
- }
+ for record in self:
+ pass
# 拆分
def put_split_approval(self):
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index 933248b22..5f632bbb3 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -231,4 +231,11 @@ class PropertyFloorSetting(models.Model):
_description = '楼层配置'
name = fields.Char(string="名称")
- premises_ids = fields.Many2many('yuthon.premises.setting', string="所属楼盘")
\ No newline at end of file
+ premises_ids = fields.Many2many('yuthon.premises.setting', string="所属楼盘")
+
+
+class EvaluationCompany(models.Model):
+ _name = 'evaluation.company'
+ _description = '评估公司配置'
+
+ name = fields.Char(string="名称")
\ No newline at end of file
diff --git a/yuthon_property/security/ir.model.access.csv b/yuthon_property/security/ir.model.access.csv
index 7bef271b7..712a0393e 100644
--- a/yuthon_property/security/ir.model.access.csv
+++ b/yuthon_property/security/ir.model.access.csv
@@ -83,4 +83,7 @@ access_rent_free_line,rent_free_line,model_rent_free_line,base.group_user,1,1,1,
access_feature_setting,feature_setting,model_feature_setting,base.group_user,1,1,1,1
access_major_event_setting,major_event_setting,model_major_event_setting,base.group_user,1,1,1,1
access_yuthon_major_event_line,yuthon_major_event_line,model_yuthon_major_event_line,base.group_user,1,1,1,1
-access_property_floor_setting,property_floor_setting,model_property_floor_setting,base.group_user,1,1,1,1
\ No newline at end of file
+access_property_floor_setting,property_floor_setting,model_property_floor_setting,base.group_user,1,1,1,1
+access_property_evaluation_plan,property_evaluation_plan,model_property_evaluation_plan,base.group_user,1,1,1,1
+access_rental_scheme_wizard,rental_scheme_wizard,model_rental_scheme_wizard,base.group_user,1,1,1,1
+access_evaluation_company,evaluation_company,model_evaluation_company,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_property/views/menuitem.xml b/yuthon_property/views/menuitem.xml
index 29e39de85..5a6f12a59 100644
--- a/yuthon_property/views/menuitem.xml
+++ b/yuthon_property/views/menuitem.xml
@@ -263,13 +263,15 @@
parent="resource_management_menu"
name="配置"
action="yuthon_resource_mgmt_config_action"
- sequence="50"/>
+ sequence="99"/>
+
+