Skip to Content
Menu
This question has been flagged
1 Reply
2092 Views

hey guys i recently installed hr_expense , i can succfully create an unsubmitted expense but when i try to approve or refuse that expense , this error appears:


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: name - name]


i also try  to use this with a fresh installed odoo but still this error appears.


also i have this error in odoo log: 


2021-08-01 18:38:46,509 44083 ERROR main_asli odoo.sql_db: bad query: b'INSERT INTO "hr_expense" ("id", "currency_id", "product_uom_id", "payment_mode", "employee_id", "quantity", "date", "company_id", "account_id", "sale_order_id", "analytic_account_id", "sheet_id", "is_refused", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval(\'hr_expense_id_seq\'), 89, 1, \'own_account\', 1, \'1.00\', \'2021-08-01\', 1, NULL, NULL, NULL, 3, false, 1, 1, (now() at time zone \'UTC\'), (now() at time zone \'UTC\')) RETURNING id'

ERROR: null value in column "name" violates not-null constraint

DETAIL: Failing row contains (4, null, 2021-08-01, 1, null, 1, null, 1.00, null, null, 1, 89, null, null, null, own_account, null, 3, null, f, null, 1, 2021-08-01 18:38:46.434484, 1, 2021-08-01 18:38:46.434484, null).

need your assistance.

Avatar
Discard

Do you have any customization for expense?

Author

no, but I defined some custom fields in product form, but I did delete them, same error

Author

no i did not

Best Answer

did u missed to fill the name or ref field ?

Avatar
Discard
Related Posts Replies Views Activity
3
Sep 22
5769
1
Aug 22
3493
3
Mar 21
1165
5
Feb 20
10624
2
Feb 19
2117