コンテンツへスキップ
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
このフォーラムについて
ヘルプ

how does it worked controller in odoo 17

購読

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

この質問にフラグが付けられました
mvcodoo
2 返信
3876 ビュー
アバター
admin

when i perform any action in odoo then in backened which addons file is used and which method and which view code is execute.

  

when i click on new button on project module then in backened which controller is worked , which method is execute.

0
アバター
破棄
アバター
Sujata
最善の回答

Hello,

When you perform an action in Odoo, like clicking the New button in the Project module, Odoo triggers a flow involving the frontend (views) and backend (methods).

Frontend: Views and Actions

When you click the button, Odoo checks the view (form or list) that you're interacting with. In this case, the New button usually opens a form view to create a new project. You can use Developer Mode to inspect the view and understand which action is being triggered.

Backend: Methods and Models

Once the button is clicked, Odoo calls a method in the backend. For example, the New button typically triggers the create method in the project.project model. This method is responsible for creating a new record and can be found in the models file at addons/project/models/project.py.

Controller (If Applicable)

If you're working with frontend-related features, a controller might be involved. Controllers handle web-based actions and are located in the controllers/ folder. However, for basic backend actions like creating a project, controllers are usually not involved.

How to Trace What's Happening
  • Use Developer Mode: You can track which view and action are triggered when performing any task.
  • Check Logs: Odoo logs (e.g., odoo.log) will show which methods are executed, giving you insights into the backend flow.
  • Branching and Conditional Logic: Sometimes, methods in the backend handle multiple conditions depending on user inputs or system state, which you can also trace through developer tools.

----------------------------------------------------------------------------------------------------

It’s understandable that the role of controllers in Odoo's MVC (Model-View-Controller) structure can be confusing, as Odoo doesn't always follow the traditional MVC pattern, especially when it comes to backend operations. Let me clarify this for you.

Odoo's MVC Structure:
  1. Model (M):
    • This represents the data layer in Odoo. It deals with creating, updating, deleting records (like creating projects, adding tasks, etc.). Models are defined in the models folder and interact with the database.
    • Example: The project.project and project.task models manage the logic for creating and manipulating projects and tasks.
  2. View (V):
    • Views in Odoo define how data is presented to the user. They are usually form views, tree views, kanban views, etc., and are defined in XML files. This is how Odoo allows users to interact with models.
    • Example: When you open a project form or task view, you are interacting with Odoo views.
  3. Controller (C):
    • In Odoo, controllers are primarily used for handling web requests, API calls, and frontend operations (e.g., website, eCommerce). Controllers handle HTTP requests and usually reside in the controllers folder.
    • In the backend, when you perform operations like creating projects, adding or deleting tasks, controllers are generally not involved. These actions are managed directly by the models and triggered by views (through actions, buttons, etc.).
    • Controllers are involved when dealing with web requests, such as in the website module or REST API calls, but not for regular backend data manipulation (e.g., project and task management).
How it Works in Your Case (Projects and Tasks in Backend):
  • Creating a project or task in the backend directly interacts with the model (project.project or project.task), which processes the data and stores it in the database.
  • Deleting a task is handled in a similar way by the model's unlink method.
  • No controller is involved because you are not dealing with a web request. Instead, the model handles all the business logic and database operations.
When Are Controllers Used?
  • Frontend Operations: For handling web page interactions or requests from users via the website or portal (e.g., submitting forms on a website).
  • REST API: When exposing API endpoints or custom routes that interact with the Odoo backend.
  • Web Clients: If your app requires custom logic that needs to be triggered via HTTP requests, then you would define a controller.
Example of Odoo Project App Flow:
  • Create Project: You create a project from the form view. The request goes through the view and interacts directly with the project.project model.
  • Add Tasks: When you add tasks, the action is processed directly by the project.task model.
  • Delete Tasks: Deleting tasks uses the model’s unlink method, and no controller is involved unless it's a frontend request.

Let me know, if it helps :)

2
アバター
破棄
アバター
admin
著作者 最善の回答

Hi, Thank you for the reply. I got some inputs. When I studied online about how MVC working in Odoo, I am getting different answers and little bit confused. Specifically about controllers. For example, 

In the back end, I am creating projects, adding tasks and deleting one or two tasks. In this case also controllers not involved ? Please clarify. For example, The models folder is not included any code related controller according to Odoo MVC ? for Project App

0
アバター
破棄
Sujata

Hello, please refer to my answer again. I have added an explanation of how the MVC structure works with reference to your question after the separator.

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

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

登録
関連投稿 返信 ビュー 活動
How does the Controller part of MVC concepts applies to Odoo?
mvc odoo
アバター
アバター
1
10月 15
5170
How Odoo Help Businesses??
odoo
アバター
0
12月 25
166
Odoo Studio Many2one field not appearing in automations
odoo
アバター
アバター
1
12月 25
352
SOC 1 Report
odoo
アバター
アバター
2
11月 25
439
邮箱无法正常使用
odoo
アバター
アバター
1
11月 25
2366
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • 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