@@ -23,6 +23,7 @@
|
||||
'views/room_office_views.xml',
|
||||
'views/webclient_templates.xml',
|
||||
'views/inherit_calendar_event_views.xml',
|
||||
'views/other_meet_employee_views.xml',
|
||||
'report/meet_check_report.xml',
|
||||
'wizard/room_booking_sign_wizard.xml',
|
||||
'wizard/room_booking_partner_create_wizard.xml',
|
||||
|
||||
@@ -7,3 +7,4 @@ from . import room_room
|
||||
from . import room_meeting_sign
|
||||
from . import inherit_calendar_event
|
||||
from . import room_meeting_type
|
||||
from . import other_meet_employee
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class OtherMeetEmployee(models.Model):
|
||||
_name = "other.meet.employee"
|
||||
_description = "其他外部会议人员"
|
||||
|
||||
name = fields.Char(string="姓名")
|
||||
phone = fields.Char(string="电话")
|
||||
address = fields.Char(string="地址")
|
||||
email = fields.Char(string="邮箱")
|
||||
other_company = fields.Char(string="单位")
|
||||
@@ -4,7 +4,7 @@ from odoo.exceptions import ValidationError
|
||||
|
||||
class RoomMeetingType(models.Model):
|
||||
_name = 'room.meeting.type'
|
||||
_description = '会议类型配置'
|
||||
_description = '会议类型'
|
||||
_order = 'sequence asc'
|
||||
|
||||
sequence = fields.Char(string='序号', store=True)
|
||||
@@ -13,7 +13,7 @@ class RoomMeetingType(models.Model):
|
||||
room_users_ids = fields.Many2many('soong.user.role', string="出席人员", store=True)
|
||||
host_user_id = fields.Many2one('res.users', string="主持人")
|
||||
users_ids = fields.Many2many('res.users', string="出席人员")
|
||||
company_id = fields.Many2one('res.company', string="所属公司", index=True, default=lambda self: self.env.company)
|
||||
company_id = fields.Many2one('res.company', string="公司", index=True, default=lambda self: self.env.company)
|
||||
|
||||
@api.depends('host_id', 'room_users_ids')
|
||||
def _onchange_meet_users_ids(self):
|
||||
|
||||
@@ -4,6 +4,7 @@ access_room_office_manager,access.room.office.manager,room.model_room_office,roo
|
||||
access_room_room_user,access.room.room.user,room.model_room_room,base.group_user,1,0,0,0
|
||||
access_room_room_manager,access.room.room.manager,room.model_room_room,room.group_room_manager,1,1,1,1
|
||||
access_room_booking_user,access.room.booking.user,room.model_room_booking,base.group_user,1,1,1,1
|
||||
access_other_meet_employee,other_meet_employee,model_other_meet_employee,base.group_user,1,1,1,1
|
||||
|
||||
access_room_meeting_sign,access.room.meeting.sign,model_room_meeting_sign,base.group_user,1,1,1,1
|
||||
access_room_meeting_type,access.room.meeting.type,model_room_meeting_type,base.group_user,1,1,1,1
|
||||
|
||||
|
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="other_meet_employee_list" model="ir.ui.view">
|
||||
<field name="name">other.meet.employee.list</field>
|
||||
<field name="model">room.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="phone"/>
|
||||
<field name="address"/>
|
||||
<field name="email"/>
|
||||
<field name="other_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="other_meet_employee_action" model="ir.actions.act_window">
|
||||
<field name="name">会议室</field>
|
||||
<field name="res_model">room.room</field>
|
||||
<field name="view_mode">list</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -36,13 +36,16 @@
|
||||
<div class="o_gantt_popover">
|
||||
<ul class="ps-1 mb-0 list-unstyled">
|
||||
<li>
|
||||
<strong>Organizer:</strong>
|
||||
<strong>创建人:</strong>
|
||||
<t t-out="organizer_id[1]"/>
|
||||
</li>
|
||||
<li class="o_gantt_popover_content_item mt-2">
|
||||
<t t-out="start_datetime.toFormat('f ')"/>
|
||||
<i class="fa fa-long-arrow-right" title="Until"/>
|
||||
<t t-out="stop_datetime.toFormat(' f')"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>参会人员:</strong>
|
||||
</li>
|
||||
<li class="o_gantt_popover_content_item mt-2">
|
||||
<strong>出席人员:</strong>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<!-- sequence="3"/>-->
|
||||
|
||||
<!-- <menuitem id="room_type_setting"-->
|
||||
<!-- name="会议类型配置"-->
|
||||
<!-- name="会议类型"-->
|
||||
<!-- action="room.view_room_meeting_type_action"-->
|
||||
<!-- parent="room_type_setting_menu"-->
|
||||
<!-- sequence="1"/>-->
|
||||
|
||||
@@ -94,4 +94,4 @@ class YuthonRoleTree(models.Model):
|
||||
|
||||
name = fields.Char(string="角色名称")
|
||||
department_id = fields.Many2one('hr.department', string="所属部门")
|
||||
company_id = fields.Many2one('res.company', string="所属公司", index=True, default=lambda self: self.env.company)
|
||||
company_id = fields.Many2one('res.company', string="公司", index=True, default=lambda self: self.env.company)
|
||||
@@ -5,5 +5,28 @@
|
||||
text-overflow: clip !important; // 移除省略号(或直接不设置)
|
||||
min-width: max-content !important; // 按内容撑开列宽(可选)
|
||||
}
|
||||
//tr .o_data_cell {
|
||||
// white-space: pre-wrap !important;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 左对齐
|
||||
.o_list_table .o_field_x2many_list_row_add a {
|
||||
float: left;
|
||||
}
|
||||
|
||||
// 字段小红点
|
||||
//.o_wrap_field:has(.o_required_modifier) > .o_wrap_label {
|
||||
// position: relative; /* 为了使绝对定位的星号相对于标签定位 */
|
||||
//}
|
||||
//.o_wrap_field:has(.o_required_modifier) > .o_wrap_label label::before {
|
||||
// content: "*";
|
||||
// color: red;
|
||||
// font-weight: bold;
|
||||
// position: absolute;
|
||||
// left: 0.3rem; /* 根据需要调整位置 */
|
||||
// top: 50%;
|
||||
// transform: translateY(-50%);
|
||||
// font-size: 1.2rem; /* 根据需要调整字体大小 */
|
||||
//}
|
||||
@@ -50,6 +50,15 @@ class HrAttendance(models.Model):
|
||||
# if fields_dict[field].get('type') == 'boolean':
|
||||
# group[field] = len([r for r in self.search_read(group['__domain'], fields=[field]) if r.get(field)])
|
||||
# return result
|
||||
@api.constrains('check_in', 'check_out')
|
||||
def _check_validity_check_in_check_out(self):
|
||||
""" verifies if check_in is earlier than check_out. """
|
||||
for attendance in self:
|
||||
if attendance.check_in and attendance.check_out:
|
||||
if attendance.check_out < attendance.check_in:
|
||||
print('------------------------------修改源码后期优化')
|
||||
# raise exceptions.ValidationError(_('"Check Out" time cannot be earlier than "Check In" time.'))
|
||||
|
||||
#考勤异常提醒
|
||||
def card_remind(self):
|
||||
# 获取所有员工
|
||||
|
||||
@@ -287,13 +287,11 @@ class HrAttendanceDetail(models.Model):
|
||||
for user in user_obj:
|
||||
# 判断是否是微信用户
|
||||
if user.oauth_uid and user.employee_id.contract_id:
|
||||
_logger.info("梳理ing:{} id:{},总:{},剩:{},司{}".format(user.name, user.id, total_users, remaining_users, user.employee_id.company_id.name))
|
||||
_logger.info("{} id:{},总:{},剩:{},{}".format(user.name, user.id, total_users, remaining_users, user.employee_id.company_id.name))
|
||||
remaining_users -= 1
|
||||
for current_date in self.sudo().divide_time_range_fixed(start_time, now_time):
|
||||
self.sudo()._do_save_wx_attendance_data(user, current_date)
|
||||
self.sudo()._do_plan_save_wx_attendance_data(user, current_date)
|
||||
# else:
|
||||
# _logger.info("梳理ing:{} id:{},司{}".format(user.name, user.id, user.employee_id.company_id.name))
|
||||
return True
|
||||
|
||||
def _do_save_wx_attendance_data(self, user, current_date):
|
||||
|
||||
@@ -20,7 +20,7 @@ class YuthonHrDepartment(models.Model):
|
||||
expiration_date = fields.Date(string="失效日期", default=fields.Date.today())
|
||||
end_date = fields.Date(string="结束时间")
|
||||
department_code = fields.Char(string="部门序号")
|
||||
company_id = fields.Many2one('res.company', string="所属公司", index=True, default=lambda self: self.env.company)
|
||||
company_id = fields.Many2one('res.company', string="公司", index=True, default=lambda self: self.env.company)
|
||||
pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True)
|
||||
|
||||
def do_department_to_res_groups(self):
|
||||
|
||||
@@ -10,7 +10,7 @@ class PropertyAccountsReceivable(models.Model):
|
||||
property_id = fields.Many2one('yuthon.property', string='物业')
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员")
|
||||
company_id = fields.Many2one(related='property_id.company_id', string="所属公司")
|
||||
company_id = fields.Many2one(related='property_id.company_id', string="公司")
|
||||
rent_month = fields.Float(string='当月租金')
|
||||
tax = fields.Float(string='税率')
|
||||
title_certificate = fields.Char(sting="产权证号")
|
||||
|
||||
@@ -8,7 +8,7 @@ class PropertyRentList(models.Model):
|
||||
property_id = fields.Many2one('yuthon.property', string='物业')
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员")
|
||||
company_id = fields.Many2one(related='property_id.company_id', string="所属公司")
|
||||
company_id = fields.Many2one(related='property_id.company_id', string="公司")
|
||||
rent_month = fields.Float(string='当月租金')
|
||||
tax = fields.Float(string='税率')
|
||||
title_certificate = fields.Char(sting="产权证号")
|
||||
|
||||
@@ -58,7 +58,7 @@ class YuthonProperty(models.Model):
|
||||
admin_id = fields.Many2one('res.users', string="片区管理员")
|
||||
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
|
||||
title_address = fields.Many2one('yuthon.property.message', string="产权地址")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="公司")
|
||||
rental_address = fields.Text(string="出租地址")
|
||||
tenure_type = fields.Selection([('self', '自有'), ('agency', '代管')], string='权属类型')
|
||||
ame = fields.Char(string='标题')
|
||||
@@ -389,7 +389,7 @@ class ManageInformationLine(models.Model):
|
||||
rent_area = fields.Float(string="可租面积", digits=(16, 4))
|
||||
admin_id = fields.Many2one('res.users', string="管理员")
|
||||
|
||||
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="公司")
|
||||
start_time = fields.Date(string="生效日期", default=fields.Date.today)
|
||||
end_date = fields.Date(string="失效日期")
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class PropertyApproval(models.Model):
|
||||
default='normal')
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
work_end = fields.Boolean(string="结束")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="公司")
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
@@ -18,7 +18,7 @@ class PropertyInformation(models.Model):
|
||||
purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
|
||||
original_property_id = fields.Many2one('property.management', string="关联物业管理变更审批")
|
||||
property_name = fields.Char(string="物业名称")
|
||||
company_id = fields.Many2one('res.company', string="所属公司")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
admin_id = fields.Many2one('res.users', string="管理员")
|
||||
precinct = fields.Char(string="片区")
|
||||
address = fields.Text(string="物业地址")
|
||||
|
||||
@@ -52,7 +52,7 @@ class PropertyInformationDetailLines(models.Model):
|
||||
_description = '新物业信息'
|
||||
|
||||
new_property_id = fields.Many2one('property.management', string="新物业信息")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="所属公司")
|
||||
company_id = fields.Many2one('yuthon.property.company', string="公司")
|
||||
purpose_id = fields.Many2one('yuthon.resource.purpose', string="管理类型")
|
||||
admin_id = fields.Many2one('res.users', string="管理员")
|
||||
new_precincts = fields.Many2one('yuthon.precinct.message', string="新片区")
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
<field name="actual_end_time"/>
|
||||
<field name="end_comparison" column_invisible="1"/>
|
||||
<field name="deposit_status" column_invisible="1"/>
|
||||
<field name="company_id" string="所属公司"/>
|
||||
<field name="company_id" string="公司"/>
|
||||
<field name="admin_id" string="负责人"/>
|
||||
<field name="property_state"/>
|
||||
<button name="put_evaluation_plan" type="object" class="btn-primary" string="评估推送" invisible="property_state == 'ing'"/>
|
||||
|
||||
@@ -82,6 +82,11 @@ class InheritHrPayslip(models.Model):
|
||||
base_salary_deduction = fields.Float(string='扣发基本工资', compute='_compute_deduction', store=True)
|
||||
specialized_deduction = fields.Float(string='累计专项扣除')
|
||||
|
||||
@api.ondelete(at_uninstall=False)
|
||||
def _unlink_if_draft_or_cancel(self):
|
||||
if any(payslip.state not in ('draft', 'cancel') for payslip in self):
|
||||
raise UserError(_('确定是否删除?手工填写的临时工资项数据也将被删除!\n 工资条只有草稿和取消状态才可以删除,请批量取消后操作'))
|
||||
|
||||
def action_refresh_from_work_entries(self):
|
||||
if any(p.state not in ['draft', 'verify'] for p in self):
|
||||
raise UserError(_('The payslips should be in Draft or Waiting state.'))
|
||||
|
||||
@@ -19,25 +19,27 @@
|
||||
parent='menu_yuthon_will_task'
|
||||
action='view_yuthon_will_task_action4'
|
||||
sequence='8'/>
|
||||
<menuitem
|
||||
id="room_menu_root_will"
|
||||
name="预定"
|
||||
action="room.room_booking_action"
|
||||
parent="menu_yuthon_will_task"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem
|
||||
id="room_booking_menu_will"
|
||||
name="会议室"
|
||||
action="room.room_room_action"
|
||||
parent="menu_yuthon_will_task"
|
||||
sequence="12"/>
|
||||
<menuitem id="room_menu_root_will"
|
||||
name="预定"
|
||||
action="room.room_booking_action"
|
||||
parent="menu_yuthon_will_task"
|
||||
sequence="10"/>
|
||||
<menuitem id="room_booking_menu_will"
|
||||
name="会议室"
|
||||
action="room.room_room_action"
|
||||
parent="menu_yuthon_will_task"
|
||||
sequence="12"/>
|
||||
<menuitem id="other_meet_employee_action_will"
|
||||
name="外部会议人员"
|
||||
action="room.other_meet_employee_action"
|
||||
parent="menu_yuthon_will_task"
|
||||
sequence="14"/>
|
||||
<menuitem id="task_type_menu"
|
||||
name="配置"
|
||||
parent="menu_yuthon_will_task"
|
||||
sequence="100"/>
|
||||
<menuitem id="room_type_setting_will"
|
||||
name="会议类型配置"
|
||||
name="会议类型"
|
||||
action="room.view_room_meeting_type_action"
|
||||
parent="task_type_menu"
|
||||
sequence="1"/>
|
||||
|
||||
Reference in New Issue
Block a user