Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Kov
    • Nábytek
    • Jídlo
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • IT hardware a podpora
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Error creating new record: _id_seq

Odebírat

Get notified when there's activity on this post

This question has been flagged
errorcreatesequence
1 Odpovědět
7713 Zobrazení
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šit
Sudhir Arya (ERP Harbor Consulting Services)

You should post your relevant code.

Avatar
Laura
Autor Nejlepší odpověď

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šit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Error Findings
invoice error create
Avatar
0
lis 23
1935
Can not create an CRM application
crm error create
Avatar
Avatar
1
bře 22
2481
Error creating an invoice
invoice error create
Avatar
Avatar
1
dub 20
4129
[Solved] Error when clicking on create - Odoo 8 Vyřešeno
error create odooV8
Avatar
Avatar
Avatar
2
led 16
4721
Point of sale - Can't send orders
error orders sequence
Avatar
Avatar
Avatar
Avatar
Avatar
4
bře 15
15700
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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