Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

ODOO 8.0 error in ubuntu MissingError One of the documents you are trying to access has been deleted, please try again after refreshing.

Subscriure's

Get notified when there's activity on this post

This question has been flagged
emailcacheMissingError
3 Respostes
11146 Vistes
Avatar
fisher

when use email template to send mail, there is error in ubuntu but no in windows 7 (development)

source code as following

 res = super(kanban_OrderTracking, self).create(vals)

if not is_production_order_available and res.workstation.planners.ids:
            obj_email_template = self.env['email.template']
            email_template = obj_email_template.search([('name', '=', 'no order for new kanban')], limit=1)
            if email_template:
                partner_to = reduce(lambda x, y: str(x) + ',' + str(y), res.workstation.planners.ids)
                email_template.write({'partner_to': partner_to})
                self.env.invalidate_all()
                email_template.send_mail(res.id, force_send=True)

server logs

Traceback (most recent call last):
  File "/data/odoo/openerp/http.py", line 517, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/data/odoo/openerp/http.py", line 538, in dispatch
    result = self._call_function(**self.params)
  File "/data/odoo/openerp/http.py", line 294, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/data/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/data/odoo/openerp/http.py", line 291, in checked_call
    return self.endpoint(*a, **kw)
  File "/data/odoo/openerp/http.py", line 754, in __call__
    return self.method(*args, **kw)
  File "/data/odoo/openerp/http.py", line 387, in response_wrap
    response = f(*args, **kw)
  File "/data/odoo/addons/web/controllers/main.py", line 949, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/data/odoo/addons/web/controllers/main.py", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/data/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/data/odoo/openerp/api.py", line 391, in old_api
    result = new_api(recs, *args, **kwargs)
  File "/data/odoo/openerp/api.py", line 395, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/data/odoo/addons/ssmr_kanban/ssmr_kanban.py", line 73, in write
    obj_ordertracking.create({'workstation': self.id, 'stage': 'wait'})
  File "/data/odoo/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/data/odoo/addons/ssmr_kanban/ssmr_kanban.py", line 678, in create
    email_template.send_mail(res.id, force_send=True)
  File "/data/odoo/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/data/odoo/openerp/api.py", line 507, in new_api
    result = [method(self._model, cr, uid, id, *args, **kwargs) for id in self.ids]
  File "/data/odoo/addons/email_template/email_template.py", line 556, in send_mail
    msg_id = mail_mail.create(cr, uid, values, context=context)
  File "/data/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/data/odoo/addons/fetchmail/fetchmail.py", line 298, in create
    res = super(mail_mail, self).create(cr, uid, values, context=context)
  File "/data/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/data/odoo/addons/mail/mail_mail.py", line 84, in create
    return super(mail_mail, self).create(cr, uid, values, context=context)
  File "/data/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/data/odoo/openerp/api.py", line 332, in old_api
    result = method(recs, *args, **kwargs)
  File "/data/odoo/openerp/models.py", line 3994, in create
    record = self.browse(self._create(old_vals))
  File "/data/odoo/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/data/odoo/openerp/api.py", line 464, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "/data/odoo/openerp/models.py", line 4050, in _create
    record_id = self.pool[table].create(cr, user, tocreate[table], context=context)
  File "/data/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/data/odoo/addons/mail/mail_message.py", line 802, in create
    values['record_name'] = self._get_record_name(cr, uid, values, context=context)
  File "/data/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/data/odoo/addons/mail/mail_message.py", line 772, in _get_record_name
    return self.pool[values['model']].name_get(cr, SUPERUSER_ID, [values['res_id']], context=context)[0][1]
  File "/data/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/data/odoo/openerp/api.py", line 360, in old_api
    result = method(recs, *args, **kwargs)
  File "/data/odoo/openerp/models.py", line 1669, in name_get
    result.append((record.id, convert(record[name])))
  File "/data/odoo/openerp/models.py", line 5486, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/data/odoo/openerp/fields.py", line 764, in __get__
    return record._cache[self]
  File "/data/odoo/openerp/models.py", line 5820, in __getitem__
    return value.get() if isinstance(value, SpecialValue) else value
  File "/data/odoo/openerp/fields.py", line 53, in get
    raise self.exception
MissingError: ('MissingError', u'One of the documents you are trying to access has been deleted, please try again after refreshing.')

0
Avatar
Descartar
Avatar
Harsh Dhaduk
Best Answer

Hi Fisher,

This error generaly comes when id not found like user write, remove or fetch data using not existing id.

Thanks,
Harsh Dhaduk

2
Avatar
Descartar
fisher
Autor

the problem is that the same code runs well in windows 7, but not in ubuntu!

Avatar
Ivan
Best Answer

It has nothing to do with OS, I believe.  Can you check whether you have Email Template whose name is 'no order for new kanban' (exactly like that, with no extra spaces, without the quote).  If you don't, there's the problem.  Because you are searching Email Template using that name.  A better way is to search via XML ID instead of searching by name.

0
Avatar
Descartar
fisher
Autor

the email template is there which is checked by the line if email_template, actually the error is caused byt he send_mail statement.

Avatar
fisher
Autor Best Answer

I failed fixing the problem , but eventually changed to the automated action approach, here attached the working code in the automated action "execute python code" ( it seems in automated action, new API is not supported, so adapted to old API )

obj_email_template = pool.get('email.template')
email_template = obj_email_template.search(cr,uid,[('name', '=', 'no_order_available')], context=context,limit=1)
if email_template:
    email_template = obj_email_template.browse(cr,uid,email_template,context=context)
    email_to = ''
    email_to = reduce(lambda x, y: x + ',' + y.email if (x) else y.email, object.workstation.planners,email_to)
    if email_to:   # use ' instead of " to quote, otherwise there will be no column exist error!
        cr.execute("""UPDATE email_template SET email_to = '%s' where id = %s"""%(email_to, email_template.id))
        email_template.send_mail(object.id, force_send=True)

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

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

Registrar-se
Related Posts Respostes Vistes Activitat
Image in Email keep being saved in GMail cache Solved
server email cache
Avatar
3
d’oct. 19
4501
need more felixiblity and inovation on email marketing tools
email
Avatar
0
de nov. 25
189
After editing the Sales Order Confirmation email template, Odoo isn't using it.
email
Avatar
Avatar
1
de jul. 25
1999
How to remove "Powered by Odoo" in email in the Enterprise version Solved
email
Avatar
Avatar
Avatar
Avatar
Avatar
5
de nov. 25
19950
Email Einstellung "Von" ist die Email vom Postausgansgserver
email
Avatar
0
d’abr. 25
1896
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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