添加功能
This commit is contained in:
@@ -121,25 +121,25 @@
|
||||
parent="yuthon_property_archives_setting_meu"
|
||||
action="yuthon_property_approval.action_property_meter_water"/>
|
||||
|
||||
<menuitem id="yuthon_property_science_menu"
|
||||
sequence="13"
|
||||
name="报表"
|
||||
parent="yuthon_property_menu_root"/>
|
||||
<menuitem id="yuthon_property_business_statements"
|
||||
sequence="1"
|
||||
name="经营报表"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="property_assess_action"/>
|
||||
<menuitem id="yuthon_property_financial_ledgers"
|
||||
sequence="3"
|
||||
name="财务台账"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="property_assess_action"/>
|
||||
<menuitem id="yuthon_property_property_statements"
|
||||
sequence="5"
|
||||
name="物业台账"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="property_assess_action"/>
|
||||
<!-- <menuitem id="yuthon_property_science_menu"-->
|
||||
<!-- sequence="13"-->
|
||||
<!-- name="报表"-->
|
||||
<!-- parent="yuthon_property_menu_root"/>-->
|
||||
<!-- <menuitem id="yuthon_property_business_statements"-->
|
||||
<!-- sequence="1"-->
|
||||
<!-- name="经营报表"-->
|
||||
<!-- parent="yuthon_property_science_menu"-->
|
||||
<!-- action="property_assess_action"/>-->
|
||||
<!-- <menuitem id="yuthon_property_financial_ledgers"-->
|
||||
<!-- sequence="3"-->
|
||||
<!-- name="财务台账"-->
|
||||
<!-- parent="yuthon_property_science_menu"-->
|
||||
<!-- action="property_assess_action"/>-->
|
||||
<!-- <menuitem id="yuthon_property_property_statements"-->
|
||||
<!-- sequence="5"-->
|
||||
<!-- name="物业台账"-->
|
||||
<!-- parent="yuthon_property_science_menu"-->
|
||||
<!-- action="property_assess_action"/>-->
|
||||
<menuitem id="yuthon_security_inspection_menu"
|
||||
sequence="19"
|
||||
name="安全巡检(二期)"
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<group expand="0" string="group_by">
|
||||
<filter name="group_property_id" string="物业" context="{'group_by':'property_id'}"/>
|
||||
<filter name="group_lessee_id" string="承租方" context="{'group_by':'lessee_id'}"/>
|
||||
|
||||
@@ -337,45 +337,45 @@
|
||||
parent="property_construction_process_menu"
|
||||
action="view_property_delegated_agent_action"/>
|
||||
|
||||
<!--报表-->
|
||||
<menuitem id="management_area_report_menu"
|
||||
sequence="30"
|
||||
name="管理面积"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="yuthon_property.management_area_report_action"/>
|
||||
<menuitem id="rent_area_report_menu"
|
||||
sequence="35"
|
||||
name="可租面积"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="yuthon_property.rent_area_report_action"/>
|
||||
<menuitem id="yuthon_property_rented_area_menu"
|
||||
sequence="37"
|
||||
name="已租面积"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="rented_area_report_action"/>
|
||||
<menuitem id="accounts_receivable_tree_menu"
|
||||
sequence="40"
|
||||
name="合同应收"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="accounts_receivable_tree_action"/>
|
||||
<menuitem id="property_penalty_line_report_menu"
|
||||
sequence="45"
|
||||
name="违约金明细"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="property_penalty_line_report_action"/>
|
||||
<menuitem id="property_received_month_report_menu"
|
||||
sequence="50"
|
||||
name="本月实收"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="property_received_month_report_action"/>
|
||||
<menuitem id="accumulated_underpayment_report_report_menu"
|
||||
sequence="55"
|
||||
name="累计欠收"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="accumulated_underpayment_report_report_action"/>
|
||||
<menuitem id="property_deposit_list_report_menu"
|
||||
sequence="60"
|
||||
name="押金累计欠收"
|
||||
parent="yuthon_property.yuthon_property_science_menu"
|
||||
action="property_deposit_list_report_action"/>
|
||||
<!-- <!–报表–>-->
|
||||
<!-- <menuitem id="management_area_report_menu"-->
|
||||
<!-- sequence="30"-->
|
||||
<!-- name="管理面积"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="yuthon_property.management_area_report_action"/>-->
|
||||
<!-- <menuitem id="rent_area_report_menu"-->
|
||||
<!-- sequence="35"-->
|
||||
<!-- name="可租面积"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="yuthon_property.rent_area_report_action"/>-->
|
||||
<!-- <menuitem id="yuthon_property_rented_area_menu"-->
|
||||
<!-- sequence="37"-->
|
||||
<!-- name="已租面积"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="rented_area_report_action"/>-->
|
||||
<!-- <menuitem id="accounts_receivable_tree_menu"-->
|
||||
<!-- sequence="40"-->
|
||||
<!-- name="合同应收"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="accounts_receivable_tree_action"/>-->
|
||||
<!-- <menuitem id="property_penalty_line_report_menu"-->
|
||||
<!-- sequence="45"-->
|
||||
<!-- name="违约金明细"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="property_penalty_line_report_action"/>-->
|
||||
<!-- <menuitem id="property_received_month_report_menu"-->
|
||||
<!-- sequence="50"-->
|
||||
<!-- name="本月实收"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="property_received_month_report_action"/>-->
|
||||
<!-- <menuitem id="accumulated_underpayment_report_report_menu"-->
|
||||
<!-- sequence="55"-->
|
||||
<!-- name="累计欠收"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="accumulated_underpayment_report_report_action"/>-->
|
||||
<!-- <menuitem id="property_deposit_list_report_menu"-->
|
||||
<!-- sequence="60"-->
|
||||
<!-- name="押金累计欠收"-->
|
||||
<!-- parent="yuthon_property.yuthon_property_science_menu"-->
|
||||
<!-- action="property_deposit_list_report_action"/>-->
|
||||
</odoo>
|
||||
@@ -0,0 +1,2 @@
|
||||
from . import models
|
||||
from . import wizard
|
||||
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "Yuthon Property Report",
|
||||
'summary': "",
|
||||
'description': """物业查询报表 """,
|
||||
'category': 'zhou',
|
||||
'version': '0.1',
|
||||
'license': 'LGPL-3',
|
||||
'depends': ['base', 'hr', 'yuthon_property'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/yuthon_property_report_views.xml',
|
||||
'views/menu.xml',
|
||||
'wizard/yuthon_property_report_wizard.xml',
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'yuthon_property_report/static/src/js/report_create_button.js',
|
||||
'yuthon_property_report/static/src/xml/report_create_button.xml',
|
||||
],
|
||||
},
|
||||
'installable': True,
|
||||
'application': True,
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import yuthon_property_report
|
||||
@@ -0,0 +1,162 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class PropertyLedger(models.Model):
|
||||
_name = 'property.ledger'
|
||||
_description = '物业台账'
|
||||
|
||||
title_deed = fields.Char(string="产权证编号")
|
||||
name = fields.Char(string="资产名称")
|
||||
management_area = fields.Float(string="管理面积")
|
||||
equity_area = fields.Float(string="产权面积")
|
||||
registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
|
||||
message_standard_id = fields.Many2one('property.message.fee', string="管理费标准")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class PropertyOperationReport(models.Model):
|
||||
_name = 'property.operation.report'
|
||||
_description = '经营报表'
|
||||
|
||||
title_deed = fields.Char(string="产权证编号")
|
||||
name = fields.Char(string="资产名称")
|
||||
management_area = fields.Float(string="管理面积")
|
||||
equity_area = fields.Float(string="产权面积")
|
||||
registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
|
||||
message_standard_id = fields.Many2one('property.message.fee', string="管理费标准")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class PropertyFinancialLedger(models.Model):
|
||||
_name = 'property.financial.ledger'
|
||||
_description = '财务台账'
|
||||
|
||||
title_deed = fields.Char(string="产权证编号")
|
||||
name = fields.Char(string="资产名称")
|
||||
management_area = fields.Float(string="管理面积")
|
||||
equity_area = fields.Float(string="产权面积")
|
||||
registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
|
||||
message_standard_id = fields.Many2one('property.message.fee', string="管理费标准")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class ManagementAreaReport(models.Model):
|
||||
_name = 'management.area.report'
|
||||
_description = '管理面积报表'
|
||||
|
||||
title_deed = fields.Char(string="产权证编号")
|
||||
name = fields.Char(string="资产名称")
|
||||
management_area = fields.Float(string="管理面积")
|
||||
equity_area = fields.Float(string="产权面积")
|
||||
registered_id = fields.Many2one('yuthon.purpose.evidence', string='证载用途')
|
||||
message_standard_id = fields.Many2one('property.message.fee', string="管理费标准")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class RentAreaReport(models.Model):
|
||||
_name = 'rent.area.report'
|
||||
_description = '可租面积报表'
|
||||
|
||||
name = fields.Char(string="资产名称")
|
||||
rent_area = fields.Float(string="可租面积")
|
||||
property_state = fields.Selection([('vacant', '空置'), ('rented', '已租')], string="资产状态")
|
||||
vacant_duration = fields.Float(string="空置时长")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class RentedAreaReport(models.Model):
|
||||
_name = 'rented.area.report'
|
||||
_description = '已租面积报表'
|
||||
|
||||
name = fields.Char(string="资产名称")
|
||||
total_area = fields.Float(string="总面积")
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
contract_code = fields.Char(string="合同编号")
|
||||
unit_price = fields.Float(string="单价")
|
||||
rent = fields.Float(string="租金")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class AccountsReceivableReport(models.Model):
|
||||
_name = 'accounts.receivable.report'
|
||||
_description = '合同应收报表'
|
||||
|
||||
name = fields.Char(string="合同编号")
|
||||
due_date = fields.Date(string="应收日期")
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
original_amount = fields.Float(string="当期金额")
|
||||
property_id = fields.Many2one('yuthon.property', string='物业')
|
||||
contract_id = fields.Many2one('property.lease.contract', string='合同')
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class AccountsDefaultReport(models.Model):
|
||||
_name = 'accounts.default.report'
|
||||
_description = '违约金明细报表'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string='合同')
|
||||
property_id = fields.Many2one('yuthon.property', string='物业')
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
original_amount = fields.Float(string="当月所收金额")
|
||||
rent_owed = fields.Float(string="欠租金额")
|
||||
per_day = fields.Float(string="每日违约金元/天")
|
||||
penalty = fields.Float(string="违约金")
|
||||
delivered1 = fields.Float(string="已交")
|
||||
submitted = fields.Float(string="未交")
|
||||
due_date = fields.Date(string="应收日期")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
title_certificate = fields.Char(sting="产权证号")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class ReceivedMonthReport(models.Model):
|
||||
_name = 'received.month.report'
|
||||
_description = '本月实收报表'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string='合同')
|
||||
property_id = fields.Many2one('yuthon.property', string='物业')
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
delivered1 = fields.Float(string="金额")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class PenaltyListReport(models.Model):
|
||||
_name = 'penalty.list.report'
|
||||
_description = '累计欠收报表'
|
||||
|
||||
property_id = fields.Many2one('yuthon.property', string='物业')
|
||||
contract_id = fields.Many2one('property.lease.contract', string='合同')
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
management_area = fields.Char(string="片区")
|
||||
delivered1 = fields.Float(string="已交")
|
||||
submitted = fields.Float(string="未交")
|
||||
due_date = fields.Date(string="应收日期")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
|
||||
|
||||
class PropertyDepositList(models.Model):
|
||||
_name = 'property.deposit.list'
|
||||
_description = '押金累计欠收'
|
||||
|
||||
property_id = fields.Many2one('yuthon.property', string='物业')
|
||||
contract_id = fields.Many2one('property.lease.contract', string='合同')
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
original_amount = fields.Float(string="金额")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
@@ -0,0 +1,13 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_property_ledger,property.ledger,model_property_ledger,base.group_user,1,1,1,1
|
||||
access_management_area_report,management.area.report,model_management_area_report,base.group_user,1,1,1,1
|
||||
access_rent_area_report,rent.area.report,model_rent_area_report,base.group_user,1,1,1,1
|
||||
access_rented_area_report,rented.area.report,model_rented_area_report,base.group_user,1,1,1,1
|
||||
access_accounts_receivable_report,accounts.receivable.report,model_accounts_receivable_report,base.group_user,1,1,1,1
|
||||
access_accounts_default_report,accounts.default.report,model_accounts_default_report,base.group_user,1,1,1,1
|
||||
access_received_month_report,received.month.report,model_received_month_report,base.group_user,1,1,1,1
|
||||
access_penalty_list_report,penalty.list.report,model_penalty_list_report,base.group_user,1,1,1,1
|
||||
access_property_deposit_list,property.deposit.list,model_property_deposit_list,base.group_user,1,1,1,1
|
||||
access_property_operation_report,property.operation.report,model_property_operation_report,base.group_user,1,1,1,1
|
||||
access_property_financial_ledger,property.financial.ledger,model_property_financial_ledger,base.group_user,1,1,1,1
|
||||
access_yuthon_property_report_wizard,yuthon.property.report.wizard,model_yuthon_property_report_wizard,base.group_user,1,1,1,1
|
||||
|
@@ -0,0 +1,29 @@
|
||||
/** @odoo-module */
|
||||
import { ListController } from "@web/views/list/list_controller";
|
||||
import { registry } from '@web/core/registry';
|
||||
import { listView } from '@web/views/list/list_view';
|
||||
|
||||
export class CustomReportStatementsController extends ListController {
|
||||
setup() {
|
||||
super.setup();
|
||||
}
|
||||
|
||||
openReportWizard() {
|
||||
this.actionService.doAction({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: 'yuthon.property.report.wizard',
|
||||
name: '物业报表弹窗',
|
||||
view_mode: 'form',
|
||||
view_type: 'form',
|
||||
views: [[false, 'form']],
|
||||
target: 'new', // 以弹窗形式打开
|
||||
context: {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
registry.category("views").add("custom_report_statements_button", {
|
||||
...listView,
|
||||
Controller: CustomReportStatementsController,
|
||||
buttonTemplate: "report_module.ListView.Buttons",
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<templates>
|
||||
<t t-name="report_module.ListView.Buttons" t-inherit="web.ListView.Buttons">
|
||||
<xpath expr="//div[hasclass('o_list_buttons')]" position="after">
|
||||
<button type="button" class="btn btn-primary" style="margin-left: 10px;" t-on-click="openReportWizard">
|
||||
查询
|
||||
</button>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<menuitem id="yuthon_property_science_menu"
|
||||
sequence="13"
|
||||
name="报表"
|
||||
parent="yuthon_property.yuthon_property_menu_root"/>
|
||||
<menuitem id="yuthon_property_business_statements"
|
||||
sequence="1"
|
||||
name="经营报表"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_property_operation_report"/>
|
||||
<menuitem id="yuthon_property_financial_ledgers"
|
||||
sequence="3"
|
||||
name="财务台账"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_property_financial_ledger"/>
|
||||
<menuitem id="yuthon_property_property_statements"
|
||||
sequence="5"
|
||||
name="物业台账"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_property_ledger"/>
|
||||
<menuitem id="management_area_report_menu"
|
||||
sequence="30"
|
||||
name="管理面积"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_management_area_report"/>
|
||||
<menuitem id="rent_area_report_menu"
|
||||
sequence="35"
|
||||
name="可租面积"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_rent_area_report"/>
|
||||
<menuitem id="yuthon_property_rented_area_menu"
|
||||
sequence="37"
|
||||
name="已租面积"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_rented_area_report"/>
|
||||
<menuitem id="accounts_receivable_tree_menu"
|
||||
sequence="40"
|
||||
name="合同应收"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_accounts_receivable_report"/>
|
||||
<menuitem id="property_penalty_line_report_menu"
|
||||
sequence="45"
|
||||
name="违约金明细"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_accounts_default_report"/>
|
||||
<menuitem id="property_received_month_report_menu"
|
||||
sequence="50"
|
||||
name="本月实收"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_received_month_report"/>
|
||||
<menuitem id="accumulated_underpayment_report_report_menu"
|
||||
sequence="55"
|
||||
name="累计欠收"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_penalty_list_report"/>
|
||||
<menuitem id="property_deposit_list_report_menu"
|
||||
sequence="60"
|
||||
name="押金累计欠收"
|
||||
parent="yuthon_property_science_menu"
|
||||
action="action_property_deposit_list"/>
|
||||
</odoo>
|
||||
@@ -0,0 +1,270 @@
|
||||
<!-- 视图和动作定义 -->
|
||||
<odoo>
|
||||
<!-- 物业台账tree视图 -->
|
||||
<record id="view_property_ledger_tree" model="ir.ui.view">
|
||||
<field name="name">property.ledger.tree</field>
|
||||
<field name="model">property.ledger</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="物业台账" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="title_deed" />
|
||||
<field name="name" />
|
||||
<field name="management_area" />
|
||||
<field name="equity_area" />
|
||||
<field name="registered_id" />
|
||||
<field name="message_standard_id"/>
|
||||
<field name="admin_id" />
|
||||
<field name="company_id" />
|
||||
<field name="tenure_type" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- 经营报表tree视图 -->
|
||||
<record id="view_property_operation_report_tree" model="ir.ui.view">
|
||||
<field name="name">property.operation.report.tree</field>
|
||||
<field name="model">property.operation.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="经营报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="title_deed" />
|
||||
<field name="name" />
|
||||
<field name="management_area" />
|
||||
<field name="equity_area" />
|
||||
<field name="registered_id" />
|
||||
<field name="message_standard_id" />
|
||||
<field name="admin_id" />
|
||||
<field name="company_id" />
|
||||
<field name="tenure_type" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- 财务台账tree视图 -->
|
||||
<record id="view_property_financial_ledger_tree" model="ir.ui.view">
|
||||
<field name="name">property.financial.ledger.tree</field>
|
||||
<field name="model">property.financial.ledger</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="财务台账" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="title_deed" />
|
||||
<field name="name" />
|
||||
<field name="management_area" />
|
||||
<field name="equity_area" />
|
||||
<field name="registered_id" />
|
||||
<field name="message_standard_id"/>
|
||||
<field name="admin_id" />
|
||||
<field name="company_id" />
|
||||
<field name="tenure_type" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_property_ledger" model="ir.actions.act_window">
|
||||
<field name="name">物业台账</field>
|
||||
<field name="res_model">property.ledger</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_property_ledger_tree" />
|
||||
</record>
|
||||
<record id="action_property_operation_report" model="ir.actions.act_window">
|
||||
<field name="name">经营报表</field>
|
||||
<field name="res_model">property.operation.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_property_operation_report_tree" />
|
||||
</record>
|
||||
<record id="action_property_financial_ledger" model="ir.actions.act_window">
|
||||
<field name="name">财务台账</field>
|
||||
<field name="res_model">property.financial.ledger</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_property_financial_ledger_tree" />
|
||||
</record>
|
||||
<!-- 管理面积报表视图和动作 -->
|
||||
<record id="view_management_area_report_tree" model="ir.ui.view">
|
||||
<field name="name">management.area.report.tree</field>
|
||||
<field name="model">management.area.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="管理面积报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="title_deed"/>
|
||||
<field name="name"/>
|
||||
<field name="management_area"/>
|
||||
<field name="equity_area"/>
|
||||
<field name="registered_id"/>
|
||||
<field name="message_standard_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="company_id"/>
|
||||
<field name="tenure_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_management_area_report" model="ir.actions.act_window">
|
||||
<field name="name">管理面积报表</field>
|
||||
<field name="res_model">management.area.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_management_area_report_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- 可租面积报表视图和动作 -->
|
||||
<record id="view_rent_area_report_tree" model="ir.ui.view">
|
||||
<field name="name">rent.area.report.tree</field>
|
||||
<field name="model">rent.area.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="可租面积报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="name"/>
|
||||
<field name="rent_area"/>
|
||||
<field name="property_state"/>
|
||||
<field name="vacant_duration"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="company_id"/>
|
||||
<field name="tenure_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_rent_area_report" model="ir.actions.act_window">
|
||||
<field name="name">可租面积报表</field>
|
||||
<field name="res_model">rent.area.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_rent_area_report_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- 已租面积报表视图和动作 -->
|
||||
<record id="view_rented_area_report_tree" model="ir.ui.view">
|
||||
<field name="name">rented.area.report.tree</field>
|
||||
<field name="model">rented.area.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="已租面积报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="name"/>
|
||||
<field name="total_area"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="contract_code"/>
|
||||
<field name="unit_price"/>
|
||||
<field name="rent"/>
|
||||
<field name="company_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="tenure_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_rented_area_report" model="ir.actions.act_window">
|
||||
<field name="name">已租面积报表</field>
|
||||
<field name="res_model">rented.area.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_rented_area_report_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- 合同应收报表视图和动作 -->
|
||||
<record id="view_accounts_receivable_report_tree" model="ir.ui.view">
|
||||
<field name="name">accounts.receivable.report.tree</field>
|
||||
<field name="model">accounts.receivable.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="合同应收报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="name"/>
|
||||
<field name="due_date"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="property_id"/>
|
||||
<field name="contract_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="tenure_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_accounts_receivable_report" model="ir.actions.act_window">
|
||||
<field name="name">合同应收报表</field>
|
||||
<field name="res_model">accounts.receivable.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_accounts_receivable_report_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- 违约金明细报表视图和动作 -->
|
||||
<record id="view_accounts_default_report_tree" model="ir.ui.view">
|
||||
<field name="name">accounts.default.report.tree</field>
|
||||
<field name="model">accounts.default.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="违约金明细报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="contract_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="rent_owed"/>
|
||||
<field name="per_day"/>
|
||||
<field name="penalty"/>
|
||||
<field name="delivered1"/>
|
||||
<field name="submitted"/>
|
||||
<field name="due_date"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="company_id"/>
|
||||
<field name="title_certificate"/>
|
||||
<field name="tenure_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_accounts_default_report" model="ir.actions.act_window">
|
||||
<field name="name">违约金明细报表</field>
|
||||
<field name="res_model">accounts.default.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_accounts_default_report_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- 本月实收报表视图和动作 -->
|
||||
<record id="view_received_month_report_tree" model="ir.ui.view">
|
||||
<field name="name">received.month.report.tree</field>
|
||||
<field name="model">received.month.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="本月实收报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="contract_id"/>
|
||||
<field name="property_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="delivered1"/>
|
||||
<field name="company_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="tenure_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_received_month_report" model="ir.actions.act_window">
|
||||
<field name="name">本月实收报表</field>
|
||||
<field name="res_model">received.month.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_received_month_report_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- 累计欠收报表视图和动作 -->
|
||||
<record id="view_penalty_list_report_tree" model="ir.ui.view">
|
||||
<field name="name">penalty.list.report.tree</field>
|
||||
<field name="model">penalty.list.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="累计欠收报表" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="property_id"/>
|
||||
<field name="contract_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="management_area"/>
|
||||
<field name="delivered1"/>
|
||||
<field name="submitted"/>
|
||||
<field name="due_date"/>
|
||||
<field name="company_id"/>
|
||||
<field name="tenure_type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_penalty_list_report" model="ir.actions.act_window">
|
||||
<field name="name">累计欠收报表</field>
|
||||
<field name="res_model">penalty.list.report</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_penalty_list_report_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- 押金累计欠收视图和动作 -->
|
||||
<record id="view_property_deposit_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.deposit.list.tree</field>
|
||||
<field name="model">property.deposit.list</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="押金累计欠收" editable="bottom" js_class="custom_report_statements_button">
|
||||
<field name="property_id"/>
|
||||
<field name="contract_id"/>
|
||||
<field name="admin_id"/>
|
||||
<field name="original_amount"/>
|
||||
<field name="company_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_property_deposit_list" model="ir.actions.act_window">
|
||||
<field name="name">押金累计欠收</field>
|
||||
<field name="res_model">property.deposit.list</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_property_deposit_list_tree"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,2 @@
|
||||
from . import yuthon_property_report_wizard
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from email.policy import default
|
||||
|
||||
from odoo import models, fields, api, _, SUPERUSER_ID
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
from pypinyin import pinyin, Style
|
||||
import xlrd
|
||||
import base64
|
||||
import datetime
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class YuthonPropertyReportWizard(models.Model):
|
||||
_name = 'yuthon.property.report.wizard'
|
||||
_description = '物业报表弹窗'
|
||||
|
||||
select_month = fields.Selection([('1', '一月'), ('2', '二月'), ('3', '三月'), ('4', '四月'),
|
||||
('5', '五月'), ('6', '六月'), ('7', '七月'), ('8', '八月'),
|
||||
('9', '九月'), ('10', '十月'), ('11', '十一月'),
|
||||
('12', '十二月')], string='选择月份',
|
||||
default=lambda self: str(datetime.now().month))
|
||||
select_year = fields.Selection(selection=[(str(i), str(i)) for i in range(2024, 2060)], string='选择年份',
|
||||
default=lambda self: str(datetime.now().year))
|
||||
|
||||
company_id = fields.Many2one('res.company', string='公司')
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
precinct_id = fields.Many2one('yuthon.precinct.message', string="所属片区")
|
||||
|
||||
def confirm(self):
|
||||
pass
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="yuthon_property_report_wizard_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.property.report.wizard.form</field>
|
||||
<field name="model">yuthon.property.report.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="select_month"/>
|
||||
<field name="select_year"/>
|
||||
<field name="company_id"/>
|
||||
<field name="tenure_type"/>
|
||||
<field name="precinct_id"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button name="confirm" string="确认" type="object" class="oe_highlight"/>
|
||||
<button string="返回" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user