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/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index d478538cc..dde857a31 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -93,6 +93,7 @@ class PropertyLeaseContract(models.Model):
_rec_name = 'display_name'
property_name = fields.Char(string='物业信息')
+ confirm_id = fields.Many2one('property.confirm', string="关联成交确认审批")
version = fields.Char(string="合同版本", default="V1.0")
code = fields.Char(string="流水号", default=lambda self: self.env['ir.sequence'].next_by_code('property_lease_contract_code'))
admin_id = fields.Many2one('res.users', string="管理员", compute="_compute_admin_id", store=True)
@@ -2369,6 +2370,7 @@ class PropertyLeaseContractLine(models.Model):
_description = '物业列表明细行'
lease_id = fields.Many2one('property.lease.contract', string="关联凭租合同审批")
+ confirm_id = fields.Many2one('property.confirm', string="关联成交确认审批")
construction_id = fields.Many2one('property.construction.approval', string="关联建设工程造价咨询合同审批")
project_id = fields.Many2one('property.project.approval', string="关联工程立项")
design_id = fields.Many2one('property.design.approval', string="关联建设工程设计合同审批")
diff --git a/yuthon_property_approval/report/property_lease_contract_print_templates.xml b/yuthon_property_approval/report/property_lease_contract_print_templates.xml
index 650aac119..cbb56ed3e 100644
--- a/yuthon_property_approval/report/property_lease_contract_print_templates.xml
+++ b/yuthon_property_approval/report/property_lease_contract_print_templates.xml
@@ -103,17 +103,80 @@
+
+
+
+ 经办意见
+
+