Skip to main content
 首页 » 编程设计

python之在 OpenERP 的薪资部分中扣除休假

2025年05月04日10cmt

我正在使用 OpenERP 的薪资模块,并因以下错误而发疯。

这是我尝试过的:

  1. 在“休假类型”中创建无薪休假并选择薪资负责人“LOP”并为其创建分析帐户
  2. 一名员工从“休假申请部分”申请了无薪假
  3. 在计算该员工的工资单时,计算休假和休假扣除额并显示在工资单中。

但是当我尝试批准工资单时,出现错误:

ProgrammingError: operator does not exist: integer = boolean 
LINE 1: ...d FROM "account_account" WHERE account_account.id IN (false)... 
                                                             ^ 
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts. 

仅当我在“休假类型”部分选择“无薪”休假时才会出现这种情况。

请您参考如下方法:

终于找到问题的答案了..

当与 LOP 对应的帐户作为 False 输入到数据库时,会出现此问题。

要解决此问题,只需为 LOP 行选择一个 General Account 工资结构 工资单标签。