添加功能
This commit is contained in:
@@ -16,3 +16,18 @@ class YuthonTariffSetting(models.Model):
|
||||
|
||||
name = fields.Char(string="名称")
|
||||
ratio = fields.Float(string="比例")
|
||||
|
||||
|
||||
class PropertyAccountSetting(models.Model):
|
||||
_name = 'property.account.setting'
|
||||
_description = '账户配置'
|
||||
|
||||
name = fields.Char(string="账户名称")
|
||||
bank_deposit = fields.Char(string="开户行")
|
||||
bank_cards = fields.Char(string="银行卡号")
|
||||
|
||||
class PropertyProjectSetting(models.Model):
|
||||
_name = 'property.project.setting'
|
||||
_description = '费用项目配置'
|
||||
|
||||
name = fields.Char(string="名称")
|
||||
|
||||
@@ -72,4 +72,6 @@ access_property_accounts_receivable,property_accounts_receivable,model_property_
|
||||
access_yuthon_property_production,yuthon_property_production,model_yuthon_property_production,base.group_user,1,1,1,1
|
||||
access_property_construction_unit,property_construction_unit,model_property_construction_unit,base.group_user,1,1,1,1
|
||||
access_property_accounting_unit,property_accounting_unit,model_property_accounting_unit,base.group_user,1,1,1,1
|
||||
access_property_billing_method_line,property_billing_method_line,model_property_billing_method_line,base.group_user,1,1,1,1
|
||||
access_property_billing_method_line,property_billing_method_line,model_property_billing_method_line,base.group_user,1,1,1,1
|
||||
access_property_account_setting,property_account_setting,model_property_account_setting,base.group_user,1,1,1,1
|
||||
access_property_project_setting,property_project_setting,model_property_project_setting,base.group_user,1,1,1,1
|
||||
|
@@ -30,4 +30,34 @@
|
||||
<field name="res_model">yuthon.tariff.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_property_account_setting_tree" model="ir.ui.view">
|
||||
<field name="name">property.account.setting.tree</field>
|
||||
<field name="model">property.account.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="账户配置" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="bank_deposit"/>
|
||||
<field name="bank_cards"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_property_account_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">账户配置</field>
|
||||
<field name="res_model">property.account.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="view_property_project_setting_tree" model="ir.ui.view">
|
||||
<field name="name">property.project.setting.tree</field>
|
||||
<field name="model">property.project.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="项目配置" editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_property_project_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">项目配置</field>
|
||||
<field name="res_model">property.project.setting</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -18,6 +18,7 @@
|
||||
'views/property_collection_confirm.xml',
|
||||
'views/property_early_quitting.xml',
|
||||
'views/property_eligibility.xml',
|
||||
'views/property_reimbursement_form_views.xml',
|
||||
'views/property_fitment.xml',
|
||||
'views/property_information.xml',
|
||||
'views/property_inventory_table.xml',
|
||||
|
||||
@@ -294,4 +294,9 @@
|
||||
<field name="code">property_design_approval_code</field>
|
||||
<field name="prefix">SJ%(y)s%(month)s%(day)s</field>
|
||||
</record>
|
||||
<record id="property_reimbursement_form_sequence" model="ir.sequence">
|
||||
<field name="name">报销单编号</field>
|
||||
<field name="code">property_reimbursement_form_code</field>
|
||||
<field name="prefix">BX%(y)s%(month)s%(day)s</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -46,4 +46,5 @@ from . import property_delegated_agent
|
||||
from . import property_construction_approval
|
||||
from . import property_project_approval
|
||||
from . import property_design_approval
|
||||
from . import property_supervising_approval
|
||||
from . import property_supervising_approval
|
||||
from . import property_reimbursement_form
|
||||
@@ -0,0 +1,39 @@
|
||||
# -*- 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 PropertyReimbursementForm(models.Model):
|
||||
_name = 'property.reimbursement.form'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_description = '报销单审批'
|
||||
|
||||
name = fields.Char(string='标题')
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_reimbursement_form_code'))
|
||||
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="部门")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
related_issues_id = fields.Many2one('issue.library', string="关联议题")
|
||||
reason_application = fields.Html(string="事由")
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="公司")
|
||||
account_id = fields.Many2one('property.account.setting', string="账户")
|
||||
expense_line_ids = fields.One2many('property.expense.line', 'reimbursement_id', string="费用项目明细")
|
||||
|
||||
|
||||
class PropertyExpenseLine(models.Model):
|
||||
_name = 'property.expense.line'
|
||||
_description = '费用项目明细'
|
||||
|
||||
reimbursement_id = fields.Many2one('property.reimbursement.form', string='关联报销单')
|
||||
expense_id = fields.Many2one('property.project.setting', string='费用项目')
|
||||
invoice_type = fields.Char(string='发票类型')
|
||||
expense_amount = fields.Float(string='费用金额')
|
||||
applied_reimbursement_amount = fields.Float(string='申请报销金额')
|
||||
expense_department_id = fields.Many2one('hr.department', string='费用承担部门')
|
||||
invoice_receipt_number = fields.Char(string='收票单号')
|
||||
applied_payment_amount = fields.Float(string='申请付款金额')
|
||||
approved_reimbursement_amount = fields.Float(string='核定报销金额')
|
||||
approved_payment_amount = fields.Float(string='核定付款金额')
|
||||
@@ -80,4 +80,6 @@ access_supervising_way_line,supervising.way.line,model_supervising_way_line,base
|
||||
access_property_contract_line,property_contract_line,model_property_contract_line,base.group_user,1,1,1,1
|
||||
access_choose_property_wizard,choose_property_wizard,model_choose_property_wizard,base.group_user,1,1,1,1
|
||||
access_property_rental_wizard,property_rental_wizard,model_property_rental_wizard,base.group_user,1,1,1,1
|
||||
access_property_reimbursement_form,property_reimbursement_form,model_property_reimbursement_form,base.group_user,1,1,1,1
|
||||
access_property_expense_line,property_expense_line,model_property_expense_line,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
@@ -230,7 +230,7 @@
|
||||
sequence="15"/>
|
||||
<!--财务报表 -->
|
||||
<menuitem id="yuthon_property_process"
|
||||
sequence="99"
|
||||
sequence="90"
|
||||
name="流程"
|
||||
parent="yuthon_property.yuthon_financial_management_menu"/>
|
||||
<menuitem id="yuthon_property_fee_adjust"
|
||||
@@ -268,7 +268,25 @@
|
||||
name="违约金比例调整"
|
||||
parent="yuthon_property_process"
|
||||
action="property_penalty_proportion_action"/>
|
||||
|
||||
<menuitem id="property_reimbursement_form_menu"
|
||||
sequence="19"
|
||||
name="报销单"
|
||||
parent="yuthon_property_process"
|
||||
action="view_property_reimbursement_form_action"/>
|
||||
<menuitem id="yuthon_property_process_setting"
|
||||
sequence="99"
|
||||
name="配置"
|
||||
parent="yuthon_property.yuthon_financial_management_menu"/>
|
||||
<menuitem id="yuthon_property_account_setting_menu"
|
||||
sequence="1"
|
||||
name="账户设置"
|
||||
parent="yuthon_property_process_setting"
|
||||
action="yuthon_property.yuthon_property_account_setting_action"/>
|
||||
<menuitem id="yuthon_property_project_setting_menu"
|
||||
sequence="5"
|
||||
name="费用项目"
|
||||
parent="yuthon_property_process_setting"
|
||||
action="yuthon_property.yuthon_property_project_setting_action"/>
|
||||
<menuitem id="yuthon_property_contract_wizard_menu"
|
||||
parent="yuthon_property.yuthon_property_fee_management"
|
||||
name="生成合同应收向导"
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_property_reimbursement_form_tree" model="ir.ui.view">
|
||||
<field name="name">property.reimbursement.form.tree</field>
|
||||
<field name="model">property.reimbursement.form</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="报销单">
|
||||
<field name="name"/>
|
||||
<field name="users_id"/>
|
||||
<field name="account_id"/>
|
||||
<field name="company_page"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_property_reimbursement_form_form" model="ir.ui.view">
|
||||
<field name="name">property.reimbursement.form.form</field>
|
||||
<field name="model">property.reimbursement.form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="报销单">
|
||||
<group>
|
||||
<field name="code" readonly="1" string="流水号:"/>
|
||||
</group>
|
||||
<sheet>
|
||||
<group string="审批事项">
|
||||
<field name="name"/>
|
||||
<field name="users_id"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="account_id"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="费用明细">
|
||||
<field name="expense_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="reimbursement_id" column_invisible="1"/>
|
||||
<field name="expense_id"/>
|
||||
<field name="invoice_type"/>
|
||||
<field name="expense_amount"/>
|
||||
<field name="applied_reimbursement_amount"/>
|
||||
<field name="expense_department_id"/>
|
||||
<field name="invoice_receipt_number"/>
|
||||
<field name="applied_payment_amount"/>
|
||||
<field name="approved_reimbursement_amount"/>
|
||||
<field name="approved_payment_amount"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_property_reimbursement_form_action" model="ir.actions.act_window">
|
||||
<field name="name">报销单</field>
|
||||
<field name="res_model">property.reimbursement.form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -7,7 +7,7 @@ class YuthonPayrollCommon(models.Model):
|
||||
|
||||
name = fields.Char(string='工资项名称')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='所属公司')
|
||||
string='公司')
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
conditional_formulas = fields.Char(string='条件公式') # todo 可能是个many2one
|
||||
start_date = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
@@ -20,7 +20,7 @@ class YuthonPayrollTemporary(models.Model):
|
||||
|
||||
name = fields.Char(string='工资项名称')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='所属公司')
|
||||
string='公司')
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
start_date = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
end_date = fields.Date(string="失效日期")
|
||||
@@ -31,8 +31,20 @@ class YuthonPayrollInsurances (models.Model):
|
||||
_description = '五险一金'
|
||||
|
||||
name = fields.Char(string='工资项名称')
|
||||
is_base = fields.Boolean(string='独立基数')
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')],
|
||||
string='所属公司')
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
string='公司')
|
||||
proportion_company = fields.Float(string='公司缴纳比例')
|
||||
proportion_employee = fields.Float(string='个人缴纳比例')
|
||||
proportion_company_ceiling = fields.Float(string='公司缴纳比例上限')
|
||||
proportion_company_floor = fields.Float(string='公司缴纳比例下限')
|
||||
company_base_ceiling = fields.Float(string='公司缴纳基数上限')
|
||||
company_base_floor = fields.Float(string='公司缴纳基数下限')
|
||||
employee_base_ceiling = fields.Float(string='个人缴纳基数上限')
|
||||
employee_base_floor = fields.Float(string='个人缴纳基数下限')
|
||||
company_values = fields.Char(string='险种公司取值')
|
||||
employee_values = fields.Char(string='险种个人取值')
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
remarks = fields.Text(string="备注")
|
||||
start_date = fields.Date(string="生效日期", default=fields.Date.today())
|
||||
end_date = fields.Date(string="失效日期")
|
||||
@@ -70,7 +70,19 @@
|
||||
<tree string="五险一金" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="department_id"/>
|
||||
<field name="is_base"/>
|
||||
<field name="proportion_company"/>
|
||||
<field name="proportion_employee"/>
|
||||
<field name="proportion_company_ceiling"/>
|
||||
<field name="proportion_company_floor"/>
|
||||
<field name="company_base_ceiling"/>
|
||||
<field name="company_base_floor"/>
|
||||
<field name="employee_base_ceiling"/>
|
||||
<field name="employee_base_floor"/>
|
||||
<field name="company_values"/>
|
||||
<field name="employee_values"/>
|
||||
<field name="documents_ids"/>
|
||||
<field name="remarks"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
</tree>
|
||||
|
||||
Reference in New Issue
Block a user