Navigation

    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账号

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

    如何修改many2many Tags的颜色

    Odoo 开发与实施交流
    2
    4
    2256
    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.
    • A
      alanljj last edited by

      看到有人修改了标签的颜色

      [img http://www.geekerconsulting.com.cn/pic/colored-tags.jpg /img]

      有哪位大侠知道是怎么修改的吗?有addon?还是修改css?

      1 Reply Last reply Reply Quote 0
      • Joshua
        Joshua 管理员 last edited by

        这个颜色可以通过你的标签对象的color字段来指定,如果你的标签字段里面没有这个color,你可以自己定义一个。
        相关源码:

        <br /><br />&lt;t t-name=&quot;FieldMany2ManyTag&quot;&gt;<br />&nbsp; &nbsp; &lt;t t-foreach=&quot;elements&quot; t-as=&quot;el&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;span t-attf-class=&quot;badge dropdown #{&#039;o_tag_color_&#039; + (el&#91;&#039;color&#039;] || 0)}&quot; t-att-data-color=&quot;(el&#91;&#039;color&#039;] || 0)&quot; t-att-data-index=&quot;el_index&quot; t-att-data-id=&quot;el&#91;&#039;id&#039;]&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;t t-esc=&quot;el&#91;&#039;display_name&#039;]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span t-if=&quot;!readonly&quot; class=&quot;fa fa-times o_delete&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/span&gt;<br />&nbsp; &nbsp; &lt;/t&gt;<br />&lt;/t&gt;
        
        1 Reply Last reply Reply Quote 0
        • A
          alanljj last edited by

          谢谢回复,这段代码是用在kanban视图的吗?
          如果要在res.partner的form和tree里显示,该如何修改?

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