Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

unable to insert row at id, but row does not exist

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
postgresqlinsertopenerp7primarykey
1 Răspunde
8546 Vizualizări
Imagine profil
Saghir A. Khatri

4 down vote favorite

Here is the weird problem i am facing. I am trying to enter data using following query

insert into product_product (id, product_tmpl_id, make_equip, model_equip, name_template, serial_num_equip, location_equip, issue_date_equip, issue_to_equip, remarks_equip, pr, ch, categ_id,valuation) values (700,700,'Nikon','Action 10x50 Lookout','Nikon Action 10x50 Lookout','671386','40 Wall St.','5/13/2004 12:00:00 AM','','OM''s OFFICE',62,72,502,'manual periodic');

I get the error :

ERROR: duplicate key value violates unique constraint "product_product_pkey" DETAIL: Key (id)=(700) already exists. ********** Error ********** ERROR: duplicate key value violates unique constraint "product_product_pkey" SQL state: 23505 Detail: Key (id)=(700) already exists.

I ran select query on that record like this:

select * from product_product where id=700

It returns columns with no data(data includes id too)

I tried to run update query like this:

update product_product set product_tmpl_id=700, make_equip='Nikon', model_equip='Action 10x50 Lookout', name_template='Nikon Action 10x50 Lookout', serial_num_equip='671386', location_equip='40 Wall St.', issue_date_equip='5/13/2004 12:00:00 AM', issue_to_equip='', remarks_equip='OM''s OFFICE', pr=62, ch=72, categ_id=502,valuation='manual periodic' where id=700;

result was:

Query returned successfully: 0 rows affected, 1 ms execution time.

i tried delete query too but same output.

Also show all data shows nothing like id 700.

I don't know why this is happening.

I re indexed and Vacuumed my table from maintenance but same result.

Plz let me know what is wrong with it.

Thanks

Edit

here is my create table

CREATE TABLE product_product ( id serial NOT NULL, create_uid integer, create_date timestamp without time zone, write_date timestamp without time zone, write_uid integer, ean13 character varying(13), -- EAN13 Barcode color integer, -- Color Index image bytea, -- Image price_extra numeric, -- Variant Price Extra default_code character varying(64), -- Internal Reference name_template character varying(128), -- Template Name ..... description_sale text, procure_method character varying, produce_delay double precision, uom_id integer, name character varying, office_equip character varying, -- Office(Equipment) lease_agreement_equip character varying, -- Lease Agreement reg_exp_date_equip character varying, -- Registration Expiration Date CONSTRAINT product_product_pkey PRIMARY KEY (id ), CONSTRAINT product_product_categ_temp2_fkey FOREIGN KEY (categ_temp2) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_categ_temp3_fkey FOREIGN KEY (categ_temp3) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_categ_temps_fkey FOREIGN KEY (categ_temps) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_categg_temp_fkey FOREIGN KEY (categg_temp) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_ch_fkey FOREIGN KEY (ch) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_create_uid_fkey FOREIGN KEY (create_uid) REFERENCES res_users (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_my_products_fkey FOREIGN KEY (my_products) REFERENCES product_product (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_phone_data_id_fkey FOREIGN KEY (phone_data_id) REFERENCES phone_datas (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_phone_id_fkey FOREIGN KEY (phone_id) REFERENCES phone_types (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_pr_fkey FOREIGN KEY (pr) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_product_tmpl_id_fkey FOREIGN KEY (product_tmpl_id) REFERENCES product_template (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT product_product_subchild_fkey FOREIGN KEY (subchild) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_temp_id_fkey FOREIGN KEY (temp_id) REFERENCES product_category (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL, CONSTRAINT product_product_write_uid_fkey FOREIGN KEY (write_uid) REFERENCES res_users (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE SET NULL ) WITH ( OIDS=FALSE );

I have something like 200+ columns, so i have removed them from here....

0
Imagine profil
Abandonează
Imagine profil
john5000
Cel mai bun răspuns

Hi Saghir,

This is highly unusual.  Based on all the info provided it seems the index and/or data has internal corruption (not usual by any means).

Try this:

1. Drop the index and then recreate it. They try your insert again.

2. If still no good, drop the table (export the data first!) and index and re-create it and reload the data.

Some other things you can check:
Are you out of disk space?  That causes all sorts of odd occurences.
Are you actually doing the insert twice by mistake? (doesn't seem like, from what you shown, but still)

Hope that helps.

 

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Trying to extract a pdf file from ir_attachment.dbdatas Rezolvat
attachment postgresql openerp7
Imagine profil
3
ian. 17
11128
How can I know the password of the openerp Postgresql user ? v7
password postgresql openerp7
Imagine profil
Imagine profil
1
mar. 15
10281
Restrict To Return None Value from the SQL Query Rezolvat
postgresql sql openerp7 odooV8
Imagine profil
Imagine profil
Imagine profil
2
dec. 19
7131
How to represent Postgresql interval in Openerp 7 ?
postgresql python2.7 openerp7 postgresql9.3
Imagine profil
0
oct. 18
4110
White/blank screen when loading OpenERP
javascript postgresql python2.7 openerp7
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
5
ian. 18
15897
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now