コンテンツへスキップ
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 correct a Mistake after updating the Search View Modification (error on web.assets_backend.js:2545)

購読

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

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

While I was trying to modify the default filters of the hr.holidays Dashboard view I made a huge mistake: I forgot I was not in a python file and I typed a # at the begining of 3 lines in order to turn them to comment... :-/

Since then, when I try to display any view of the Leave module, I get the following error message :

Uncaught TypeError: Cannot read property 'context' of undefined
http://109.100.102.64:8069/web/content/903-175f00e/web.assets_backend.js:2545
Retraçage :
TypeError: Cannot read property 'context' of undefined
    at eval_item (http://109.100.102.64:8069/web/content/903-175f00e/web.assets_backend.js:2545:1422)
    at http://109.100.102.64:8069/web/content/903-175f00e/web.assets_backend.js:2545:1311
    at Function._.map._.collect (http://109.100.102.64:8069/web/content/584-83b2d37/web.assets_common.js:13:270)
    at Class.prepare_search_inputs (http://109.100.102.64:8069/web/content/903-175f00e/web.assets_backend.js:2545:1252)
    at Class.start (http://109.100.102.64:8069/web/content/903-175f00e/web.assets_backend.js:2535:397)
    at Array.<anonymous> (http://109.100.102.64:8069/web/content/584-83b2d37/web.assets_common.js:3113:963)
    at Array.<anonymous> (http://109.100.102.64:8069/web/content/584-83b2d37/web.assets_common.js:547:681)
    at fire (http://109.100.102.64:8069/web/content/584-83b2d37/web.assets_common.js:541:299)
    at Object.add [as done] (http://109.100.102.64:8069/web/content/584-83b2d37/web.assets_common.js:542:467)
    at Array.<anonymous> (http://109.100.102.64:8069/web/content/584-83b2d37/web.assets_common.js:547:649)


By chance I kept a copy of the xml code I badly modified (remove the # char below to get the original file) :

 

             <?xml version="1.0"?>
		<search string="Search Leave">
                    <field name="name"/>
                    <filter domain="[('state','in',('confirm','validate1'))]" string="To Approve" name="approve"/>
                    <filter string="Approved Leaves" domain="[('state', '=', 'validate')]" name="validated"/>
                    <separator/>
                    <filter name="active_types" string="Active Types" domain="[('holiday_status_id.active', '=', True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>
                    <separator/>
                    <filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
                    <separator/>
                    #<filter string="My Department Leaves" name="department" domain="[('department_id.manager_id.user_id', '=', uid)]" help="My Department Leaves"/>
                    #<filter name="my_team_leaves" string="My Team Leaves" domain="[('employee_id.parent_id.user_id', '=', uid)]" groups="hr_holidays.group_hr_holidays_manager" help="Leaves of Your Team Member"/>
                    #<separator/>
                    <filter string="To Report in Payslip" name="gray" domain="[('payslip_status', '=', False)]" groups="hr_holidays.group_hr_holidays_manager"/>
                    <separator/>
                    <filter string="To Do" name="todo" domain="[('payslip_status', '=', False), ('holiday_status_id.active', '=', True)]"/>
                    <separator/>
                    <filter name="year" string="Current Year" domain="[('holiday_status_id.active', '=', True)]" help="Active Leaves and Allocations"/>
                    <separator/>
                    <filter string="My Requests" name="my_leaves" domain="[('user_id', '=', uid)]"/>
                    <separator/>
                    <filter name="leaves" string="Leaves" domain="[('type', '=', 'remove')]"/>
                    <filter name="allocations" string="Allocations" domain="[('type', '=', 'add')]"/>
                    <field name="employee_id"/>
                    <field name="department_id"/>
                    <field name="holiday_status_id"/>
                    <group expand="0" string="Group By">
                        <filter name="group_name" string="Description" context="{'group_by':'name'}"/>
                        <filter name="group_employee" string="Employee" context="{'group_by':'employee_id'}"/>
                        <filter name="group_category" string="Category" context="{'group_by':'category_id'}"/>
                        <filter string="Manager" context="{'group_by':'manager_id'}"/>
                        <filter name="group_type" string="Type" context="{'group_by':'holiday_status_id'}"/>
                        <separator/>
                        <filter name="group_date_from" string="Start Month" context="{'group_by':'date_from'}"/>
                    </group>
                </search>


I tried to identify this file in the odoo addons folder and I found that in the file addons/hr.holidays/views/hr_holidays_views.xml I could find this exact code without the # char.

I also made a complete search in the files of the addons folder to lookup for the "#<filter" string but I couldn't find any occurence.

For your information, I also use the following addons :

  • hr_holiday_exclude_special_days

  • hr_holidays_notify_employee_manager

  • hr_holidays_settings

Could you please help me correcting my mistake and make the Leave module work again ?

 
0
アバター
破棄
アバター
Yenthe Van Ginneken (Mainframe Monkey)
最善の回答

Hi Slim, 


It looks like those comments that you've made have been updated in the database, which means your errors are now in the database. It's rather easy to fix though. First remove all comments (#) in the XML if you still have them. Afterwards stop your service and update the module. This will trigger all XML records to be updated, removing the comments in the database too. You can do this with the - u command to update the module or modules that you've edited like this:

./odoo-bin -u module1,module2 -c /etc/odoo-server.conf

Regards, 

Yenthe

1
アバター
破棄
Yenthe Van Ginneken (Mainframe Monkey)

P.s: you should be good by starting, stopping, updating the modules list and then updating the module from the frontend too if you can't figure out the commands.

アバター
Slim
著作者 最善の回答

Thanks a lot Yenthe for your help and explanations !

You were right ! Since my xml file was OK (without the #), I just updated the extension and everything went back to normal ! Next time I'll make a backup of the VM before making such changes !

For newbies like me, here is the exact procedure to update the extension :

  • Log in

  • Go to the "Applications" module

  • Look up for the Leave Management App in the list.

  • Click on the "Update" button (it shloud be replacing the "Installed" button.

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

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

登録
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • 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