Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Error creating new record: _id_seq

Subscribe

Get notified when there's activity on this post

This question has been flagged
errorcreatesequence
1 Reply
7716 Views
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
Discard
Sudhir Arya (ERP Harbor Consulting Services)

You should post your relevant code.

Avatar
Laura
Author 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
Discard
Enjoying the discussion? Don't just read, join in!

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

Sign up
Related Posts Replies Views Activity
Error Findings
invoice error create
Avatar
0
Nov 23
1936
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
4131
[Solved] Error when clicking on create - Odoo 8 Solved
error create odooV8
Avatar
Avatar
Avatar
2
Jan 16
4723
Point of sale - Can't send orders
error orders sequence
Avatar
Avatar
Avatar
Avatar
Avatar
4
Mar 15
15701
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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