!5403 添加功能

Merge pull request !5403 from 李鹏宇/zhou
This commit is contained in:
李鹏宇
2025-09-25 10:55:00 +00:00
committed by Gitee
7 changed files with 88 additions and 2 deletions
+1
View File
@@ -63,6 +63,7 @@
'views/property_current_approval_views.xml',
'views/property_split_approval_views.xml',
'views/property_evaluate_application_views.xml',
'views/contract_accounts_receivable_viwes.xml',
'views/inherit_yuthon_property_views.xml',
'views/property_project_works_viwes.xml',
'views/property_sporadic_works_views.xml',
+2 -1
View File
@@ -56,4 +56,5 @@ from . import inherit_property_tenant_information
from . import property_meeting_approval
from . import property_lessee_analysis
from . import yuthon_property_ledger
from . import payment_process
from . import payment_process
from . import contract_accounts_receivable
@@ -0,0 +1,12 @@
from odoo import models, fields, api
class ContractAccountsReceivable(models.Model):
_name = 'contract.accounts.receivable'
_description = '应收账单(合同)'
contract_id = fields.Many2one('property.lease.contract', string="合同")
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
property_ids = fields.Many2many('yuthon.property', string='物业')
contract_accounts_ids = fields.One2many('property.accounts.receivable', 'contract_accounts_id', string='关联应收账单')
@@ -368,6 +368,7 @@ class PropertyAccountsReceivable(models.Model):
_rec_name = 'contract_id'
property_ids = fields.Many2many('yuthon.property', string='物业', compute='_compute_property_ids', store=True)
contract_accounts_id = fields.Many2one('contract.accounts.receivable', string="关联应收账单(合同)")
property_name = fields.Text(string='物业', compute="_compute_property_name")
is_rent = fields.Boolean(string='是否租金', default=True, compute = '_compute_is_rent', store=True)
management_area = fields.Float(related='contract_id.total_area', string='面积')
@@ -384,6 +385,14 @@ class PropertyAccountsReceivable(models.Model):
rent_owed = fields.Float(string="欠租金额")
per_day = fields.Float(string="每天违约金(元/天)")
last_month_table = fields.Float(string="上月表数")
this_month_table = fields.Float(string="本月表数")
ratio = fields.Float(string="倍率")
billable_quantity = fields.Float(string="计费数量")
pre_collection = fields.Float(string="预收金额")
actual_coping = fields.Float(string="实际应付")
@api.depends('management_type_id')
def _compute_is_rent(self):
for rec in self:
@@ -109,3 +109,5 @@ access_build_pop_wizard, build_pop_wizard,model_build_pop_wizard,base.group_user
access_penalty_line_wizard, penalty_line_wizard,model_penalty_line_wizard,base.group_user,1,1,1,1
access_penalty_compute_line_wizard, penalty_compute_line_wizard,model_penalty_compute_line_wizard,base.group_user,1,1,1,1
access_penalty_pay_line, penalty_pay_line,model_penalty_pay_line,base.group_user,1,1,1,1
access_contract_accounts_receivable, contract_accounts_receivable,model_contract_accounts_receivable,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
109 access_contract_accounts_receivable contract_accounts_receivable model_contract_accounts_receivable base.group_user 1 1 1 1
110
111
112
113
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_contract_accounts_receivable_tree" model="ir.ui.view">
<field name="name">contract.accounts.receivable.tree</field>
<field name="model">contract.accounts.receivable</field>
<field name="arch" type="xml">
<tree string="应收账单(合同)">
<field name="contract_id"/>
<field name="lessee_id"/>
<field name="property_ids" widget="many2many_tags"/>
</tree>
</field>
</record>
<record id="view_contract_accounts_receivable_form" model="ir.ui.view">
<field name="name">contract.accounts.receivable.form</field>
<field name="model">contract.accounts.receivable</field>
<field name="arch" type="xml">
<form string="应收账单(合同)">
<sheet>
<group>
<field name="contract_id"/>
<field name="lessee_id"/>
<field name="property_ids" widget="many2many_tags"/>
</group>
<notebook>
<page string="明细">
<field name="contract_accounts_ids">
<tree editable="bottom">
<field name="contract_accounts_id" column_invisible="1"/>
<field name="management_type_id"/>
<field name="last_month_table"/>
<field name="this_month_table"/>
<field name="ratio"/>
<field name="billable_quantity"/>
<field name="due_date"/>
<field name="due_date_end"/>
<field name="original_amount" string="应计金额"/>
<field name="pre_collection"/>
<field name="remark"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_contract_accounts_receivable_action" model="ir.actions.act_window">
<field name="name">应收账单(合同)</field>
<field name="res_model">contract.accounts.receivable</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>
+7 -1
View File
@@ -783,9 +783,15 @@
sequence="5"/>
<menuitem id="yuthon_accounts_receivable_menu"
sequence="1"
name="应收账单"
name="应收账单(明细)"
parent="yuthon_financial_management_menu"
action="yuthon_property_approval.property_accounts_receivable_action"/>
<menuitem
id="contract_accounts_receivable_menu"
parent="yuthon_financial_management_menu"
name="应收账单(合同)"
action="yuthon_property_approval.view_contract_accounts_receivable_action"
sequence="3"/>
<menuitem id="yuthon_subject_form_menu"
sequence="5"
name="预算科目表"