diff --git a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py index 5a689cf6c..71f3e048e 100644 --- a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py +++ b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py @@ -28,19 +28,20 @@ class SoongWorkflowRecordDeleteWizard(models.TransientModel): }) target_model = self.env[record.res_model] target_record = target_model.sudo().browse(record.res_id) - if target_model._name in ["hr.leave.batch"]: - if target_record.leave_ids: - for leave in target_record.leave_ids: - leave.sudo().with_context(from_cancel_wizard=True).write({ - "state": "confirm", - "active": False - }) - if target_record.hour_leave_ids: - for hour_leave in target_record.hour_leave_ids: - hour_leave.sudo().with_context(from_cancel_wizard=True).write({ - "state": "confirm", - "active": False - }) + if target_record: + if target_model._name in ["hr.leave.batch"]: + if target_record.leave_ids: + for leave in target_record.leave_ids: + leave.sudo().with_context(from_cancel_wizard=True).write({ + "state": "confirm", + "active": False + }) + if target_record.hour_leave_ids: + for hour_leave in target_record.hour_leave_ids: + hour_leave.sudo().with_context(from_cancel_wizard=True).write({ + "state": "confirm", + "active": False + }) target_record.write({'active': False}) else: self.env["soong.workflow.record"].sudo().search( diff --git a/yuthon_holiday/wizard/leave_allocation_wizard.py b/yuthon_holiday/wizard/leave_allocation_wizard.py index 6a832e77c..6246597ea 100644 --- a/yuthon_holiday/wizard/leave_allocation_wizard.py +++ b/yuthon_holiday/wizard/leave_allocation_wizard.py @@ -24,7 +24,7 @@ class LeaveAllocationWizard(models.Model): raise ValidationError('请上传文件。') book = xlrd.open_workbook(file_contents=base64.decodebytes(self.excel_file)) sh = book.sheet_by_index(0) - for rx in range(1, sh.nrows): + for rx in range(1, 2): row = sh.row(rx) self.salary_import(row) @@ -35,29 +35,28 @@ class LeaveAllocationWizard(models.Model): holiday_status_id = self.env['hr.leave.type'].search([('name', '=', '年假'), ('company_id', '=', '天河物管')], limit=1) holiday_status_id1 = self.env['hr.leave.type'].search([('name', '=', '补休')], limit=1) accrual_plan_id = self.env['hr.leave.accrual.plan'].search([('name', '=', '年假(天河物管)')], limit=1) - if row[1].value: - number_of_days_display = int(row[1].value)/8 - else: - number_of_days_display = 0 - self.env['hr.leave.allocation'].create({ - 'employee_id': employee_id.id, - 'name': '年假公司分配', - 'number_of_days': number_of_days_display, - 'employee_ids': [(6, 0, [employee_id.id])], - 'holiday_status_id': holiday_status_id.id, - 'accrual_plan_id': accrual_plan_id.id, - 'allocation_type': 'accrual', - "number_of_days_display":number_of_days_display, - 'notes':'年假公司分配' - }) - self.env['hr.leave.allocation'].create({ - 'employee_id': employee_id.id, - 'name': '补休', - 'employee_ids': [(6, 0, [employee_id.id])], - 'holiday_status_id' : holiday_status_id1.id, - 'number_of_hours_display':row[2].value, - }) - + if row[1].value and int(row[1].value) != 0: + number_of_days_display = int(row[1].value) / 8 + self.env['hr.leave.allocation'].create({ + 'employee_id': employee_id.id, + 'name': '年假公司分配', + 'number_of_days': number_of_days_display, + 'employee_ids': [(6, 0, [employee_id.id])], + 'holiday_status_id': holiday_status_id.id, + 'accrual_plan_id': accrual_plan_id.id, + 'allocation_type': 'accrual', + "number_of_days_display": number_of_days_display, + 'notes': '年假公司分配' + }) + + if row[2].value and int(row[2].value) != 0: + self.env['hr.leave.allocation'].create({ + 'holiday_status_id': holiday_status_id1.id, + 'employee_id': employee_id.id, + 'name': '补休', + 'employee_ids': [(6, 0, [employee_id.id])], + 'number_of_hours_display': int(row[2].value) + }) diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py index 9bb0cd5f2..a10af2ea1 100644 --- a/yuthon_hr_attendance/models/overtime_approval.py +++ b/yuthon_hr_attendance/models/overtime_approval.py @@ -180,6 +180,7 @@ class OvertimeApprovals(models.Model): if self.meal == 'yes': meal_number += 1 employee_id.write({'meal_number': meal_number}) + holiday_status_id = self.env['hr.leave.type'].search([('name', '=', '补休')]) allocation = self.env['hr.leave.allocation'].create({ 'employee_id': employee_id.id, @@ -224,6 +225,17 @@ class OvertimeApprovals(models.Model): 'update_date': fields.Datetime.now(), 'text': '审批' } + if self.meal == 'yes': + meal_fee_value = (0, 0, { + 'vacation_id': reports_id.id, + 'update_type': 'add', + 'workflow_record_id': workflow_record_id.id, + 'update_date': fields.Datetime.now(), + 'update_lines': 1, + 'text': '审批' + }) + reports_id.write({'meal_fee_ids': [meal_fee_value]}) + reports_id.write({'overtime_ids': [(0, 0, overtime_data)]}) @api.depends('users_id', 'duration') diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py index 8b06ccd78..1abe3f16a 100644 --- a/yuthon_property_approval/__manifest__.py +++ b/yuthon_property_approval/__manifest__.py @@ -55,6 +55,7 @@ 'views/property_accounting_approval_views.xml', 'views/property_record_views.xml', 'views/property_equity_views.xml', + 'views/payment_process_viwes.xml', 'views/property_handover_views.xml', 'views/property_merge_approval_views.xml', 'views/property_current_approval_views.xml', diff --git a/yuthon_property_approval/data/sale_renting_code_data.xml b/yuthon_property_approval/data/sale_renting_code_data.xml index 8f9f9986f..045a97ee1 100644 --- a/yuthon_property_approval/data/sale_renting_code_data.xml +++ b/yuthon_property_approval/data/sale_renting_code_data.xml @@ -7,7 +7,13 @@ 3 - + + 支付流程编号 + payment_process_code + ZF%(y)s%(month)s%(day)s + 3 + + 经营报表确认单编号 property_business_confirm_code diff --git a/yuthon_property_approval/models/__init__.py b/yuthon_property_approval/models/__init__.py index 023fc7602..ddcd195fb 100644 --- a/yuthon_property_approval/models/__init__.py +++ b/yuthon_property_approval/models/__init__.py @@ -55,4 +55,5 @@ from . import property_accounts_approval from . import inherit_property_tenant_information from . import property_meeting_approval from . import property_lessee_analysis -from . import yuthon_property_ledger \ No newline at end of file +from . import yuthon_property_ledger +from . import payment_process \ No newline at end of file diff --git a/yuthon_property_approval/models/payment_process.py b/yuthon_property_approval/models/payment_process.py new file mode 100644 index 000000000..bd51a0144 --- /dev/null +++ b/yuthon_property_approval/models/payment_process.py @@ -0,0 +1,32 @@ +from odoo import models, fields, api + + +class PaymentProcess(models.Model): + _name = 'payment.process' + _description = '支付流程' + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] + + + code = fields.Char(string="编号", readonly=True,default=lambda self: self.env['ir.sequence'].next_by_code('payment_process_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="公司") + supervising_id = fields.Many2one('property.supervising.approval', string='合同编号') + reason = fields.Text(related='supervising_id.reason', string='事项') + payment_instructions = fields.Text(string='支付说明') + payment_nodes = fields.Selection([('first', '一期'), ('second', '二期'), ('third', '三期'), ('fourth', '四期')], + string="支付节点") + amount = fields.Float(string="金额") + documents_id = fields.Many2one('ir.attachment', string="附件") + + urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', + default='normal') + active = fields.Boolean('Active', default=True, tracking=True) + work_end = fields.Boolean(string="结束") + + def _get_default_name_title(self): + 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 diff --git a/yuthon_property_approval/models/property_accounting_approval.py b/yuthon_property_approval/models/property_accounting_approval.py index c2d11a94d..541f884c4 100644 --- a/yuthon_property_approval/models/property_accounting_approval.py +++ b/yuthon_property_approval/models/property_accounting_approval.py @@ -7,28 +7,26 @@ from odoo.exceptions import UserError, ValidationError class PropertyAccountingApproval(models.Model): _name = 'property.accounting.approval' - _description = '建设工程委托核算合同审批' + _description = '建设工程委托监理合同审批 ' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] - name = fields.Char(string='标题') + name = fields.Char(string='合同编号') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_accounting_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('yuthon.property.company', string="甲方") + company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") + company_a_id = fields.Many2one('yuthon.property.company', string="甲方") + budget_list_id = fields.Many2one('ir.attachment', string="预算清单") project_content = fields.Char(string="工程内容") + image = fields.Binary(string="维修前图片") company_b_id = fields.Many2one('property.construction.unit', string="乙方") - property_id = fields.Many2one('yuthon.property', string='物业') - reason = fields.Text(string="正文") - three_point_offer = fields.Text(string="三方报价") - documents_ids = fields.Many2many('ir.attachment', string="附件") - contract_id = fields.Many2one('ir.attachment', string="合同") + property_address = fields.Char(string='物业地址') + contract_amount = fields.Float(string="合同金额") start_date = fields.Date(string="开始日期") end_date = fields.Date(string="结束日期") - amount = fields.Float(string="总金额") - is_tex = fields.Boolean(string="是否含税") - lack = fields.Float(string="差额") - percentage = fields.Float(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="物业信息明细") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') active = fields.Boolean('Active', default=True, tracking=True) @@ -44,8 +42,10 @@ class PropertyAccountingApproval(models.Model): class AccountingWayLine(models.Model): _name = 'accounting.way.line' - pay_way = fields.Selection([('cumulative', '累计项'), ('stage', '单项'), ('other', '其他')], string="付款方式",) - interval = fields.Char(string="区间") - service_charge = fields.Float(string="服务费") + payment_nodes = fields.Selection([('first', '一期'), ('second', '二期'), ('third', '三期'), ('fourth', '四期')], + string="支付节点") + payout_ratio = fields.Float(string="支付比例") + amount = fields.Float(string="金额") remake = fields.Char(string="备注") + payment_instructions = fields.Text(string="支付说明") accounting_id = fields.Many2one('property.accounting.approval', string="关联核算方式") diff --git a/yuthon_property_approval/models/property_construction_approval.py b/yuthon_property_approval/models/property_construction_approval.py index 23b9cd224..534a8ebec 100644 --- a/yuthon_property_approval/models/property_construction_approval.py +++ b/yuthon_property_approval/models/property_construction_approval.py @@ -7,7 +7,7 @@ from odoo.exceptions import UserError, ValidationError class PropertyConstructionApproval(models.Model): _name = 'property.construction.approval' - _description = '建设工程施工合同审批' + _description = '建设工程造价咨询合同审批' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string='标题') @@ -15,19 +15,21 @@ class PropertyConstructionApproval(models.Model): 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('yuthon.property.company', string="甲方") + company_id = fields.Many2one(related='users_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="乙方") - property_id = fields.Many2one('yuthon.property', string='物业') + property_address = fields.Char(string='物业地址') reason = fields.Text(string="正文") image = fields.Binary(string="开工前图片") - contract_id = fields.Many2one('ir.attachment', string="合同") - start_date = fields.Date(string="开始日期") - end_date = fields.Date(string="结束日期") - review_price = fields.Float(string="审核价") + budget_list_id = fields.Many2one('ir.attachment', string="预算清单") + start_date = fields.Date(string="代理开始日期") + end_date = fields.Date(string="代理结束日期") business_type = fields.Char(string="业务类型") contract_amount = fields.Float(string="合同金额") - payment_methods = fields.Char(string="付款方式") + contract_id = fields.Many2one('ir.attachment', string="合同") + payment_methods = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式") + lease_ids = fields.One2many('property.lease.contract.line', 'construction_id', string="物业信息明细") construction_way_ids = fields.One2many('construction.way.line', 'construction_id', string="关联支付方式") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') @@ -43,12 +45,14 @@ class PropertyConstructionApproval(models.Model): class ConstructionWayLine(models.Model): _name = 'construction.way.line' - _description = '施工支付方式' + _description = '价咨询合同审批支付方式' - name = fields.Char(string="支付节点") - pay_ratio = fields.Float(string="支付比例%") + payment_nodes = fields.Selection([('first', '一期'), ('second', '二期'), ('third', '三期'), ('fourth', '四期')], + string="支付节点") + payout_ratio = fields.Float(string="支付比例") + coping_date = fields.Date(string="应付日期") amount = fields.Float(string="金额") - paid_time = fields.Text(string="付费时间") remake = fields.Char(string="备注") - construction_id = fields.Many2one('property.construction.approval', string="关联施工合同") + payment_instructions = fields.Text(string="支付说明") + construction_id = fields.Many2one('property.construction.approval', string="关联价咨询合同审批") diff --git a/yuthon_property_approval/models/property_delegated_agent.py b/yuthon_property_approval/models/property_delegated_agent.py index acfef131c..60664a7ff 100644 --- a/yuthon_property_approval/models/property_delegated_agent.py +++ b/yuthon_property_approval/models/property_delegated_agent.py @@ -6,19 +6,27 @@ from odoo import models, fields, api, exceptions, _ class PropertyDelegatedAgent(models.Model): _name = 'property.delegated.agent' - _description = '零星工程' + _description = '零星工程年度委托合同审批' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] - name = fields.Char(string="名称") - users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) + name = fields.Char(string="合同编号") department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_delegated_agent_code')) - annual = fields.Char(string="年度") - contract_date = fields.Date(string="合同有效期") - signing_date = fields.Date(string="签订日期") - payment_date = fields.Date(string="付款日期") - consult_fee = fields.Float(string="咨询费") - quotations_list_id = fields.Many2one('ir.attachment', string="报价清单") + 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="公司") + company_a_id = fields.Many2one('yuthon.property.company', string="甲方") + company_b_id = fields.Many2one('property.construction.unit', string="乙方") + matters = fields.Text(string="事项") + text = fields.Text(string="正文") + license_id = fields.Many2one('ir.attachment', string='营业执照') + aptitude_id = fields.Many2one('ir.attachment', string='资质') + contract_id = fields.Many2one('ir.attachment', string='合同') + legal_person_id_card = fields.Many2one('ir.attachment', string='法人身份证') + bid_winning = fields.Many2one('ir.attachment', string='中标确认书') + service_start_date = fields.Date(string="服务开始时间") + service_end_date = fields.Date(string="服务结束时间") + settlement_method = fields.Selection([('cash', '预算审核'), ('bank', '结算审核')], string='结算方式', default='cash') + floating = fields.Float(string="下浮%") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') active = fields.Boolean('Active', default=True, tracking=True) diff --git a/yuthon_property_approval/models/property_design_approval.py b/yuthon_property_approval/models/property_design_approval.py index 9a91c43a2..b5564463b 100644 --- a/yuthon_property_approval/models/property_design_approval.py +++ b/yuthon_property_approval/models/property_design_approval.py @@ -4,27 +4,28 @@ from odoo.exceptions import UserError, ValidationError class PropertyDesignApproval(models.Model): _name = 'property.design.approval' - _description = '工程设计合同审批' + _description = '建设工程设计合同审批' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] - name = fields.Char(string='标题') + name = fields.Char(string='合同编号') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_design_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('yuthon.property.company', string="甲方") - project_content = fields.Char(string="工程内容") + company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") + company_a_id = fields.Many2one('yuthon.property.company', string="甲方") company_b_id = fields.Many2one('property.construction.unit', string="乙方") - property_id = fields.Many2one('yuthon.property', string='物业') + budget_list_id = fields.Many2one('ir.attachment', string="预算清单") + property_address = fields.Char(string='物业地址') reason = fields.Text(string="正文") - three_point_offer = fields.Text(string="三方报价") + image = fields.Binary(string="开工前图片") contract_id = fields.Many2one('ir.attachment', string="合同") start_date = fields.Date(string="开始日期") end_date = fields.Date(string="结束日期") - review_price = fields.Float(string="审核价") - business_type = fields.Char(string="业务类型") contract_amount = fields.Float(string="合同金额") - payment_methods = fields.Char(string="付款方式") + payment_methods = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式") + lease_ids = fields.One2many('property.lease.contract.line', 'design_id', string="关联租赁信息") + business_type = fields.Char(string="业务类型") design_way_ids = fields.One2many('design.way.line', 'design_id', string="关联支付方式") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') @@ -42,9 +43,10 @@ class DesignWayLine(models.Model): _name = 'design.way.line' _description = '施工支付方式' - name = fields.Char(string="支付节点") - pay_ratio = fields.Float(string="支付比例%") + payment_nodes = fields.Selection([('first', '一期'), ('second', '二期'), ('third', '三期'), ('fourth', '四期')], + string="支付节点") + payout_ratio = fields.Float(string="支付比例") amount = fields.Float(string="金额") - paid_time = fields.Text(string="付费时间") remake = fields.Char(string="备注") + payment_instructions = fields.Text(string="支付说明") design_id = fields.Many2one('property.design.approval', string="关联施工合同") \ No newline at end of file diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 332c8c956..232e66a61 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -1658,6 +1658,11 @@ class PropertyLeaseContractLine(models.Model): _description = '物业列表明细行' lease_id = fields.Many2one('property.lease.contract', 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="关联建设工程设计合同审批") + accounting_id = fields.Many2one('property.accounting.approval', string="关联建设工程委托监理合同审批") + supervising_id = fields.Many2one('property.supervising.approval', string="关联建设工程施工合同审批") address_id = fields.Many2one('yuthon.property', string="物业地址") admin_line_id = fields.Many2one(related='address_id.admin_id', string="管理员") property_area = fields.Float(related='address_id.management_area', string="面积") diff --git a/yuthon_property_approval/models/property_project_approval.py b/yuthon_property_approval/models/property_project_approval.py index aad47ad65..75fa15cfe 100644 --- a/yuthon_property_approval/models/property_project_approval.py +++ b/yuthon_property_approval/models/property_project_approval.py @@ -12,12 +12,13 @@ class PropertyProjectApproval(models.Model): default=lambda self: self.env['ir.sequence'].next_by_code('property_project_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="部门") - property_id = fields.Many2one('yuthon.property', string='物业') + property_address = fields.Char(string='物业地址') background_note = fields.Html(string="背景说明") documents_id = fields.Many2one('ir.attachment', string="建议书/可研报告") amount = fields.Float(string="预算金额") start_date = fields.Date(string="开始日期") end_date = fields.Date(string="结束日期") + lease_ids = fields.One2many('property.lease.contract.line', 'project_id', string="物业信息") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') active = fields.Boolean('Active', default=True, tracking=True) diff --git a/yuthon_property_approval/models/property_sporadic_works.py b/yuthon_property_approval/models/property_sporadic_works.py index 2db33be94..387d9c05d 100644 --- a/yuthon_property_approval/models/property_sporadic_works.py +++ b/yuthon_property_approval/models/property_sporadic_works.py @@ -4,19 +4,25 @@ from odoo.exceptions import UserError class PropertySporadicWorks(models.Model): _name = 'property.sporadic.works' - _description = '委托招标代理' + _description = '项目委托招标代理合同' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] - name = fields.Char(string="工程名称", required=True) - code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_sporadic_works_code')) + name = fields.Char(string="合同编号", required=True) + code = fields.Char(string="流水号", default=lambda self: self.env['ir.sequence'].next_by_code('property_sporadic_works_code')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) + company_a_id = fields.Many2one('yuthon.property.company', string="甲方") + company_b_id = fields.Many2one('property.construction.unit', string="乙方") department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") - signing_date = fields.Date(string="签订日期") - acceptance_date = fields.Date(string="验收日期") - total = fields.Float(string="总金额") - coping = fields.Float(string="应付") - paid = fields.Float(string="已付") - not_paid = fields.Float(string="未付") + company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司") + text = fields.Text(string="正文") + three_quotation_id = fields.Many2one('ir.attachment', string="三方报价") + service_contract = fields.Many2one('ir.attachment', string="服务合同") + service_start_date = fields.Date(string="服务开始时间") + service_end_date = fields.Date(string="服务结束时间") + standard_amount = fields.Float(string="标准金额") + service_fee = fields.Float(string="服务费") + settlement_party = fields.Selection([('self' , '我方'), ('other', '中标方')], string="结算方") + payment_methods = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式") payment_methods_line_ids = fields.One2many('payment.methods.line', 'payment_methods_id', string="付款方式明细行") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') @@ -34,10 +40,10 @@ class PaymentMethodsLine(models.Model): _name = 'payment.methods.line' _description = '付款方式明细行' - name = fields.Char(string="合同阶段") + payment_nodes = fields.Selection([('first', '一期' ), ('second', '二期'), ('third', '三期'), ('fourth', '四期')], string="支付节点") + payout_ratio = fields.Float(string="支付比例") coping_date = fields.Date(string="应付日期") amount = fields.Float(string="金额") remake = fields.Char(string="备注") - quotations_list_id = fields.Many2one('ir.attachment', string="报价清单") - accounting_list_id = fields.Many2one('ir.attachment', string="核算清单") + payment_instructions = fields.Text(string="支付说明") payment_methods_id = fields.Many2one('property.sporadic.works', string="关联付款方式") \ No newline at end of file diff --git a/yuthon_property_approval/models/property_supervising_approval.py b/yuthon_property_approval/models/property_supervising_approval.py index aa98a467b..4befcb07a 100644 --- a/yuthon_property_approval/models/property_supervising_approval.py +++ b/yuthon_property_approval/models/property_supervising_approval.py @@ -4,30 +4,35 @@ from odoo.exceptions import UserError, ValidationError class PropertySupervisingApproval(models.Model): _name = 'property.supervising.approval' - _description = '工程设计合同审批' + _description = '建设工程施工合同审批 ' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string='标题') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_supervising_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('yuthon.property.company', string="甲方") - project_content = fields.Char(string="工程内容") - company_b_id = fields.Many2one('property.construction.unit', string="乙方") - property_id = fields.Many2one('yuthon.property', string='物业') - reason = fields.Text(string="正文") - documents_ids = fields.Many2many('ir.attachment', string="附件") - contract_id = fields.Many2one('ir.attachment', string="合同") - start_date = fields.Date(string="开始日期") - end_date = fields.Date(string="结束日期") - review_price = fields.Float(string="审核价") - business_type = fields.Char(string="业务类型") - contract_amount = fields.Float(string="合同金额") - payment_methods = fields.Char(string="付款方式") + supervising_way_ids = fields.One2many('supervising.way.line', 'supervising_id', string="关联支付方式") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') + 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="公司") + company_a_id = fields.Many2one('yuthon.property.company', string="甲方") + company_b_id = fields.Many2one('property.construction.unit', string="乙方") + budget_list_id = fields.Many2one('ir.attachment', string="预算清单") + property_address = fields.Char(string='物业地址') + reason = fields.Text(string="正文") + image = fields.Binary(string="开工前图片") + contract_id = fields.Many2one('ir.attachment', string="合同") + start_date = fields.Date(string="开始日期") + project_content = fields.Char(string="工程内容") + end_date = fields.Date(string="结束日期") + review_price = fields.Float(string="审核价") + floating = fields.Float(string="浮动") + contract_amount = fields.Float(string="合同金额") + payment_methods = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式") + lease_ids = fields.One2many('property.lease.contract.line', 'supervising_id', string="物业信息明细") + business_type = fields.Char(string="业务类型") active = fields.Boolean('Active', default=True, tracking=True) work_end = fields.Boolean(string="结束") @@ -41,7 +46,8 @@ class SupervisingWayLine(models.Model): _name = 'supervising.way.line' _description = '施工支付方式' - name = fields.Char(string="支付节点") + payment_nodes = fields.Selection([('first', '一期'), ('second', '二期'), ('third', '三期'), ('fourth', '四期')], + string="支付节点") pay_ratio = fields.Float(string="支付比例%") amount = fields.Float(string="金额") remake = fields.Char(string="备注") diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv index b4841954d..0c8f650b7 100644 --- a/yuthon_property_approval/security/ir.model.access.csv +++ b/yuthon_property_approval/security/ir.model.access.csv @@ -102,5 +102,6 @@ access_binding_information_wizard,binding_information_wizard,model_binding_infor access_yuthon_property_ledger, yuthon_property_ledger,model_yuthon_property_ledger,base.group_user,1,1,1,1 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 diff --git a/yuthon_property_approval/views/payment_process_viwes.xml b/yuthon_property_approval/views/payment_process_viwes.xml new file mode 100644 index 000000000..611f14a9d --- /dev/null +++ b/yuthon_property_approval/views/payment_process_viwes.xml @@ -0,0 +1,58 @@ + + + + payment.process.tree + payment.process + + + + + + + + + + payment.process.form + payment.process + +
+ + + + + + + + + + + + + +
+

