Skip to Content
Menu
This question has been flagged
1587 Views

Hello, I had this db and wanted to add some backend assets for new custom buttons. On the manifest file I added:

# 'assets': {
# 'web.assets_backend': [
# '/abs_property_management/static/src/js/buttons.js'
# ],
# 'web.assets_qweb': [
# '/abs_property_management/static/src/js/js_view.js',
# ],
# },

but the js was not loading. When I'd put the xml file into "data/views"  it would load the js but have lime a permanent which wouldn't be gone even if I'd delete the xml file. The error is:

Error to render compiling AST
AttributeError: 'NoneType' object has no attribute 'viewType'
Template: web.assets_backend
Path: /templates/t/t[3]/button
Node: - - -

How can I fix this issue?


xml file:

 

js:

odoo.define("skl_kartice.tree_view_button", function (require){
    "use strict";

    var ajax = require("web.ajax");
    var ListController = require("web.ListController");

    ListController.include({
        renderButtons: function($node) {
            this._super.apply(this, arguments);
            var self = this;
            if (this.$buttons) {
                $(this.$buttons).find(".oe_ispis_kartica").on("click", function() {
                    self.do_action("skl_kartice.action_kartica_report", {
                        additional_context: {},
                    });
                });
            }
        },
    });
});




TO ALL ODOO MODS: this editor isn't showing the xml code

Avatar
Discard
Related Posts Replies Views Activity
0
Feb 22
1114
5
Jun 20
4985
6
Aug 19
8549
1
Apr 16
3641
2
Mar 15
5151