Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Error creating new record: _id_seq

Odoberať

Get notified when there's activity on this post

This question has been flagged
errorcreatesequence
1 Odpoveď
7723 Zobrazenia
Avatar
Laura

Hi,

I'm trying to create a new record of a custom class and when I call the method create(cr, uid, values) I get this error: Programming error: no existe la relación (relation does not exist) «pedidos_web_domicilio_id_seq» LINE 1: SELECT nextval('pedidos_web_domicilio_id_seq')

I have not defined anything related with sequences, and I don't know why I get this error.

Can you help me, please?

Thanks ;)

Here is my class definition:

class pedidos_web_domicilio(osv.osv):
    _name = 'pedidos.web.domicilio'
    _description = "Pedidos Web Domicilio"
    _columns = {
        'name'          : fields.char('Descripción', size=50),
        'company_id'    : fields.many2one('res.company', 'Company'),
        'shop_id'       : fields.many2one('sale.shop', 'Tienda'),
        'cliente_id'    : fields.many2one('res.partner', 'Cliente'),
        'domicilio'     : fields.char('Domicilio', size=128),
        'codigo_postal' : fields.char('Codigo Postal', size=5),
        'poblacion'     : fields.char('Poblacion', size=30),
        'provincia'     : fields.char('Provincia', size=30),
        'pais'          : fields.char('País', size=30),
        'email'         : fields.char('Email', size=240),
        'phone'         : fields.char('Teléfono', size=64),
        'state'         : fields.selection((('P','Pendiente'),('A','Asignado')),'Estado'),
        'lineas'        : fields.one2many('pedidos.web.domicilio.lineas', 'pedido_id', 'Lineas del Pedido'),
        'tipo_entrega'  : fields.selection((('1','Servicio Domicilio'),('2','Recoger en Local')),'Tipo de Entrega')
}

and the function:

def importar_cabecera(self, cr, uid, lista):
    lista_lineas = lista[0].strip('\r\n').split('\r\n')

    cabecera = lista_lineas[0].split('\t')
    lineas_pedido = []
    for i in range(1, len(lista_lineas)):
        linea = lista_lineas[i].split('\t')
        values = { 
              'product_id' : int(linea[0]),
              'cantidad' : float(linea[1]),
              'precio' : float(linea[2]),
              }
        lineas_pedido.append((0,0,values))

    cliente = int(cabecera[0])
    if cliente == 0:
        print 'buscar cliente con 999999999'
        cliente = 1
    values = {                
          'name' : cabecera[2],
          'shop_id' : 1, 
          'company_id' : 1,
          'cliente_id' : cliente,
          'domicilio' : cabecera[5], 
          'codigo_postal' : cabecera[6],
          'poblacion' : cabecera[7],
          'provincia' : cabecera[8], 
          'pais' : cabecera[9],
          'email' : cabecera[11],
          'phone' : cabecera[10], 
          'state' : 'P',
          'lineas' : lineas_pedido,
          'tipo_entrega' : cabecera[12],
              }      
    order_id = super(pedidos_web_domicilio, self).create(cr, uid, values)
    return True

This is the error I get:

`2013-04-04 07:25:53,480 2836 ERROR certezas openerp.sql_db: Programming error: no existe la relación «pedidos_web_domicilio_id_seq» LINE 1: SELECT nextval('pedidos_web_domicilio_id_seq') ^ , in query SELECT nextval('pedidos_web_domicilio_id_seq') 2013-04-04 07:25:53,496 2836 ERROR certezas openerp.sql_db: bad query: SELECT res_users."menu_id",res_users."pos_config",res_users."ean13",res_users."alias_id",res_users."share",res_users."default_section_id",res_users."active",res_users."password",res_users."partner_id",res_users."id",res_users."comercial_ineed",res_users."login_date",res_users."company_id",res_users."signature",res_users."login",res_users."perfil_id",res_users."action_id",res_users."ean13",res_users."company_id",res_users."active",res_users."partner_id",res_users."alias_id",res_users.id FROM "res_users" WHERE res_users.id IN (1) ORDER BY id Traceback (most recent call last): File "C:\Python27\lib\site-packages\openerp-7.0_20130130_000102-py2.7.egg\openerp\sql_db.py", line 227, in execute res = self._obj.execute(query, params) InternalError: transacción abortada, las órdenes serán ignoradas hasta el fin de bloque de transacción

2013-04-04 07:25:53,512 2836 ERROR certezas openerp.sql_db: bad query: SELECT res_users."menu_id",res_users."pos_config",res_users."ean13",res_users."alias_id",res_users."share",res_users."default_section_id",res_users."active",res_users."password",res_users."partner_id",res_users."id",res_users."comercial_ineed",res_users."login_date",res_users."company_id",res_users."signature",res_users."login",res_users."perfil_id",res_users."action_id",res_users."ean13",res_users."company_id",res_users."active",res_users."partner_id",res_users."alias_id",res_users.id FROM "res_users" WHERE res_users.id IN (1) ORDER BY id Traceback (most recent call last): File "C:\Python27\lib\site-packages\openerp-7.0_20130130_000102-py2.7.egg\openerp\sql_db.py", line 227, in execute res = self._obj.execute(query, params) InternalError: transacción abortada, las órdenes serán ignoradas hasta el fin de bloque de transacción

2013-04-04 07:25:53,513 2836 ERROR certezas openerp.netsvc: UserError You cannot perform this operation. New Record Creation is not allowed for this object as this object is for reporting purpose. Traceback (most recent call last): File "C:\Python27\lib\site-packages\openerp-7.0_20130130_000102-py2.7.egg\openerp\netsvc.py", line 289, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "C:\Python27\lib\site-packages\openerp-7.0_20130130_000102-py2.7.egg\openerp\service\web_services.py", line 614, in dispatch res = fn(db, uid, *params) File "C:\Python27\lib\site-packages\openerp-7.0_20130130_000102-py2.7.egg\openerp\osv\osv.py", line 125, in wrapper raise except_osv(inst.name, inst.value) except_osv: ('UserError', 'You cannot perform this operation. New Record Creation is not allowed for this object as this object is for reporting purpose.')`

