diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index 5ea7d7fdd..b63709a54 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -198,7 +198,7 @@ - + diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py index 1abe3f16a..14ed35942 100644 --- a/yuthon_property_approval/__manifest__.py +++ b/yuthon_property_approval/__manifest__.py @@ -81,6 +81,7 @@ 'wizard/binding_information_wizard_views.xml', 'wizard/property_rental_wizard_views.xml', 'wizard/contract_signature_wizard_viwes.xml', + 'wizard/build_pop_wizard_viwes.xml', 'wizard/property_meeting_wizard_views.xml', 'views/property_menu_all.xml', ], diff --git a/yuthon_property_approval/models/property_accounting_approval.py b/yuthon_property_approval/models/property_accounting_approval.py index 541f884c4..12315e2fa 100644 --- a/yuthon_property_approval/models/property_accounting_approval.py +++ b/yuthon_property_approval/models/property_accounting_approval.py @@ -16,6 +16,7 @@ class PropertyAccountingApproval(models.Model): department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") company_a_id = fields.Many2one('yuthon.property.company', string="甲方") + reason = fields.Text(string="正文") budget_list_id = fields.Many2one('ir.attachment', string="预算清单") project_content = fields.Char(string="工程内容") image = fields.Binary(string="维修前图片") @@ -24,6 +25,8 @@ class PropertyAccountingApproval(models.Model): contract_amount = fields.Float(string="合同金额") start_date = fields.Date(string="开始日期") end_date = fields.Date(string="结束日期") + business_type = fields.Char(string="业务类型") + payment_methods = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式") contract_id = fields.Many2one('ir.attachment', string="合同") accounting_way_ids = fields.One2many('accounting.way.line', 'accounting_id', string="关联支付方式明细行") lease_ids = fields.One2many('property.lease.contract.line', 'accounting_id', string="物业信息明细") @@ -38,6 +41,18 @@ class PropertyAccountingApproval(models.Model): name_title = fields.Char(default=_get_default_name_title) self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) + def build_pop(self): + return { + 'name': '添加物业', + 'type': 'ir.actions.act_window', + 'res_model': 'build.pop.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_accounting_id': self.id, + } + } + class AccountingWayLine(models.Model): _name = 'accounting.way.line' diff --git a/yuthon_property_approval/models/property_construction_approval.py b/yuthon_property_approval/models/property_construction_approval.py index 534a8ebec..1b4a867d7 100644 --- a/yuthon_property_approval/models/property_construction_approval.py +++ b/yuthon_property_approval/models/property_construction_approval.py @@ -13,9 +13,9 @@ class PropertyConstructionApproval(models.Model): name = fields.Char(string='标题') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_construction_approval_code')) - 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="部门") - company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") + user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) + department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门") + company_id = fields.Many2one(related='user_id.employee_id.company_id', string="公司") company_a_id = fields.Many2one('yuthon.property.company', string="甲方") project_content = fields.Char(string="工程内容") company_b_id = fields.Many2one('property.construction.unit', string="乙方") @@ -42,6 +42,17 @@ class PropertyConstructionApproval(models.Model): name_title = fields.Char(default=_get_default_name_title) self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) + def build_pop(self): + return { + 'name': '添加物业', + 'type': 'ir.actions.act_window', + 'res_model': 'build.pop.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_construction_id': self.id, + } + } class ConstructionWayLine(models.Model): _name = 'construction.way.line' diff --git a/yuthon_property_approval/models/property_delegated_agent.py b/yuthon_property_approval/models/property_delegated_agent.py index 60664a7ff..72c33742b 100644 --- a/yuthon_property_approval/models/property_delegated_agent.py +++ b/yuthon_property_approval/models/property_delegated_agent.py @@ -10,10 +10,10 @@ class PropertyDelegatedAgent(models.Model): _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string="合同编号") - department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") + department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_delegated_agent_code')) - users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) - company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") + user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) + company_id = fields.Many2one(related='user_id.employee_id.company_id', string="公司") company_a_id = fields.Many2one('yuthon.property.company', string="甲方") company_b_id = fields.Many2one('property.construction.unit', string="乙方") matters = fields.Text(string="事项") diff --git a/yuthon_property_approval/models/property_design_approval.py b/yuthon_property_approval/models/property_design_approval.py index 9383567c6..fabe0aed7 100644 --- a/yuthon_property_approval/models/property_design_approval.py +++ b/yuthon_property_approval/models/property_design_approval.py @@ -39,6 +39,18 @@ class PropertyDesignApproval(models.Model): name_title = fields.Char(default=_get_default_name_title) self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) + def build_pop(self): + return { + 'name': '添加物业', + 'type': 'ir.actions.act_window', + 'res_model': 'build.pop.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_design_id': self.id, + } + } + class DesignWayLine(models.Model): _name = 'design.way.line' diff --git a/yuthon_property_approval/models/property_project_approval.py b/yuthon_property_approval/models/property_project_approval.py index 75fa15cfe..155857cac 100644 --- a/yuthon_property_approval/models/property_project_approval.py +++ b/yuthon_property_approval/models/property_project_approval.py @@ -28,4 +28,16 @@ class PropertyProjectApproval(models.Model): return self._description if self._description else self._name name_title = fields.Char(default=_get_default_name_title) - self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) \ No newline at end of file + self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) + + def build_pop(self): + return { + 'name': '添加物业', + 'type': 'ir.actions.act_window', + 'res_model': 'build.pop.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_project_id': self.id, + } + } diff --git a/yuthon_property_approval/models/property_supervising_approval.py b/yuthon_property_approval/models/property_supervising_approval.py index 4befcb07a..474e4888a 100644 --- a/yuthon_property_approval/models/property_supervising_approval.py +++ b/yuthon_property_approval/models/property_supervising_approval.py @@ -42,6 +42,18 @@ class PropertySupervisingApproval(models.Model): name_title = fields.Char(default=_get_default_name_title) self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) + def build_pop(self): + return { + 'name': '添加物业', + 'type': 'ir.actions.act_window', + 'res_model': 'build.pop.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_supervising_id': self.id, + } + } + class SupervisingWayLine(models.Model): _name = 'supervising.way.line' _description = '施工支付方式' diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv index 0c8f650b7..938386606 100644 --- a/yuthon_property_approval/security/ir.model.access.csv +++ b/yuthon_property_approval/security/ir.model.access.csv @@ -103,5 +103,5 @@ access_yuthon_property_ledger, yuthon_property_ledger,model_yuthon_property_ledg access_property_lessee_analysis,property_lessee_analysis,model_property_lessee_analysis,base.group_user,1,1,1,1 access_contract_signature_wizard,contract_signature_wizard,model_contract_signature_wizard,base.group_user,1,1,1,1 access_payment_process,payment_process,model_payment_process,base.group_user,1,1,1,1 - +access_build_pop_wizard, build_pop_wizard,model_build_pop_wizard,base.group_user,1,1,1,1 diff --git a/yuthon_property_approval/views/payment_process_viwes.xml b/yuthon_property_approval/views/payment_process_viwes.xml index 611f14a9d..71c76bf96 100644 --- a/yuthon_property_approval/views/payment_process_viwes.xml +++ b/yuthon_property_approval/views/payment_process_viwes.xml @@ -37,9 +37,6 @@ - - - diff --git a/yuthon_property_approval/views/property_accounting_approval_views.xml b/yuthon_property_approval/views/property_accounting_approval_views.xml index 9f4cd026c..f62105b84 100644 --- a/yuthon_property_approval/views/property_accounting_approval_views.xml +++ b/yuthon_property_approval/views/property_accounting_approval_views.xml @@ -52,6 +52,7 @@ + @@ -74,6 +75,8 @@ +