@@ -163,7 +163,7 @@ class HolidaysRequestBatch(models.Model):
|
||||
self.leave_ids.action_validate()
|
||||
self.hour_leave_ids.action_validate()
|
||||
|
||||
@api.onchange('is_day', 'is_hour')
|
||||
@api.onchange('is_day', 'is_hour', 'users_id')
|
||||
def _onchange_name(self):
|
||||
employee_name = self.users_id.name
|
||||
if self.is_day or self.is_hour:
|
||||
|
||||
@@ -52,13 +52,11 @@
|
||||
<field name="text"/>
|
||||
<field name="is_hour"/>
|
||||
<field name="is_day"/>
|
||||
<field name="details" readonly="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="user_role_id" invisible="1"/>
|
||||
<field name="is_issues" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="details" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="按天请假" invisible="not is_day"/>
|
||||
<!-- <field name="leave_ids" invisible="not is_day"-->
|
||||
|
||||
@@ -29,7 +29,6 @@ class CardApprovals(models.Model):
|
||||
active = fields.Boolean('Active', default=True)
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
default='normal')
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
@@ -87,7 +86,7 @@ class CardApprovals(models.Model):
|
||||
if rec.attendance_id.check_out:
|
||||
rec.attendance_id.check_out = rec.attendance_id.check_in.replace(hour=max_hour, minute=max_minute) - timedelta(hours=8)
|
||||
else:
|
||||
rec.attendance_id.check_out = current_datetime.replace(hour=min_hour, minute=min_minute) - timedelta(hours=8)
|
||||
rec.attendance_id.check_out = current_datetime.replace(hour=max_hour, minute=max_minute) - timedelta(hours=8)
|
||||
|
||||
rec.attendance_id.is_approval = True
|
||||
rec.attendance_id.is_abnormal = False
|
||||
|
||||
@@ -39,30 +39,15 @@
|
||||
</h1>
|
||||
</div>
|
||||
<group string="审批事项">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="name"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="users_id"/>
|
||||
<field name="employee_id" invisible="1"/>
|
||||
<field name="shift_name" readonly="False"/>
|
||||
<field name="attendance_id" domain="[('employee_id', '=', employee_id), ('is_abnormal', '=', 1)]"/>
|
||||
<field name="replacement_time"/>
|
||||
<field name="shift_id" invisible="1"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<group col="4">
|
||||
<group>
|
||||
<field name="users_id"/>
|
||||
<field name="employee_id" invisible="1"/>
|
||||
<field name="shift_name" readonly="False"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="attendance_id" domain="[('employee_id', '=', employee_id), ('is_abnormal', '=', 1)]"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="replacement_time"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="shift_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -10,16 +10,15 @@ class YuthonServiceApproval(models.Model):
|
||||
name = fields.Char(string='标题')
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_service_approval_code'))
|
||||
service_type = fields.Selection([('done', '在职证明'), ('leaving', '离职证明'), ('income', '收入类型')], string="服务类型")
|
||||
service_type = fields.Selection([('done', '在职证明'), ('leaving', '离职证明'), ('income', '收入证明')], string="服务类型")
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
employee_id = fields.Many2one('hr.employee', string="员工姓名")
|
||||
tenant_user_card = fields.Many2one('ir.attachment', string="身份证")
|
||||
onboarding_time = fields.Date(string="入职时间")
|
||||
job_id = fields.Many2one('hr.job', string="岗位")
|
||||
onboarding_time = fields.Date(related='employee_id.open_start_time',string="入职时间")
|
||||
job_id = fields.Many2one(related='employee_id.job_id', string="岗位")
|
||||
reason_issuance = fields.Char(string="开证原因")
|
||||
issue_text = fields.Html(string="正文")
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
related_issues_id = fields.Many2one('issue.library', string="关联议题")
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
@@ -47,3 +46,8 @@ class YuthonServiceApproval(models.Model):
|
||||
})
|
||||
elif self.related_issues_id:
|
||||
raise UserError("已经创建了相关的上会记录,不能取消勾选")
|
||||
|
||||
@api.onchange('service_type')
|
||||
def _onchange_service_type(self):
|
||||
if self.service_type:
|
||||
self.name = self.users_id.name + '-' + self.service_type.name
|
||||
|
||||
@@ -47,16 +47,13 @@
|
||||
<group string="审批事项">
|
||||
<field name="name" required="1"/>
|
||||
<field name="users_id"/>
|
||||
<field name="issue_text"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group string="个人信息">
|
||||
<field name="service_type"/>
|
||||
<field name="reason_issuance"/>
|
||||
<field name="service_type"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="onboarding_time"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -32,11 +32,8 @@ class PropertyRentRelief(models.Model):
|
||||
list_quotations = fields.Many2one('ir.attachment', string="报价清单")
|
||||
invoice_id = fields.Many2one('ir.attachment', string="发票附件")
|
||||
|
||||
hardware_parts = fields.Char(string="更换部件")
|
||||
hardware_fee = fields.Float(string="部件费用")
|
||||
|
||||
software_parts = fields.Char(string="软件名称/版本")
|
||||
software_fee = fields.Float(string="软件费用")
|
||||
parts = fields.Char(string="软件名称/更换部件")
|
||||
fee = fields.Float(string="费用")
|
||||
|
||||
service_fee = fields.Float(string="服务费")
|
||||
service_fee_total = fields.Float(string="总费用")
|
||||
@@ -48,6 +45,14 @@ class PropertyRentRelief(models.Model):
|
||||
warehouse_management = fields.Char(string="库管")
|
||||
total = fields.Float(string="总价")
|
||||
remake = fields.Text(string="备注")
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
default='normal')
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
|
||||
@api.onchange('users_id', 'fault')
|
||||
def _onchange_users_id(self):
|
||||
|
||||
@@ -16,9 +16,26 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="报事报修审批" create="0">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="code" readonly="1" string="保修编号:"/>
|
||||
<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 != 'emergency'"/>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="name" string="保修编号" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="urgency_level" readonly="1"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
<div class="col-12 text-center">
|
||||
<h1>
|
||||
<field name="name_title" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
@@ -41,7 +58,6 @@
|
||||
<field name="picture_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<group string="处理信息">
|
||||
<field name="urgency"/>
|
||||
<field name="possible_causes"/>
|
||||
<field name="software_id" invisible="possible_causes != 'software'"/>
|
||||
<field name="hardware_id" invisible="possible_causes != 'hardware'"/>
|
||||
@@ -52,12 +68,9 @@
|
||||
<field name="resolution"/>
|
||||
<field name="picture_resolution_id" widget="preview_many2one"/>
|
||||
<field name="repair_company"/>
|
||||
</group>
|
||||
<group string="费用信息">
|
||||
<field name="hardware_parts" invisible="possible_causes != 'hardware'"/>
|
||||
<field name="hardware_fee" invisible="possible_causes != 'hardware'"/>
|
||||
<field name="software_parts" invisible="possible_causes != 'software'"/>
|
||||
<field name="software_fee" invisible="possible_causes != 'software'"/>
|
||||
<field name="is_fee"/>
|
||||
<field name="parts" invisible="is_fee == False"/>
|
||||
<field name="fee" invisible="is_fee == False"/>
|
||||
</group>
|
||||
<group string="人工费用">
|
||||
<field name="service_fee_total"/>
|
||||
|
||||
Reference in New Issue
Block a user