From c7fe4c4a56aa78d95ab4c6bfb95637474948aff5 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 28 Aug 2025 11:19:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/inherit_maintenance_equipment.py | 1 + .../views/maintenance_equipment_views.xml | 4 ++ yuthon_property_approval/__manifest__.py | 2 + yuthon_property_approval/models/__init__.py | 4 +- .../models/property_lessee_analysis.py | 17 +++++++ .../models/yuthon_property_ledger.py | 43 ++++++++++++++++++ .../security/ir.model.access.csv | 3 ++ .../views/property_lease_contract.xml | 2 +- .../views/property_lessee_analysis_viwes.xml | 22 ++++++++++ .../views/property_menu_all.xml | 12 +++++ .../views/yuthon_property_ledger_views.xml | 44 +++++++++++++++++++ 11 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 yuthon_property_approval/models/property_lessee_analysis.py create mode 100644 yuthon_property_approval/models/yuthon_property_ledger.py create mode 100644 yuthon_property_approval/views/property_lessee_analysis_viwes.xml create mode 100644 yuthon_property_approval/views/yuthon_property_ledger_views.xml diff --git a/yuthon_maintain/models/inherit_maintenance_equipment.py b/yuthon_maintain/models/inherit_maintenance_equipment.py index 08ec4a90e..8333d9f5d 100644 --- a/yuthon_maintain/models/inherit_maintenance_equipment.py +++ b/yuthon_maintain/models/inherit_maintenance_equipment.py @@ -38,6 +38,7 @@ class InheritMaintenanceEquipment(models.Model): equipment_number = fields.Char(string="数量") equipment_unit = fields.Many2one('uom.uom', string="单位") purchase_date = fields.Date(string="购入日期") + life = fields.Char(string="寿命") @api.depends('company_id') def _compute_company_id(self): diff --git a/yuthon_maintain/views/maintenance_equipment_views.xml b/yuthon_maintain/views/maintenance_equipment_views.xml index 876a1c646..b223d5e21 100644 --- a/yuthon_maintain/views/maintenance_equipment_views.xml +++ b/yuthon_maintain/views/maintenance_equipment_views.xml @@ -166,6 +166,10 @@ 购入日期: +
+ 寿命: + +
diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py index 0ca6cac02..accc8e53d 100644 --- a/yuthon_property_approval/__manifest__.py +++ b/yuthon_property_approval/__manifest__.py @@ -18,6 +18,8 @@ 'views/property_capacity.xml', 'views/property_collection_confirm.xml', 'views/property_eligibility.xml', + 'views/yuthon_property_ledger_views.xml', + 'views/property_lessee_analysis_viwes.xml', 'views/property_fitment.xml', 'views/property_information.xml', 'views/property_inventory_table.xml', diff --git a/yuthon_property_approval/models/__init__.py b/yuthon_property_approval/models/__init__.py index 98fd39cb3..023fc7602 100644 --- a/yuthon_property_approval/models/__init__.py +++ b/yuthon_property_approval/models/__init__.py @@ -53,4 +53,6 @@ from . import property_engineering_approval from . import property_current_approval from . import property_accounts_approval from . import inherit_property_tenant_information -from . import property_meeting_approval \ No newline at end of file +from . import property_meeting_approval +from . import property_lessee_analysis +from . import yuthon_property_ledger \ No newline at end of file diff --git a/yuthon_property_approval/models/property_lessee_analysis.py b/yuthon_property_approval/models/property_lessee_analysis.py new file mode 100644 index 000000000..13bbbf2f7 --- /dev/null +++ b/yuthon_property_approval/models/property_lessee_analysis.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import models, fields, api, exceptions, _ +from datetime import datetime, timedelta + + +class PropertyLesseeAnalysis(models.Model): + _name = 'property.lessee.analysis' + _description = '承租方租赁情况分析' + + industry_id = fields.Many2one('yuthon.industry.setting', string='行业') + number_lessees = fields.Integer(string='承租方数量') + area = fields.Float(string='面积(㎡)') + area_ratio = fields.Float(string='面积占比') + total = fields.Float(string='上年租金收入合计') + total_ratio = fields.Float(string='收入占比') \ No newline at end of file diff --git a/yuthon_property_approval/models/yuthon_property_ledger.py b/yuthon_property_approval/models/yuthon_property_ledger.py new file mode 100644 index 000000000..501e3b3dc --- /dev/null +++ b/yuthon_property_approval/models/yuthon_property_ledger.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import models, fields, api, exceptions, _ +from datetime import datetime, timedelta + + +class YuthonPropertyLedger(models.Model): + _name = 'yuthon.property.ledger' + _description = '台账报表' + + property_id = fields.Many2one('yuthon.property', string='资产地址') + equity_area = fields.Float(string='资产面积') + street = fields.Char(string='街道') + precinct_id = fields.Many2one('yuthon.precinct.message', string='小区') + registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途') + property_state = fields.Selection([('to', '待评估'), ('done', '已评估'), ('ing', '评估中'), + ('ing_handover', '移交中'), ('done_handover', '已移交'), + ('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'), + ('signed', '已备案'), ('leased', '已租'), ('idle', '空置'), + ('no_lease', '不可租'), ('leasing', '在租'), ('self', '自用')], + string='资产目前状态', default='to') + admin_id = fields.Many2one('res.users', string="片区管理员") + lessor_id = fields.Many2one('yuthon.property.company', string="出租单位") + lessee_id = fields.Many2one('property.tenant.information', string='承租方') + rental_address = fields.Char(string='出租地址') + credit_code = fields.Char(string='统一社会信用代码') + contact = fields.Char(string='联系人') + rental_purposes = fields.Many2one('yuthon.rental.purpose', string="出租用途") + approval_status = fields.Char(string='审批情况') + rental_method = fields.Selection([('yes', '公开招租'), ('no', '非公开招租')], string='出租方式') + contract_id = fields.Many2one('property.lease.contract', string="租赁合同号") + rental_area = fields.Float(string='出租面积') + appraisal_price = fields.Float(string='评估价(元/m² •月)') + first_year_rent = fields.Float(string="首年租金") + contract_date = fields.Date(string="合同签订日期") + term_start_time = fields.Date(string="合约开始时间", default=fields.Datetime.now) + term_end_time = fields.Date(string="合约结束时间") + rent_changes = fields.Char(string="合同期内租金变化") + unit_price = fields.Float(string="单价") + monthly_amount = fields.Float(string="月租金") + total_amount = fields.Float(string="合同总金额") + real_amount = fields.Float(string="实际已收到金额") \ No newline at end of file diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv index d857a310b..df560483b 100644 --- a/yuthon_property_approval/security/ir.model.access.csv +++ b/yuthon_property_approval/security/ir.model.access.csv @@ -99,4 +99,7 @@ access_property_management_wizard, property_management_wizard,model_property_man access_click_reconciliation_wizard, click_reconciliation_wizard,model_click_reconciliation_wizard,base.group_user,1,1,1,1 access_accounts_wizard, accounts_wizard,model_accounts_wizard,base.group_user,1,1,1,1 access_binding_information_wizard,binding_information_wizard,model_binding_information_wizard,base.group_user,1,1,1,1 +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 + diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index edf8307b1..dba4b912d 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -365,7 +365,7 @@ property.lease.contract.tree property.lease.contract - +