跳至內容
選單
此問題已被標幟
2 回覆
3210 瀏覽次數

Hello I have the following code :

        <template id="assets_backend" name="app_ca assets" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                 <!-- All links to CSS and JS files should be added in here. -->
                <script
                        type="text/javascript"
                        src="/app_ca/static/src/js/index.js">
                </script>
                <link rel="stylesheet" href="/app_ca/static/src/css/style.css"/>
            </xpath>
        </template>


But get this error:

Could not get content for /app_catalogue_achat/static/src/css/style.css defined in bundle 'web.assets_backend'.


It works when I used the v9, but not on v11 now...


Can you help me please

頭像
捨棄
作者 最佳答案

Thanks forgot to replace in one of my xml view.


But for js i was using this synthax in odoo 9;

odoo.define('app_ca.index'function (require) {
    "use strict";
    var Model = require('web.Model')
    console.log(",ks,fks,fks,kf,k,sfk,sf")
    var purchase_orderline_model = new Model('purchase.order.line')
    // var hist_model = new Model('app.history')
    // var hist_officecentral_model = new Model('app.history.officecentral')
    $(document).on('click'function() {  
        var domElement = $(event.target).val();
        console.log('qdjdijqid'domElement);

        var el = document.querySelector(".o_edition");
        if (el !== null) { 
            console.log('el dans 3eme fucntion js',el)
            var id = $(el).attr('data-id');
            console.log('id dans 3eme fucntion js',id)
            $(el).css({"border": "3px solid black"});
            var id_int = parseInt(id)
        }

        if (el!== false & id !== false & Number.isInteger(id_int)) {
            purchase_orderline_model.call('set_bool_is_clicked',[id]).then(function(result){
                console.log('resdans 3eme fucntion js',result)
            });
           
        }
    });
});



But it didn't load in Odoo 11 something is different please ?
頭像
捨棄
最佳答案

Please check the app folder name in the links against the error message.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
4月 19
3353
4
4月 18
5380
0
1月 16
3984
3
11月 21
6162
3
12月 19
6557