diff --git a/yuthon_hr_employee/security/hr_company_security_group.xml b/yuthon_hr_employee/security/hr_company_security_group.xml
index ef9eeabf4..d47341b45 100644
--- a/yuthon_hr_employee/security/hr_company_security_group.xml
+++ b/yuthon_hr_employee/security/hr_company_security_group.xml
@@ -1,39 +1,45 @@
-
- 岗位编制公司过滤
+
+ 人力资源群组
+
+
+ 用户
+
+
+
+
+ yuthon_employee_job_rule_admin
[('yuthon_company', '=', user.employee_id.yuthon_company)]
-
-
-
-
-
-
- 花名册公司过滤
-
- [('yuthon_company', '=', user.employee_id.yuthon_company)]
-
-
-
-
-
-
- 角色公司过滤
-
- [('yuthon_company', '=', user.employee_id.yuthon_company)]
-
-
-
-
+
+
- 部门公司过滤
+ inherit_hr_department_views_rule
[('yuthon_company', '=', user.employee_id.yuthon_company)]
-
-
-
-
+
-
+
+
+ inherit_hr_employee_views_rule
+
+ [('yuthon_company', '=', user.employee_id.yuthon_company)]
+
+
+
+
+ inherit_soong_user_role_views_rule
+
+ [('yuthon_company', '=', user.employee_id.yuthon_company)]
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_property/models/yuthon_resource_mgmt_config.py b/yuthon_property/models/yuthon_resource_mgmt_config.py
index 4691e7421..fc254ca4a 100644
--- a/yuthon_property/models/yuthon_resource_mgmt_config.py
+++ b/yuthon_property/models/yuthon_resource_mgmt_config.py
@@ -158,9 +158,15 @@ class YuthonPropertyProduce(models.Model):
class YuthonPremisesSetting(models.Model):
_name = 'yuthon.premises.setting'
_description = '楼盘配置'
+ _order = 'first_letter, name'
- sequence = fields.Char(string='序号', store=True)
name = fields.Char(string="名称")
+ first_letter = fields.Char(string='首字母', compute='_compute_first_letter', store=True)
+
+ @api.depends('name')
+ def _compute_first_letter(self):
+ for record in self:
+ record.first_letter = record.name[0].upper() if record.name else ''
class RentFreeSetting(models.Model):
@@ -217,4 +223,4 @@ class PropertyFloorSetting(models.Model):
_description = '楼层配置'
name = fields.Char(string="名称")
- premises_id = fields.Many2one('yuthon.premises.setting', string="所属楼盘")
\ No newline at end of file
+ premises_ids = fields.Many2many('yuthon.premises.setting', string="所属楼盘")
\ No newline at end of file
diff --git a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
index 14ac94540..22215e025 100644
--- a/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
+++ b/yuthon_property/views/yuthon_resource_mgmt_config_views.xml
@@ -277,8 +277,8 @@
yuthon.premises.setting
-
+
@@ -309,7 +309,6 @@
-
@@ -374,7 +373,7 @@
-
+
diff --git a/yuthon_property/wizard/yuthon_property_wizard.py b/yuthon_property/wizard/yuthon_property_wizard.py
index cdb75ba8e..a16c3936f 100644
--- a/yuthon_property/wizard/yuthon_property_wizard.py
+++ b/yuthon_property/wizard/yuthon_property_wizard.py
@@ -24,7 +24,7 @@ class YuthonPropertyWizard(models.Model):
sh = book.sheet_by_index(0)
for rx in range(1, sh.nrows):
row = sh.row(rx)
- self.yuthon_premises_id(row)
+ self.update_property(row)
def yuthon_property_data(self,row):
property_name = row[2].value
@@ -200,5 +200,13 @@ class YuthonPropertyWizard(models.Model):
'property_floor_id': property_floor_id.id,
})
+ def update_property(self,row):
+ premises_id = self.env['yuthon.premises.setting'].search([('name', '=', row[1].value)])
+ property_floor_id = self.env['property.floor.setting'].search([('name', '=', row[4].value)])
+ if property_floor_id:
+ if premises_id:
+ property_floor_id.write({
+ 'premises_ids': [(4, premises_id.id, 0)]
+ })
diff --git a/yuthon_property_approval/views/property_evaluate_application_views.xml b/yuthon_property_approval/views/property_evaluate_application_views.xml
index 2a06d75a1..3af57ac15 100644
--- a/yuthon_property_approval/views/property_evaluate_application_views.xml
+++ b/yuthon_property_approval/views/property_evaluate_application_views.xml
@@ -66,7 +66,7 @@
-
+