Skip to Content
Menu
This question has been flagged
3 Replies
2211 Views

Hi,

i'm using Odoo v8 since a year and now i'm getting the following Integrity Error during the creation of a Quotation:

Integrity Error
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: access_token - access.token]

Does anybody know what's the reason for this error and how I can resolve it? 

Avatar
Discard

How you done any customization in the database ?

Normally we get this error when the value for the required field is not given either directly or through the code. Check it

Author

Yes, we deleted an invoice. I know it's not perfect to do it with the invoice_cancel application. But could this be the reason?

Author Best Answer

I checked the log of the PostgreSQL and it shows the following:

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

DETAIL: Failing row contains (186, null, 2017-12-13 08:23:57.746334, 1, null, 2017-12-13 08:23:47, 148, null, null, null, null, null, null, 1, Payment conditions: In case of greater amounts we request a pre-..., draft, 1, 1, null, 2017-12-13 08:23:57.746334, 148, 1, null, null, null, AN-186, 148, manual, direct, null, 1, f, null, null, null, null, null, null, null, null).


STATEMENT: INSERT INTO "sale_order" ("id", "origin", "picking_policy", "order_policy", "campaign_id", "carrier_id", "client_order_ref", "date_order", "partner_id", "fiscal_position", "user_id", "payment_term", "company_id", "note", "state", "pricelist_id", "project_id", "incoterm", "section_id", "warehouse_id", "partner_invoice_id", "name", "medium_id", "partner_shipping_id", "shipped", "source_id", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('sale_order_id_seq'), NULL, 'direct', 'manual', NULL, NULL, NULL, '2017-12-13 08:23:47', 148, NULL, 1, NULL, 1, 'Payment conditions: In case of


', 'draft', 1, NULL, NULL, NULL, 1, 148, 'AN-186', NULL, 148, false, NULL, 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id

Avatar
Discard