Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
3219 Tampilan

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

Avatar
Buang
Penulis Jawaban Terbai

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 ?
Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Apr 19
3377
4
Apr 18
5384
0
Jan 16
3993
3
Nov 21
6172
3
Des 19
6563