diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py
index 0918dbb57..cd3e208c2 100644
--- a/yuthon_property_approval/__manifest__.py
+++ b/yuthon_property_approval/__manifest__.py
@@ -100,6 +100,7 @@
'wizard/penalty_line_wizard_viwes.xml',
'wizard/build_pop_wizard_viwes.xml',
'wizard/build_fee_wizard_views.xml',
+ 'wizard/choose_confirm_property_wizard_views.xml',
'wizard/action_refuse_wizard_views.xml',
'wizard/property_bills_wizard_views.xml',
'wizard/property_meeting_wizard_views.xml',
diff --git a/yuthon_property_approval/models/property_confirm.py b/yuthon_property_approval/models/property_confirm.py
index 6af60ad84..f45e9ba97 100644
--- a/yuthon_property_approval/models/property_confirm.py
+++ b/yuthon_property_approval/models/property_confirm.py
@@ -14,12 +14,33 @@ class PropertyConfirm(models.Model):
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_confirm_code'))
property_documents_ids = fields.Many2many('documents.document', string="物业成交确认文件")
lessee = fields.Char(string="承租方")
+ users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
active = fields.Boolean('Active', default=True, tracking=True)
work_end = fields.Boolean(string="结束")
is_chapter = fields.Selection([('yes', '是'), ('no', '否')], string='是否用章', default='no')
property_name = fields.Char(string='物业信息')
- approval_unit = fields.Char(string='发送单位')
+ handling_opinions = fields.Text(string="经办意见")
type_stamp_ids = fields.Many2many('seals.type.setting', string='用章类型')
+ documents_ids = fields.Many2many('ir.attachment', string="附件")
+ lease_ids = fields.One2many('property.lease.contract.line', 'confirm_id', string="物业列表")
+
+ def _get_default_name_title(self):
+ return '成交确认书'
+
+ name_title = fields.Char(default=_get_default_name_title)
+
+ def choose_property_button(self):
+ return {
+ "type": "ir.actions.act_window",
+ "name": "批量选择物业信息",
+ "res_model": "choose.confirm.property.wizard",
+ "view_mode": "form",
+ "target": "new",
+ "context": {
+ 'default_confirm_id': self.id,
+ }
+ }
class PropertyConfirm(models.Model):
diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv
index 5afac0137..b908a44dd 100644
--- a/yuthon_property_approval/security/ir.model.access.csv
+++ b/yuthon_property_approval/security/ir.model.access.csv
@@ -131,4 +131,5 @@ access_property_management_line2,property_management_line2,model_property_manage
access_yuthon_expenses_type,yuthon.expenses.type,model_yuthon_expenses_type,base.group_user,1,1,1,1
access_property_fee_spending,property_fee_spending,model_property_fee_spending,base.group_user,1,1,1,1
access_property_fee_spending_line,property_fee_spending_line,model_property_fee_spending_line,base.group_user,1,1,1,1
-access_build_fee_wizard,build_fee_wizard,model_build_fee_wizard,base.group_user,1,1,1,1
\ No newline at end of file
+access_build_fee_wizard,build_fee_wizard,model_build_fee_wizard,base.group_user,1,1,1,1
+access_choose_confirm_property_wizard,choose_confirm_property_wizard,model_choose_confirm_property_wizard,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_property_approval/views/property_confirm_views.xml b/yuthon_property_approval/views/property_confirm_views.xml
index c6ebf65c7..ce93f8c0c 100644
--- a/yuthon_property_approval/views/property_confirm_views.xml
+++ b/yuthon_property_approval/views/property_confirm_views.xml
@@ -28,6 +28,11 @@