添加功能
This commit is contained in:
@@ -26,7 +26,7 @@ class YuthonHrEmployee(models.Model):
|
||||
对原模型数据的隐藏,字段的开发和添加
|
||||
"""
|
||||
_inherit = "hr.employee"
|
||||
_order = 'number asc'
|
||||
_order = 'user_number asc'
|
||||
|
||||
# name = fields.CharWithPinyin(default_export_compatible=True)
|
||||
user_role_ids_changed = fields.Boolean(string="xxx") # bug
|
||||
|
||||
@@ -9,6 +9,12 @@ class YuthonMedicalManage(models.Model):
|
||||
_description = '体检费管理'
|
||||
|
||||
employee_id = fields.Many2one('hr.employee', string="员工姓名")
|
||||
employee_number = fields.Char(
|
||||
string='序号',
|
||||
related='employee_id.user_number',
|
||||
store=True,
|
||||
readonly=True
|
||||
)
|
||||
start_date = fields.Date(string='开始日期')
|
||||
year = fields.Char(string="年份")
|
||||
current_year_remaining = fields.Float(string="本年剩余", compute="_compute_current_year_remaining")
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
<attribute name="options">"{'no_create': True, 'no_open': True}"</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='job_id']" position="after">
|
||||
<field name="number"/>
|
||||
<field name="number" invisible="1"/>
|
||||
<field name="user_number"/>
|
||||
<field name="contract_type_id" options="{'no_open': True}"/>
|
||||
</xpath>
|
||||
@@ -512,7 +512,7 @@
|
||||
decoration-info="end_comparison == 'blue'"
|
||||
decoration-danger="end_comparison == 'red'"
|
||||
decoration-warning="end_comparison == 'yellow'"
|
||||
default_order="entry_date asc">
|
||||
default_order="user_number asc">
|
||||
<header>
|
||||
</header>
|
||||
<field name="end_comparison" column_invisible="1"/>
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
<field name="name">yuthon.medical.manage.tree</field>
|
||||
<field name="model">yuthon.medical.manage</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="体检费管理" editable="bottom" default_order="entry_date desc">
|
||||
<tree string="体检费管理" editable="bottom" default_order="employee_number asc">
|
||||
<header>
|
||||
<button name="property_reimbursement_form" string="提交体检费报销审批" type="object"
|
||||
class="oe_highlight"/>
|
||||
<button name="compute_medical_manage" string="重新计算" type="object"
|
||||
class="oe_highlight"/>
|
||||
</header>
|
||||
<field name="employee_number" column_invisible="1"/>
|
||||
<field name="employee_id" options="{'no_create': True}"/>
|
||||
<field name="year" column_invisible="1"/>
|
||||
<!-- <field name="company_id" required="1" optional="show"/>-->
|
||||
|
||||
Reference in New Issue
Block a user