Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

    开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

    如果您登录系统碰到问题,请在微信公众号留言:

    关于 statusbar_colors 的问题

    Odoo 开发与实施交流
    2
    5
    4244
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dwz35296 last edited by

      现在,在windows的绿色版,以及linux的git安装版中 statusbar_colors这个属性是否已经失效了?
      以下代码已经在view中设置了statusbar_colors属性,但是结果在浏览器中并不生效

      1 Reply Last reply Reply Quote 0
      • C
        ccdos last edited by

        浏览了一下 代码

        8。0 里面 确实 没有了对 statusbar_colors 属性的处理

        7.0 的代码:

        &nbsp; &nbsp; render_value: function() {<br />&nbsp; &nbsp; &nbsp; &nbsp; var self = this;<br />&nbsp; &nbsp; &nbsp; &nbsp; var content = QWeb.render(&quot;FieldStatus.content&quot;, {widget: self});<br />&nbsp; &nbsp; &nbsp; &nbsp; self.$el.html(content);<br />&nbsp; &nbsp; &nbsp; &nbsp; var colors = JSON.parse((self.node.attrs || {}).statusbar_colors || &quot;{}&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; var color = colors[self.get(&#039;value&#039;)];<br />&nbsp; &nbsp; &nbsp; &nbsp; if (color) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self.$(&quot;oe_active&quot;).css(&quot;color&quot;, color);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; },<br />&nbsp; &nbsp; 
        


           
           
           
        8.0 的对应代码
           

        &nbsp; &nbsp; render_value: function() {<br />&nbsp; &nbsp; &nbsp; &nbsp; var self = this;<br />&nbsp; &nbsp; &nbsp; &nbsp; var content = QWeb.render(&quot;FieldStatus.content&quot;, {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;widget&#039;: self, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;value_folded&#039;: _.find(self.selection.folded, function(i){return i[0] === self.get(&#039;value&#039;);})<br />&nbsp; &nbsp; &nbsp; &nbsp; });<br />&nbsp; &nbsp; &nbsp; &nbsp; self.$el.html(content);<br />&nbsp; &nbsp; },&nbsp; &nbsp; 
        
        1 Reply Last reply Reply Quote 0
        • D
          dwz35296 last edited by

          难怪我搞了半天,都不显示颜色啦。 😢
          不知道能不能重新打开这个功能?
          把7.0的代码拷贝到8.0会出现错误

          1 Reply Last reply Reply Quote 0
          • C
            ccdos last edited by

            我尝试了, 没出错, 但是 也没效果。

            估计 还要修改一下 css

            1 Reply Last reply Reply Quote 0
            • First post
              Last post