3

我正在使用 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.

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

4

2 回答 2

2

Finally i found the solution to the question..

The issue occurred when the account corresponding to the LOP is entered into db as False.

To resolve the problem,just select a General Account for the LOP row in the salary structure tab of Payslip.

于 2012-03-07T12:26:44.050 回答
0

你可以使用这个 python 代码:

try:
    result = -(contract.wage /31 ) * worked_days.Unpaid.number_of_days
except : 
    result = 0
于 2020-08-27T17:42:36.560 回答