在 odoo 9 中单击 hr_attendance 图标时出错
Error clicking in the hr_attendance icon in odoo 9
当我单击 hr_attendance 图标时,出现此消息:
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set
[object with reference: employee_id - employee.id]
转到attendance.js,我放了很多console.logs,我发现在'do_update_attendance'函数里面,变量self.employee_id是未定义的,但这是官方代码(我什么都没改)
这是一个错误还是我必须修改一些代码?
修复了它为新用户执行这些步骤:
以管理员身份登录
员工 > 员工 > 创建按钮(填写姓名)
Select "HR Settings" 选项卡 > 相关用户 -> 创建和编辑(填写姓名和电子邮件)。
保存用户和保存员工。
进入开发者模式(用户菜单 > 关于 > 激活开发者模式)
设置 > 用户 > Select 新创建的用户 > 编辑 > 标记选项 "Attendances"
保存用户。
现在可以了:)
当我单击 hr_attendance 图标时,出现此消息:
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set
[object with reference: employee_id - employee.id]
转到attendance.js,我放了很多console.logs,我发现在'do_update_attendance'函数里面,变量self.employee_id是未定义的,但这是官方代码(我什么都没改)
这是一个错误还是我必须修改一些代码?
修复了它为新用户执行这些步骤:
以管理员身份登录
员工 > 员工 > 创建按钮(填写姓名)
Select "HR Settings" 选项卡 > 相关用户 -> 创建和编辑(填写姓名和电子邮件)。
保存用户和保存员工。
进入开发者模式(用户菜单 > 关于 > 激活开发者模式)
设置 > 用户 > Select 新创建的用户 > 编辑 > 标记选项 "Attendances"
保存用户。
现在可以了:)