1
This commit is contained in:
@@ -301,10 +301,10 @@ class PropertyBankStatements(models.Model):
|
||||
"default_bank_branch": self.bank_branch,
|
||||
"default_account": record.name,
|
||||
"default_actual_total": record.original_amount,
|
||||
"default_reconciliation_line_ids": all_vals,
|
||||
"default_reconciliation_line_ids": all_vals, # 租金,应收日期排序、管理费、电、水、押金
|
||||
'default_amount_reconciled': self.no_amount,
|
||||
"default_receivable_total": total_rent_month,
|
||||
"dialog_size" : "extra-large",
|
||||
"dialog_size": "extra-large",
|
||||
"default_order": "due_date desc",
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<field name="lessee_id"/>
|
||||
<!-- <field name="lessor_id" invisible="1"/>-->
|
||||
<field name="users_id" readonly="1" invisible="1"/>
|
||||
<field name="department_id" invisible="1" required="0"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="property_name"/>
|
||||
<field name="use_address"/>
|
||||
<field name="address_for_delivery"/>
|
||||
@@ -474,7 +474,7 @@
|
||||
<field name="lessee_id" readonly="0"/>
|
||||
<field name="lessee_name" invisible="1"/>
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1" required="0"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="use_address" readonly="0"/>
|
||||
<field name="address_for_delivery" readonly="0"/>
|
||||
<field name="property_name" readonly="0"/>
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
<field name="sequence" column_invisible="1" />
|
||||
<field name="reconciliation_id" column_invisible="1"/>
|
||||
<field name="property_ids" readonly="1" column_invisible="1"/>
|
||||
<field name="collection_type" readonly="1" force_save="1"/>
|
||||
<field name="property_name"/>
|
||||
<field name="contract_id" readonly="1" force_save="1"/>
|
||||
<field name="due_date" readonly="1" force_save="1"/>
|
||||
<field name="rent_month" sum = "Total" readonly="1" force_save="1"/>
|
||||
<field name="rent" sum = "Total" readonly="1" force_save="1"/>
|
||||
<field name="collection_type" readonly="1" force_save="1"/>
|
||||
<field name="amount" sum = "Total" force_save="1"/>
|
||||
<field name="remake"/>
|
||||
</tree>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
'depends': ['base', 'web', 'yuthon_property'],
|
||||
'data': [
|
||||
'views/menu.xml',
|
||||
'views/yuthon_report_property.xml',
|
||||
'views/ledger_report_views.xml',
|
||||
'views/receivable_report_views.xml',
|
||||
'views/yuthon_report_res_partner.xml',
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import res_partner
|
||||
from . import report_property
|
||||
from . import ledger_report
|
||||
from . import receivable_report
|
||||
@@ -1,42 +0,0 @@
|
||||
from odoo import fields, models, api
|
||||
|
||||
|
||||
class YuthonProperty(models.Model):
|
||||
_inherit = 'yuthon.property'
|
||||
|
||||
@api.model
|
||||
def get_report_data(self, params):
|
||||
domain = []
|
||||
if params.get("keyword"):
|
||||
keyword = params["keyword"]
|
||||
# 获取权属类型的存储值与显示值映射(如:{'self': '自有', 'agency': '代管'})
|
||||
tenure_type_selection = self._fields['tenure_type']._description_selection(self.env)
|
||||
matched_tenure_values = [
|
||||
key for key, label in tenure_type_selection
|
||||
if keyword in label # 匹配中文显示值
|
||||
]
|
||||
conditions = [
|
||||
("name", "ilike", keyword),
|
||||
("company_id.name", "ilike", keyword),
|
||||
("admin_id.name", "ilike", keyword)
|
||||
]
|
||||
|
||||
if matched_tenure_values:
|
||||
conditions.append(("tenure_type", "in", matched_tenure_values))
|
||||
else:
|
||||
conditions.append(("tenure_type", "ilike", keyword))
|
||||
domain += ["|"] * (len(conditions) - 1) + conditions
|
||||
properties = self.search(domain, limit=100)
|
||||
# 构造返回数据列表
|
||||
return [
|
||||
{
|
||||
"资产名称": p.name or "",
|
||||
"管理面积": p.management_area or 0.0,
|
||||
"可租面积": p.rent_area or 0.0,
|
||||
"产权面积": p.equity_area or 0.0,
|
||||
"产权证号": p.title_deed or "",
|
||||
"产权地址": p.title_address.name or "" if p.title_address else "",
|
||||
"资产目前状态": dict(self._fields['property_state']._description_selection(self.env))[p.property_state]
|
||||
}
|
||||
for p in properties
|
||||
]
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="action_property_report" model="ir.actions.client">
|
||||
<field name="name">资产报表</field>
|
||||
<field name="tag">youthon_report_client</field>
|
||||
<field name="context">
|
||||
{
|
||||
"sideBar": true,
|
||||
"report_config": {
|
||||
"model": "yuthon.property",
|
||||
"method": "get_report_data",
|
||||
"search_fields": [
|
||||
{"name": "keyword", "type": "char", "label": "资产名称关键字"},
|
||||
{"name": "property_state", "type": "selection", "label": "资产状态",
|
||||
"selection": [
|
||||
('to', '待评估'), ('done', '已评估'), ('ing', '评估中'),
|
||||
('ing_handover', '移交中'), ('done_handover', '已移交'),
|
||||
('filing', '备案中'), ('net', '挂网'), ('signing', '签约中'),
|
||||
('signed', '已备案'), ('leased', '已租'), ('idle', '空置'),
|
||||
('no_lease', '不可租'), ('leasing', '在租'), ('self', '自用')
|
||||
]}
|
||||
],
|
||||
"columns": [
|
||||
{"headerName": "资产名称", "field": "资产名称", "flex": 1},
|
||||
{"headerName": "管理面积", "field": "管理面积", "flex": 1},
|
||||
{"headerName": "可租面积", "field": "可租面积", "flex": 1},
|
||||
{"headerName": "产权面积", "field": "产权面积", "flex": 1},
|
||||
{"headerName": "产权证号", "field": "产权证号", "flex": 1},
|
||||
{"headerName": "产权地址", "field": "产权地址", "flex": 1},
|
||||
{"headerName": "资产目前状态", "field": "资产目前状态", "flex": 1}
|
||||
]
|
||||
}
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_property_report"
|
||||
name="资产报表"
|
||||
parent="yuthon_property_approval.property_approval_report_menu"
|
||||
action="action_property_report"
|
||||
sequence="5"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -66,7 +66,7 @@
|
||||
'yuthon_salary/static/src/xml/salary_validation_button.xml',
|
||||
'yuthon_salary/static/src/xml/salary_return_button.xml',
|
||||
'yuthon_salary/static/src/xml/salary_year_button.xml',
|
||||
'yuthon_salary/static/src/views/list/*',
|
||||
# 'yuthon_salary/static/src/views/list/*',
|
||||
]
|
||||
},
|
||||
'installable': True,
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<field name="former_year_balance" groups="yuthon_salary.group_jtbb_user"/>
|
||||
<field name="on_year_liquidation" groups="yuthon_salary.group_jtbb_user"/>
|
||||
<field name="former_year_liquidation" groups="yuthon_salary.group_jtbb_user"/>
|
||||
|
||||
<field name="one_three_salary" groups="yuthon_salary.group_wg_user"/>
|
||||
<field name="job_salary" groups="yuthon_salary.group_wg_user"/>
|
||||
<field name="test_salary" groups="yuthon_salary.group_wg_user"/>
|
||||
|
||||
Reference in New Issue
Block a user