添加功能

This commit is contained in:
zhouzhou
2024-10-16 15:10:05 +08:00
parent ac09a03b61
commit c13ba3d586
9 changed files with 58 additions and 4 deletions
+2 -1
View File
@@ -9,9 +9,10 @@
'security/ir.model.access.csv',
'views/holiday_type_setting.xml',
'views/yuthon_holiday_type.xml',
'views/yuthon_holiday_allocation.xml',
],
'demo': [],
'depends': ['hr_holidays',],
'depends': ['hr_holidays', 'soong_workflow'],
'installable': True,
'application': True,
}
+2 -1
View File
@@ -1,2 +1,3 @@
from . import holiday_type_setting
from . import yuthon_holiday_type
from . import yuthon_holiday_type
from . import yuthon_holiday_allocation
@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class HrLeaveAllocation(models.Model):
_inherit = 'hr.leave.allocation'
holiday_type = fields.Selection(selection_add=[('role', '角色')])
number_of_days_display = fields.Float(related='holiday_status_id.holiday_days')
users_role_ids = fields.Many2many('soong.user.role', string='角色范围')
@@ -9,6 +9,12 @@ class HrLeaveType(models.Model):
holiday_days = fields.Float(string='假期天数')
vacation_days_description = fields.Text(string='假期天数说明')
vacation_type_id = fields.Many2one('holiday.type.setting', string='假期类型')
annual = fields.Char(string='年次')
travel_leave = fields.Char(string='路程假')
treated = fields.Text(string='待遇')
remarks = fields.Text(string="备注")
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_yuthon_holiday_allocation_form" model="ir.ui.view">
<field name="name">yuthon.holiday.allocation.form</field>
<field name="model">hr.leave.allocation</field>
<field name="inherit_id" ref="hr_holidays.hr_leave_allocation_view_form_manager"/>
<field name="arch" type="xml">
<!-- <xpath expr="//field[@name='mode_company_id']" position="after">-->
<!-- <field name="users_role_ids" widget="many2many_tags" invisible="holiday_type != 'role'" required="holiday_type == 'role'" groups="hr_holidays.group_hr_holidays_user"/>-->
<!-- </xpath>-->
</field>
</record>
</odoo>
@@ -8,6 +8,9 @@
<xpath expr="//field[@name='allocation_validation_type']" position="after">
<field name="holiday_days"/>
</xpath>
<xpath expr="//field[@name='allocation_validation_type']" position="attributes">
<attribute name="column_invisible">1</attribute>
</xpath>
</field>
</record>
<record id ="view_yuthon_holiday_type_form" model="ir.ui.view">
@@ -26,6 +29,7 @@
<field name="vacation_type_id"/>
<field name="holiday_days"/>
<field name="vacation_days_description"/>
<field name="annual"/>
<field name="travel_leave"/>
<field name="treated"/>
<field name="remarks"/>
@@ -18,7 +18,7 @@ class HolidayManageBalance(models.Model):
leave = fields.Char(string="事假")
sick_leave = fields.Char(string="病假")
type_leave = fields.Char(string="请假类型")
type_leave = fields.Many2one('holiday.type.setting',string="请假类型")
estimated_time = fields.Datetime(string="预计时长")
actual_time = fields.Datetime(string="实际时长")
used_time = fields.Datetime(string="已用时长")
@@ -26,7 +26,7 @@ class HolidaysApprovalsLine(models.Model):
leave_absence_id = fields.Many2one('hr.employee', string="请假人")
main_text = fields.Text(string='事由')
approvals_id = fields.Many2one('holidays.approval', string="管理请假审批")
leave_category = fields.Char( string="请假类型")
leave_category = fields.Many2one('holiday.type.setting',string="A请假类型")
days_available = fields.Char(string="可用天数")
applicants = fields.Selection([('hours', '按小时'),('days', '按天')], string="申请单位")
date_start = fields.Datetime(string="开始时间", default=fields.Datetime.now)
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, exceptions, _
class PropertyBeEvaluated(models.Model):
_name = 'property.be.evaluated'
_description = '待评估物业信息'
name = fields.Char(string='名称')
owner = fields.Char(string="权属人")
property_address = fields.Char(string="物业地址")