Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Access Error on sending mail

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
messagemailaccessaccess_error
6237 Rodiniai
Portretas
Magen

I have a Send by Mail action like this:

...
return {
            'type': 'ir.actions.act_window',
            'view_type': 'form',
            'view_mode': 'form',
            'res_model': 'mail.compose.message',
            'views': [(compose_form_id, 'form')],
            'view_id': compose_form_id,
            'target': 'new',
            'context': ctx,
        }

But if the user has read only access to the record it shows error:

Sorry, you are not allowed to modify this document. Only users with the following access level are currently allowed to do that:

Server application error {"message":"Odoo Server Error","code":200,"data":{"debug":"Traceback (most recent call last):
  File \"F:\\Software\\eclipse\\odoo\\odoo\\http.py\", line 638, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\http.py\", line 675, in dispatch
    result = self._call_function(**self.params)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\http.py\", line 331, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\service\\model.py\", line 119, in wrapper
    return f(dbname, *args, **kwargs)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\http.py\", line 324, in checked_call
    result = self.endpoint(*a, **kw)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\http.py\", line 933, in __call__
    return self.method(*args, **kw)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\http.py\", line 504, in response_wrap
    response = f(*args, **kw)
  File \"F:\\Software\\eclipse\\odoo\\addons\\web\\controllers\\main.py\", line 885, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File \"F:\\Software\\eclipse\\odoo\\addons\\web\\controllers\\main.py\", line 877, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\api.py\", line 679, in call_kw
    return call_kw_model(method, model, args, kwargs)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\api.py\", line 664, in call_kw_model
    result = method(recs, *args, **kwargs)
  File \"F:\\Software\\eclipse\\odoo\\addons\\mail\\models\\mail_message.py\", line 726, in create
    message = super(Message, self).create(values)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\models.py\", line 3830, in create
    record = self.browse(self._create(old_vals))
  File \"F:\\Software\\eclipse\\odoo\\odoo\\models.py\", line 3999, in _create
    self.check_access_rule('create')
  File \"F:\\Software\\eclipse\\odoo\\addons\\mail\\wizard\\mail_compose_message.py\", line 147, in check_access_rule
    return super(MailComposer, self).check_access_rule(operation)
  File \"F:\\Software\\eclipse\\odoo\\addons\\mail\\models\\mail_message.py\", line 658, in check_access_rule
    DocumentModel.check_mail_message_access(mids.ids, operation)  # ?? mids ?
  File \"F:\\Software\\eclipse\\odoo\\addons\\mail\\models\\mail_thread.py\", line 562, in check_mail_message_access
    DocModel.check_access_rights(check_operation)
  File \"F:\\Software\\eclipse\\odoo\\addons\\muk_dms\\models\\muk_dms_base.py\", line 299, in check_access_rights
    return super(DMSAccessModel, self).check_access_rights(operation, raise_exception)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\models.py\", line 3289, in check_access_rights
    return self.env['ir.model.access'].check(self._name, operation, raise_exception)
  File \"<decorator-gen-4>\", line 2, in check
  File \"F:\\Software\\eclipse\\odoo\\odoo\\tools\\cache.py\", line 87, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File \"F:\\Software\\eclipse\\odoo\\odoo\\addons\\base\\ir\\ir_model.py\", line 940, in check
    raise AccessError(msg % msg_params)
AccessError: (u'Sorry, you are not allowed to modify this document. Only users with the following access level are currently allowed to do that:

I don't need to modify the record but I want to be able to send a mail even if I have readonly access to the record

0
Portretas
Atmesti
Hilar Andikkadavath

any codes before return actions? then please post here. you are probably trying to access a model which is securely restricted to admin only. And also you didn't post the complete log which will define which model. solutions are either you have to add security lines for user's group or try to access as superuser.

Magen
Autorius

The whole function is:

@api.multi

def action_send_mail(self):

self.ensure_one()

attachment = {

'name': ("%s" %self.filename),

'datas': self.get_file_data(),

'datas_fname': self.filename,

'res_model': 'music_audiofile',

'type': 'binary'

}

id = self.env['ir.attachment'].create(attachment)

email_template = self.env.ref('music.email_template_music_audiofile')

old_ids = email_template.attachment_ids.ids

for old_att in self.env['ir.attachment'].browse(old_ids):

old_att.unlink()

email_template.attachment_ids = [(4,id.id)]

ir_model_data = self.env['ir.model.data']

try:

template_id = ir_model_data.get_object_reference('music', 'email_template_music_audiofile')[1]

except ValueError:

template_id = False

try:

compose_form_id = ir_model_data.get_object_reference('mail', 'email_compose_message_wizard_form')[1]

except ValueError:

compose_form_id = False

ctx = dict()

ctx.update({

'default_model': 'music.audiofile',

'default_res_id': self.ids[0],

'default_use_template': bool(template_id),

'default_template_id': template_id,

'default_composition_mode': 'comment',

})

return {

'type': 'ir.actions.act_window',

'view_type': 'form',

'view_mode': 'form',

'res_model': 'mail.compose.message',

'views': [(compose_form_id, 'form')],

'view_id': compose_form_id,

'target': 'new',

'context': ctx,

}

It attaches the binary field (audiofile) and uses message compose wizard to send a mail. The user has READ ONLY access to the model 'music.audiofile' (Admin group has write access and no problem sending the mail) but I don't see why it asks for writing permissions.

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

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

Registracija
Related Posts Replies Rodiniai Veikla
Comment fonctionne la boite de réception de odoo
message mail
Portretas
0
birž. 25
1187
Finding solution: instagram integration with Odoo Live Chat, Discuss Module
message mail
Portretas
Portretas
1
geg. 25
2734
How can odoo show internal message to portal user
message mail
Portretas
0
saus. 21
3072
[9.0]Try to Hide button in widget: mail_thread
message mail
Portretas
0
kov. 19
6141
How to create message with record id link
message mail
Portretas
0
vas. 16
5002
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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