コンテンツへスキップ
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 to inherit owl template and qweb in custom module V17.0?

購読

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

この質問にフラグが付けられました
manufacturingowlOWL
3 返信
5550 ビュー
アバター
Alma Mena

hey guys! I have a problem inheriting owl template and an qweb from 'mrp_workorder' module in my custom module... 

this is my code:

import { registry } from "@web/core/registry";

import { MrpDisplayRecord } from "@mrp_workorder/mrp_display/mrp_display_record";

export class MrpDisplayRecordInherited extends MrpDisplayRecord {    

// New Inherit template    

static template = "mrp_workorder.MrpDisplayRecordInherited";

    setup() {       

​// call original setup        

​super.setup();

        // New field        

​const numOt = this.props.production?.data?.num_ot || null;        

​this.numOt = numOt;        

​console.log("numero de ot:", numOt);    

}}

// registry 

registry.category("components").add("mrp_display_record", MrpDisplayRecordInherited);

num_ot is the field I need to add... so it can be shown in the qweb
this is the original one...

< templates xml:space="preserve">    

< t t-name="mrp_workorder.MrpDisplayRecordInherited">    

< t t-call="mrp_workorder.MrpDisplayRecord"/>  

     

  HERE SHOULD GO NEW DIV    

 < /t>   

 < /t>

< /templates> 



but nothing happenss.... 

please guys is someone knows something I will be really grateful for the help!

​

           



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

Try this in your template. This is to inherit the existing template and add your own div.


<t t-name="CUSTOM_MODULE_NAME.MrpDisplayRecordInherited" t-inherit="mrp_workorder.MrpDisplayRecord">
<xpath expr="//div[hasclass('o_finished_product')]/*" position="after">
<div class="CUSTOM_DIV_CLASS">
<span t-esc="num_ot"/></div>
        </xpath>
    </t>

       

           

Hope this helps!

2
アバター
破棄
アバター
BenjaminLe
最善の回答

I’m trying to customize the Optimize SEO page, specifically the website.TitleDescription section.

I found the original template as follows:

<t t-name="website.TitleDescription">
<section>
<div class="row">
<div class="col-lg-6">
<div class="mb-3">
<label for="website_meta_title">
Title <i class="fa fa-question-circle-o" title="The title will take a default value unless you specify one."/>
</label>
<input type="text" t-model="seoContext.title" t-att-disabled="!props.canEditTitle" class="form-control" placeholder="Keep empty to use default value" maxlength="70" size="70" t-ref="autofocus"/>
</div>
<div class="mb-3">
<label for="website_meta_description">
Description <i class="fa fa-question-circle-o" t-att-title="props.previewDescription"/>
</label>
<textarea t-model="seoContext.description" t-att-disabled="!props.canEditDescription" name="website_meta_description" placeholder="Keep empty to use default value" class="form-control"/>
<div t-if="descriptionWarning.length" class="alert alert-warning mt16 mb0 small">
<span t-esc="descriptionWarning"/>
</div>
</div>
<div class="mb-3" t-if='props.canEditUrl'>
<label for="website_seo_name">
Custom Url <i class="fa fa-question-circle-o" t-att-title="props.seoNameHelp" />
</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text seo_name_pre" t-esc="seoNamePre"/>
</div>
<input type="text" class="form-control" t-att-placeholder="props.seoNameDefault"
t-on-input="_updateInputValue" t-att-value="seoContext.seoName"/>
<div class="input-group-append" title="Unalterable unique identifier">
<span class="input-group-text seo_name_post" t-esc="seoNamePost"/>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card-header">Preview</div>
<div class="card mb0 p-0">
<div class="card-body">
<SEOPreview isIndexed="props.isIndexed" title="title" description="description" url="url"/>
</div>
</div>
</div>
</div>
</section>
</t>


I created an inherited template as follows:

<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="custom_Optimize_seo.TitleDescriptionInherit" t-inherit="website.TitleDescription">
<xpath expr="//input[@t-model='seoContext.title']" position="after">
<div class="est_ccs">
<h1>Test</h1>
</div>
</xpath>
</t>
</templates>


And my manifest file looks like this:

'assets': {
'web.assets_frontend': [
# 'theme_vcs/static/src/scss/style.scss',
],
'web.assets_backend': [
# 'website/static/src/components/dialog/seo.xml',
'custom_Optimize_seo/static/src/xml/seo_template.xml',
],
},


However, it’s not working as expected.

Could you please help me check the code?
Thank you very much!

0
アバター
破棄
アバター
Alma Mena
著作者 最善の回答

it helped!!! thankssssssssss 

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

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

登録
関連投稿 返信 ビュー 活動
Custom code: Can clicking on a Task with Subtasks (in Kanban View) open another Kanban with the Subtasks? 解決済
owl OWL
アバター
アバター
アバター
2
7月 25
1915
Alter existing owl app
owl OWL
アバター
アバター
1
3月 24
2259
Odoo owl
owl OWL
アバター
0
10月 22
2456
Patching Owl Service Function
javascript owl OWL
アバター
アバター
アバター
3
10月 23
6324
Error in OWL constructor inherit from stock_barcode module 解決済
inheritance owl OWL odoo17
アバター
アバター
1
1月 25
2419
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • 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