This question has been flagged
1 Reply
1076 Views

this my code but not change in view

odoo.define('cust', function (require) {

"use strict";  

    var core = require('web.core'); 

    var AbstractAction =require('web.AbstractAction');

 
    var progressbar = AbstractAction.extend({ _render: function () {
            if (this.$el.hasClass('progress-bar')) { this.$el.css('width',this.field_manager.get_field_value('int')+'%'); }}}); core.action_registry.add('cust', progressbar);})

Avatar
Discard
Best Answer

Hi,

You should try consoling to check if the JS is loaded properly. First of all, put a console in the beginning and inspect to check if the js is loaded. If that works fine, then try consoling inside the condition, to check if the condition is matched. If that also works fine, try consoling the value 'this.field_manager.get_field_value('int')+'%'' and see if you are getting the required value. 

If you check the above and do not reach a solution, please mention the version of odoo you are using.

Regards

Avatar
Discard