c:\python27\lib\site-packages\openerp-7.0_20130130_000102-py2.7.egg\openerp\osv\osv.py(125)wrapper() -> raise except_osv(inst.name, inst.value) (Pdb)

0
Avatar
Zrušiť
Sudhir Arya (ERP Harbor Consulting Services)

You should post your relevant code.

Avatar
Laura
Autor Best Answer

Here is my class definition: class pedidos_web_domicilio(osv.osv): _name = 'pedidos.web.domicilio' _description = "Pedidos Web Domicilio" _columns = { 'name' : fields.char('Descripción', size=50), 'company_id' : fields.many2one('res.company', 'Company'), 'shop_id' : fields.many2one('sale.shop', 'Tienda'), 'cliente_id' : fields.many2one('res.partner', 'Cliente'), 'domicilio' : fields.char('Domicilio', size=128), 'codigo_postal' : fields.char('Codigo Postal', size=5), 'poblacion' : fields.char('Poblacion', size=30), 'provincia' : fields.char('Provincia', size=30), 'pais' : fields.char('País', size=30), 'email' : fields.char('Email', size=240), 'phone' : fields.char('Teléfono', size=64), 'state' : fields.selection((('P','Pendiente'),('A','Asignado')),'Estado'), 'lineas' : fields.one2many('pedidos.web.domicilio.lineas', 'pedido_id', 'Lineas del Pedido'), 'tipo_entrega' : fields.selection((('1','Servicio Domicilio'),('2','Recoger en Local')),'Tipo de Entrega') } and the function: def importar_cabecera(self, cr, uid, lista): lista_lineas = lista[0].strip('\r\n').split('\r\n')

    cabecera = lista_lineas[0].split('\t')
    lineas_pedido = []
    for i in range(1, len(lista_lineas)):
        linea = lista_lineas[i].split('\t')
        values = { 
              'product_id' : int(linea[0]),
              'cantidad' : float(linea[1]),
              'precio' : float(linea[2]),
              }
        lineas_pedido.append((0,0,values))

    cliente = int(cabecera[0])
    if cliente == 0:
        print 'buscar cliente con 999999999'
        cliente = 1
    values = {                
          'name' : cabecera[2],
          'shop_id' : 1, 
          'company_id' : 1,
          'cliente_id' : cliente,
          'domicilio' : cabecera[5], 
          'codigo_postal' : cabecera[6],
          'poblacion' : cabecera[7],
          'provincia' : cabecera[8], 
          'pais' : cabecera[9],
          'email' : cabecera[11],
          'phone' : cabecera[10], 
          'state' : 'P',
          'lineas' : lineas_pedido,
          'tipo_entrega' : cabecera[12],
              }      
    order_id = super(pedidos_web_domicilio, self).create(cr, uid, values)
    return True
0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Error Findings
invoice error create
Avatar
0
nov 23
1937
Can not create an CRM application
crm error create
Avatar
Avatar
1
mar 22
2482
Error creating an invoice
invoice error create
Avatar
Avatar
1
apr 20
4132
[Solved] Error when clicking on create - Odoo 8 Solved
error create odooV8
Avatar
Avatar
Avatar
2
jan 16
4724
Point of sale - Can't send orders
error orders sequence
Avatar
Avatar
Avatar
Avatar
Avatar
4
mar 15
15701
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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