Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
10502 มุมมอง

In odoo, I needed an update trigger, which  would not let any  user to update inserted data. I used following trigger function for rejecting update. The functio and trigger did work  but it gives error TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'. How  can I resolve this ?

Function:

create function check_id_change() returns trigger language plpgsql as $account_invoice$

begin

if (TG_OP='UPDATE') THEN

    RAISE NOTICE 'CANNOT EDIT RECORDS';

    RETURN OLD;

END IF;

    RETURN NULL;

END;

$account_invoice$;


Trigger:

create trigger check_update_trigger

before update on account_invoice

for each row

execute procedure check_id_change();


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 23
2960
0
ก.ย. 18
3849
Restore 6.4 GB zip backup odoo10 แก้ไขแล้ว
2
ก.ค. 24
10866
1
ธ.ค. 23
9490
1
มี.ค. 22
14796