コンテンツへスキップ
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 do I access sub-components of a list field?

購読

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

この質問にフラグが付けられました
viewsxmlinheritanceextend
2 返信
7641 ビュー
アバター
Jeff Beidler

If you go to the details page for a product and click on the "Procurements" tab, you'll see a list labeled "Suppliers".  Looking at the XML for the page, the only field I can see in this location is "seller_ids".  However, the list also shows "Delivery Lead Time" and "Minimal Quantity".  Are these fields somehow contained within "seller_ids", like an array?  I can't find any other views that add the other fields.  I would like to add "Product Name" and "Product Code" to the list.  I believe all of the fields are in the "product.supplierinfo" model.  How do I go about this?

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

If you check out addons/product/product.py, you'll see that 'seller_ids' is a one2many field pointing to 'product.supplierinfo' from 'product_id'. If you search for product.supplierinfo in addons/product/product_view.xml there are two records that reference it, "product_supplierinfo_form_view" and "product_supplierinfo_tree_view". The first of these is the the one that pops up when you click "Add an item" under suppliers, the second is the table that you are trying to edit. It looks like this:

 

        <record id="product_supplierinfo_tree_view" model="ir.ui.view">

            <field name="name">product.supplierinfo.tree.view</field>

            <field name="model">product.supplierinfo</field>

            <field name="arch" type="xml">

                <tree string="Supplier Information">

                    <field name="sequence" widget="handle"/>

                    <field name="name"/>

                    <field name="delay"/>

                    <field name="min_qty"/>

                    <field name="company_id" groups="base.group_multi_company" widget="selection"/>

                </tree>

            </field>

        </record>

So what you'd have to do here is create a new module, inherit the "product_supplierinfo_tree_view" by using <field name="inherit_id" ref="product.product_supplierinfo_tree_view">, then add your fields using something like:

<record id="product_supplierinfo_tree_view_inherit" model="ir.ui.view">

    <field name="name">product.supplierinfo.tree.view</field>

    <field name="model">product.supplierinfo<field>

    <field name="inherit_id" ref="product.product_supplierinfo_tree_view">

        <field name="name" position="after">

            <field name="product_name"/>

            <field name="product_code"/>

        </field>

Since those columns are already in the 'product.supplierinfo' you don't even need to add any custom python code to your module.

 

Hope that helps! Cheers.

 

----

Alex Gallien

Information Officer LLC

E-mail: agallien@informationofficer.com

Web: www.informationofficer.com

1
アバター
破棄
Jeff Beidler
著作者

Thanks for the detailed answer, Alex! I will try it out as soon as I get a chance. I think I saw that view when I was looking around, but don't remember seeing the other fields. Maybe it was a different one.

Jeff Beidler
著作者

Awesome, it works! I had searched for 'seller_ids' in product_view.xml, but it shows up somewhere else, not in the view to inherit. I didn't understand the connection made from the definition of 'seller_ids' in product.py to the view with the fields. I have a little better understanding of it now, but probably still not a total grasp. Thanks again!

Alex Gallien

No problem. There is a lack of solid information out there on the inner workings of OpenERP - glad to be of use.

Jeff Beidler
著作者

I also tried to override the field label by adding

Jeff Beidler
著作者

Doh! Guess you can't put XML code in comments. :\

Alex Gallien

Try editing your original post and putting the code there.

Jeff Beidler
著作者

I made a new question: https://www.odoo.com/forum/help-1/question/how-do-you-override-a-field-label-in-an-xml-view-62791 It would be nice if there were a code markdown feature for the forum. :)

アバター
Marek Mosiewicz
最善の回答

There is special extension mechanism in Odoo. You can add fields to existing form in new module.

So your fields are added by addon modules.

 

http://consultantodoo.com

0
アバター
破棄
Jeff Beidler
著作者

I knew that much. Can you provide further details as to how to access other fields from product.supplierinfo inside the _seller_ids_ field?

OdooBot
What exactly you want navigate and form which class ? I you can navigate normally by fields even if it ends with _id

2014-09-10 19:18 GMT+02:00 Jeff Beidler <jeffb@videx.com>:

I knew that much. Can you provide further details as to how to access other fields from product.supplierinfo inside the _seller_ids_ field?

--
Jeff Beidler
Sent by OpenERP S.A. using Odoo about Forum Post False

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

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

登録
関連投稿 返信 ビュー 活動
Replace xpath expr with xpath
views xml inheritance xpath
アバター
0
8月 21
4134
Using a Module to Customize Product Tree View
views modules xml inheritance
アバター
アバター
アバター
アバター
5
11月 15
14080
View inheritance hiding a field
views inheritance
アバター
アバター
1
11月 24
2496
Change the Position of field in Xpath 解決済
views inheritance
アバター
アバター
アバター
アバター
アバター
5
7月 24
95591
How to extend a base template for a specific page only, without affecting other pages that use the same base template?
views inheritance
アバター
アバター
1
12月 23
3925
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • 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