Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

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

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
emailcacheMissingError
3 Réponses
11164 Vues
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
Ignorer
Avatar
Harsh Dhaduk
Meilleure réponse

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
Ignorer
fisher
Auteur

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

Avatar
Ivan
Meilleure réponse

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
Ignorer
fisher
Auteur

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
Auteur Meilleure réponse

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
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Image in Email keep being saved in GMail cache Résolu
server email cache
Avatar
3
oct. 19
4514
The preferred method to setup emails using a custom domain.
email
Avatar
0
nov. 25
115
need more felixiblity and inovation on email marketing tools
email
Avatar
0
nov. 25
214
After editing the Sales Order Confirmation email template, Odoo isn't using it.
email
Avatar
Avatar
1
juil. 25
2016
How to remove "Powered by Odoo" in email in the Enterprise version Résolu
email
Avatar
Avatar
Avatar
Avatar
Avatar
5
nov. 25
19968
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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