+ +

+
+ + + + + + + + + + + + + + +
+
+
+
+
\ No newline at end of file diff --git a/yuthon_property_approval/views/property_accounting_approval_views.xml b/yuthon_property_approval/views/property_accounting_approval_views.xml index 0b5306c11..9f4cd026c 100644 --- a/yuthon_property_approval/views/property_accounting_approval_views.xml +++ b/yuthon_property_approval/views/property_accounting_approval_views.xml @@ -4,7 +4,7 @@ property.accounting.approval.tree property.accounting.approval - + @@ -17,7 +17,7 @@ property.accounting.approval.form property.accounting.approval -
+ @@ -42,49 +42,56 @@ - + - - - - + - - + - + + - - + + - - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + @@ -94,7 +101,7 @@ - 核算审批 + 建设工程委托监理合同审批 property.accounting.approval tree,form diff --git a/yuthon_property_approval/views/property_construction_approval_views.xml b/yuthon_property_approval/views/property_construction_approval_views.xml index 023cbbf80..bd1f2f637 100644 --- a/yuthon_property_approval/views/property_construction_approval_views.xml +++ b/yuthon_property_approval/views/property_construction_approval_views.xml @@ -27,7 +27,7 @@ invisible="urgency_level != 'emergency'"/> - + @@ -40,49 +40,57 @@ - + - - - - - + - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - + diff --git a/yuthon_property_approval/views/property_delegated_agent_views.xml b/yuthon_property_approval/views/property_delegated_agent_views.xml index 196630557..bfd543829 100644 --- a/yuthon_property_approval/views/property_delegated_agent_views.xml +++ b/yuthon_property_approval/views/property_delegated_agent_views.xml @@ -6,10 +6,8 @@ - - - - + + @@ -45,14 +43,43 @@ + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + +
diff --git a/yuthon_property_approval/views/property_design_approval_views.xml b/yuthon_property_approval/views/property_design_approval_views.xml index 2b63a92c5..bb15371a6 100644 --- a/yuthon_property_approval/views/property_design_approval_views.xml +++ b/yuthon_property_approval/views/property_design_approval_views.xml @@ -44,43 +44,53 @@ - - - - - + - - + + + - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - diff --git a/yuthon_property_approval/views/property_project_approval_views.xml b/yuthon_property_approval/views/property_project_approval_views.xml index 526ac337e..d5c5dce4d 100644 --- a/yuthon_property_approval/views/property_project_approval_views.xml +++ b/yuthon_property_approval/views/property_project_approval_views.xml @@ -42,15 +42,28 @@ + - + + + + + + + + + + + + +
diff --git a/yuthon_property_approval/views/property_sporadic_works_views.xml b/yuthon_property_approval/views/property_sporadic_works_views.xml index fbead6a71..8565b08bf 100644 --- a/yuthon_property_approval/views/property_sporadic_works_views.xml +++ b/yuthon_property_approval/views/property_sporadic_works_views.xml @@ -4,11 +4,8 @@ property.sporadic.works.tree property.sporadic.works - + - - -
@@ -16,7 +13,7 @@ property.sporadic.works.form property.sporadic.works -
+ @@ -44,27 +41,46 @@ + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + - + - - diff --git a/yuthon_property_approval/views/property_supervising_approval_views.xml b/yuthon_property_approval/views/property_supervising_approval_views.xml index 1ac6c3b62..da6ecc58f 100644 --- a/yuthon_property_approval/views/property_supervising_approval_views.xml +++ b/yuthon_property_approval/views/property_supervising_approval_views.xml @@ -42,43 +42,55 @@ - + - - - - - + - + + - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + diff --git a/yuthon_property_approval/wizard/build_pop_wizard.py b/yuthon_property_approval/wizard/build_pop_wizard.py new file mode 100644 index 000000000..9dbfedc43 --- /dev/null +++ b/yuthon_property_approval/wizard/build_pop_wizard.py @@ -0,0 +1,12 @@ +from odoo import models, fields, api, _, SUPERUSER_ID +from odoo.exceptions import UserError, ValidationError + + +class BuildPopWizard(models.TransientModel): + _name = 'build.pop.wizard' + _description = '添加物业弹窗' + + + + def confirm(self): + pass diff --git a/yuthon_property_approval/wizard/build_pop_wizard_viwes.xml b/yuthon_property_approval/wizard/build_pop_wizard_viwes.xml new file mode 100644 index 000000000..e69de29bb