Hi
I am trying to insert a quotation from one country server to another country server. I could insert crm and sales order successfully but when i try to insert quotation, it is showing below error for partner ID.can pls advise
'23503: insert or update on table "sale_order" violates foreign key constraint "sale_order_partner_id_fkey"
thanks for the information . Partner id for this customer in country A db is 6580 but in target db is 6463 this case should i change the partner id to make both id same? will this solve the problem. But when i update the id ,as below
update public.res_partner set id='6580' where ID='6463';
it is showing below error
ERROR: update or delete on table "res_partner" violates foreign key constraint "crm_lead_partner_id_fkey" on table "crm_lead"
DETAIL: Key (id)=(6463) is still referenced from table "crm_lead".
********** Error **********
ERROR: update or delete on table "res_partner" violates foreign key constraint "crm_lead_partner_id_fkey" on table "crm_lead"
SQL state: 23503
Detail: Key (id)=(6463) is still referenced from table "crm_lead".
When i update crm_lead as below,then below error is showing:
update crm_lead set partner_id = '6580' where id='756'
ERROR: insert or update on table "crm_lead" violates foreign key constraint "crm_lead_partner_id_fkey"
DETAIL: Key (partner_id)=(6580) is not present in table "res_partner".
********** Error **********
ERROR: insert or update on table "crm_lead" violates foreign key constraint "crm_lead_partner_id_fkey"
SQL state: 23503
Detail: Key (partner_id)=(6580) is not present in table "res_partner".
Partner is existing in both db but the id is different. Now i tried to insert the same parterid (hard coded the id)same as taget table in the insert query but still the error message is showing as below
Npgsql.PostgresException: '23503: insert or update on table "sale_order" violates foreign key constraint "sale_order_partner_id_fkey"
create a mapping model to map the partner_id of one database to the other database- can help to provide link for this. Thanks