Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
3216 Представления

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
апр. 19
3369
4
апр. 18
5382
0
янв. 16
3988
3
нояб. 21
6167
3
дек. 19
6560