コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POS店舗
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 承認
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具専門店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • 醸造所
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ

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

  • CRM
  • e-Commerce
  • 会計
  • 在庫
  • PoS
  • プロジェクト
  • MRP
All apps
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

Access Error on sending mail

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
messagemailaccessaccess_error
6142 ビュー
アバター
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
アバター
破棄
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
著作者

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.

ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
関連投稿 返信 ビュー 活動
Comment fonctionne la boite de réception de odoo
message mail
アバター
0
6月 25
1095
Finding solution: instagram integration with Odoo Live Chat, Discuss Module
message mail
アバター
アバター
1
5月 25
2453
How can odoo show internal message to portal user
message mail
アバター
0
1月 21
2950
[9.0]Try to Hide button in widget: mail_thread
message mail
アバター
0
3月 19
5971
How to create message with record id link
message mail
アバター
0
2月 16
4857
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育プログラム
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة 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(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

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