!7938 添加功能

Merge pull request !7938 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-01-13 13:29:46 +00:00
committed by Gitee
7 changed files with 147 additions and 2 deletions
@@ -41,6 +41,7 @@
<group string="审批信息">
<field name="name"/>
<field name="users_id"/>
<field name="is_back" invisible="1"/>
<field name="work_end" invisible="1"/>
<field name="come_file_id"/>
<field name="official_partner_id"/>
+1
View File
@@ -25,6 +25,7 @@
'views/property_collection_confirm.xml',
'views/property_eligibility.xml',
'views/yuthon_property_ledger_views.xml',
'views/property_fee_spending_view.xml',
'views/property_lessee_analysis_viwes.xml',
'views/property_bills_list_views.xml',
'views/property_fitment.xml',
@@ -1,5 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="property_fee_spending_code_sequence" model="ir.sequence">
<field name="name">费用支出编号</field>
<field name="code">property_fee_spending_code</field>
<field name="prefix">FYZC%(y)s%(month)s%(day)s</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
<record id="property_bills_payable_code_sequence" model="ir.sequence">
<field name="name">应付账单编号</field>
<field name="code">property_bills_payable_code</field>
+2 -1
View File
@@ -60,4 +60,5 @@ from . import payment_process
from . import contract_accounts_receivable
from . import property_bills_payable
from . import property_payment_notice
from . import property_bills_list
from . import property_bills_list
from . import property_fee_spending
@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, exceptions, _
from odoo.exceptions import UserError, ValidationError
class PropertyFeeSpending(models.Model):
_name = 'property.fee.spending'
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
_description = '费用支出'
name = fields.Char(string='标题')
tip_description = fields.Text('事项名称')
property_address = fields.Text(string="物业地址")
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="部门")
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('property_fee_spending_code'))
is_issues = fields.Boolean(string='是否上会')
issues_result = fields.Html(string="会议结果")
related_issues_id = fields.Many2one('issue.library', string="关联议题")
property_documents_ids = fields.Many2many('documents.document', string="附件")
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
default='normal')
active = fields.Boolean('Active', default=True, tracking=True)
work_end = fields.Boolean(string="结束")
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
spending_fee = fields.Float(string="支付金额")
pay_date = fields.Date(string="支付日期")
expenses_type = fields.Many2one('yuthon.expenses.type', string="支出类型")
remake = fields.Text(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])])
class YuthonExpensesType(models.Model):
_name = 'yuthon.expenses.type'
_description = '支出类型'
name = fields.Char(string="支出类型")
@@ -125,4 +125,8 @@ access_property_bills_wizard,property_bills_wizard,model_property_bills_wizard,b
access_action_refuse_wizard,action_refuse_wizard,model_action_refuse_wizard,base.group_user,1,1,1,1
access_property_deposit_wizard,property_deposit_wizard,model_property_deposit_wizard,base.group_user,1,1,1,1
access_deposit_reconciliation_line,deposit_reconciliation_line,model_deposit_reconciliation_line,base.group_user,1,1,1,1
access_property_management_line2,property_management_line2,model_property_management_line2,base.group_user,1,1,1,1
access_property_management_line2,property_management_line2,model_property_management_line2,base.group_user,1,1,1,1
access_yuthon_expenses_type,yuthon.expenses.type,model_yuthon_expenses_type,base.group_user,1,1,1,1
access_property_fee_spending,property_fee_spending,model_property_fee_spending,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
125 access_yuthon_expenses_type yuthon.expenses.type model_yuthon_expenses_type base.group_user 1 1 1 1
126 access_property_fee_spending property_fee_spending model_property_fee_spending base.group_user 1 1 1 1
127
128
129
130
131
132
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_property_fee_spending_tree" model="ir.ui.view">
<field name="name">property.fee.spending.tree</field>
<field name="model">property.fee.spending</field>
<field name="arch" type="xml">
<tree string="费用支出">
<field name="name"/>
<field name="spending_fee"/>
<field name="expenses_type"/>
<field name="users_id"/>
</tree>
</field>
</record>
<record id="view_property_fee_spending_form" model="ir.ui.view">
<field name="name">property.fee.spending.form</field>
<field name="model">property.fee.spending</field>
<field name="arch" type="xml">
<form string="费用支出">
<sheet>
<widget name="web_ribbon" title="普件" bg_color="text-bg-success"
invisible="urgency_level != 'normal'"/>
<widget name="web_ribbon" title="急件" bg_color="text-bg-warning"
invisible="urgency_level != 'urgent'"/>
<widget name="web_ribbon" title="特级" bg_color="text-bg-danger"
invisible="urgency_level != 'extra_urgent'"/>
<group col="4">
<group>
<field name="code" string="流水号" readonly="1"/>
</group>
<group>
<field name="urgency_level" readonly="1"/>
</group>
<group>
<field name="is_issues"/>
</group>
<group>
<field name="related_issues_id" invisible="not is_issues"/>
</group>
</group>
<div class="col-12 text-center">
<h1>
<field name="name_title" readonly="1"/>
</h1>
</div>
<group col="4">
<group>
<field name="is_back" invisible="1"/>
<field name="work_end" invisible="1"/>
<field name="pay_date"/>
<field name="department_id" invisible="1"/>
</group>
<group>
<field name="users_id"/>
</group>
<group>
<field name="company_id"/>
</group>
<group>
<field name="tenure_type"/>
</group>
</group>
<group>
<field name="name"/>
<field name="tip_description"/>
<field name="property_address"/>
<field name="remake"/>
<field name="expenses_type"/>
<field name="spending_fee"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_yuthon_expenses_type_tree" model="ir.ui.view">
<field name="name">yuthon.expenses.type.tree</field>
<field name="model">yuthon.expenses.type</field>
<field name="arch" type="xml">
<tree string="支出类型" editable="bottom">
<field name="name"/>
</tree>
</field>
</record>
</odoo>