跳至內容
選單
此問題已被標幟
1 回覆
6147 瀏覽次數

Hi Folks, Tops to you this day. I imported accounts (account_account) directly from pgadmin. Afterwards I tried to create a new account from OpenERP, when I try to save,I get the following error message

"duplicate key value violates unique constraint "account_account_pkey" DETAIL: Key (id)=(114) already exists."

Apparently before I imported the accounts from pgadmin, the next in line pkey was 114, I manually assigned this as a database id for one of the imported accounts but somehow the system does not consider the manually assigned database id (assigned during my pgadmin import). I imagine it stores OpenERP assigned database ID some where so I need to go and update that to read the actual last database id based on my assigned values.

Does anyone know where that it is stored or how I can achieve that?

many thanks in advance for your help.

Cheers

頭像
捨棄
作者

I tried it out and it worked. Many Thanks

Flag as answered, thx

@Chike: in the left margin of ECP D's answer there is a check mark. Click on it, to mark your question as answered fully. That way others (like me, for example) will not waste time reading a question which has already been answered. Also, click the up arrow, as I just did, to give ECP D further "karma points" for his excellent, rapid and accurate answer.

作者

@Martin Just did.Thanks

最佳答案

Hi Go to pgadmin, YOURDATABASE/schemas/public/sequences/res_partner_id_seq and Alter/restart value (on your example its need to be what u got in the error message 114.. ) Set this value to the last ID after importing manually your partners.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
6月 15
8166
0
10月 17
4667
0
12月 16
3198
4
3月 15
17462
0
3月 16
3212