Skip to content
  • Categories
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse

Odoo 中文社区

  1. Home
  2. Categories
  3. Python 开发
  4. odoo11页面颜色更改

odoo11页面颜色更改

Scheduled Pinned Locked Moved Python 开发
28 Posts 6 Posters 14.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hui
    replied to cooper on last edited by
    #6

    @cooper 画面的背景颜色不知道你说的是哪个画面的,不过应该可以通过写css达到你的要求的。

    C 1 Reply Last reply
    0
    • C Offline
      C Offline
      cooper
      replied to hui on last edited by
      #7

      @hui 非常感谢,关于画面的颜色问题,您能随便举一个代码的例子么?
      因为是新手,代码不太熟悉。谢谢。

      H 1 Reply Last reply
      0
      • H Offline
        H Offline
        hui
        replied to cooper on last edited by
        #8

        @cooper
        给form视图添加背景颜色,效果如下图。(因为sheet的背景是一张图片所以看不出有背景颜色)
        步骤:
        1、在模块下创建目录static/src/css/re_style.css(css名称随意),代码如下:

        .o_form_view{
            background-color: yellow;
        }
        

        2、在views视图中创建assets.xml,

        <?xml version="1.0" encoding="utf-8"?>
        <odoo>
            <data>
                <template id="assets_backend" name="form widget" inherit_id="web.assets_backend">
                    <xpath expr="." position="inside">
                        <link rel="stylesheet" href="/sps_project/static/src/css/re_style.css"/>
                                       
                    </xpath>
                </template>
            </data>
        </odoo>
        

        3 、更新模块就行了。

        0_1530523535126_form color.png

        C 1 Reply Last reply
        0
        • C Offline
          C Offline
          cooper
          replied to hui on last edited by
          #9

          @hui 太感谢了,帮了我大忙了。:thumbs_up:

          H 1 Reply Last reply
          0
          • H Offline
            H Offline
            hui
            replied to cooper on last edited by
            #10

            @cooper 不客气,正好你问的我会。

            C 1 Reply Last reply
            0
            • C Offline
              C Offline
              cooper
              replied to hui on last edited by
              #11
              This post is deleted!
              1 Reply Last reply
              0
              • digitalsatoriD Offline
                digitalsatoriD Offline
                digitalsatori 管理员
                wrote on last edited by
                #12

                @cooper 可以看看 demo.openerp.cn, 社区版11.0,不一样的主题:grinning_face_with_smiling_eyes:

                【上海先安科技】(tony AT openerp.cn)

                C ieitzybI 3 Replies Last reply
                0
                • C Offline
                  C Offline
                  cooper
                  replied to digitalsatori on last edited by
                  #13
                  This post is deleted!
                  digitalsatoriD 1 Reply Last reply
                  0
                  • 静静静 Offline
                    静静静 Offline
                    静静
                    wrote on last edited by
                    #14

                    0_1530691399247_3D42DAB4-FAE8-4FCC-8620-6130F880266E.png 三级菜单背景色不是太好吧。鼠标悬停也是灰色。

                    digitalsatoriD 1 Reply Last reply
                    0
                    • digitalsatoriD Offline
                      digitalsatoriD Offline
                      digitalsatori 管理员
                      replied to 静静 on last edited by
                      #15

                      @静静 嗯,是不太好看。

                      【上海先安科技】(tony AT openerp.cn)

                      1 Reply Last reply
                      0
                      • digitalsatoriD Offline
                        digitalsatoriD Offline
                        digitalsatori 管理员
                        replied to cooper on last edited by
                        #16

                        @cooper

                        可以创建模块来更改。可以参照这个改:https://apps.odoo.com/apps/themes/10.0/backend_theme_v10/

                        【上海先安科技】(tony AT openerp.cn)

                        1 Reply Last reply
                        0
                        • C Offline
                          C Offline
                          cooper
                          replied to digitalsatori on last edited by
                          #17

                          @digitalsatori 好的,谢谢:smiling_face:

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            ap1689
                            wrote on last edited by
                            #18

                            @cooper 请教可以社区版的浅灰色为主的页面颜色改成类似Office2007那种以浅绿色为主的吗?谢谢!Style Theme Office2007.isl

                            H 1 Reply Last reply
                            0
                            • H Offline
                              H Offline
                              hui
                              replied to ap1689 on last edited by
                              #19

                              @ap1689 我觉得可以。社区版浅灰色的页面颜色是一张背景图片,你可以通过css修改的。你可以试试。

                              C 1 Reply Last reply
                              0
                              • C Offline
                                C Offline
                                cooper
                                replied to hui on last edited by
                                #20

                                @hui 好的,谢谢。

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  ap1689
                                  wrote on last edited by
                                  #21

                                  @hui 你好!我通过在odoo目录及其子目录对*.css进行全文搜索background-color,发现有300多处用到,请指点该从哪些css入手?前端编程我是新手,只想调一调Odoo社区版的主色调,浅灰色太沉了,个人喜欢Office2007那种的主色调,或者分享一下你的调试效果,谢谢!

                                  H 1 Reply Last reply
                                  0
                                  • H Offline
                                    H Offline
                                    hui
                                    replied to ap1689 on last edited by
                                    #22

                                    @ap1689
                                    我只能说前端让我也很崩溃的。
                                    我是在浏览器里面调试的,我截图的是form视图里面的,你看看.o_form_sheet .o_form_sheet_bg这个里面,在odoo的全局搜索这个class就可以找到的。然后你重写css进行覆盖就行了,当然你写好了还要在浏览器里面看效果,看你的css是否生效。

                                    list视图你就自己调试喽。

                                    0_1531275050057_background.png

                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      ap1689
                                      wrote on last edited by
                                      #23

                                      @hui 谢谢你的回复,我试过直接将\odoo\addons\web\static\src\img\form_sheetbg.png修改为想要的浅绿色后,form视图的背景色是可以生效的,但,其他地方(如:菜单栏)等的颜色还是原来的浅灰色,不协调,应该是对应不同的png文件。谢谢你的指点!

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        ap1689
                                        wrote on last edited by
                                        #24

                                        @hui 你好!请教如何调小odoo10的Form View上下(top/bottom)的边距padding或margin呢? 如下图浅绿色部分,谢谢!

                                        ![0_1531556126325_1d9cf408-236d-4f01-963f-2b9405452be5-undefined](正在上传 100%)

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          ap1689
                                          wrote on last edited by
                                          #25

                                          ![替代文字](0_1531556410308_PO.png 图片地址)

                                          H 1 Reply Last reply
                                          0

                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups