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. Odoo 开发与实施交流
  4. 关于报表的页码问题

关于报表的页码问题

Scheduled Pinned Locked Moved Odoo 开发与实施交流
4 Posts 2 Posters 4.7k 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.
  • V Offline
    V Offline
    vincent
    wrote on last edited by
    #1

    这是Companies中定义报表Header和Footer的代码,在Administration->User->Company's Structure->Companies中的。

    这是Footer的代码:

    <!--page bottom-->
    <lines>1.2cm 2.15cm 19.9cm 2.15cm</lines>
    <drawCentredString x="10.5cm" y="1.7cm">[[ company.rml_footer1 ]]</drawCentredString>
    <drawCentredString x="10.5cm" y="1.25cm">[[ company.rml_footer2 ]]</drawCentredString>
    <drawCentredString x="10.5cm" y="0.8cm">Contact : [[ user.name ]] - [color=red]Page: <pageNumber/>[/color]</drawCentredString>
    </pageGraphics>
    </pageTemplate>
    </header>

    其中红色部分是现实页码,当前的格式是 Page:1 Page:2 Page:3 ... ...
    我想把总页码放在当前页的后面,即格式是 Page:[当前页码]/[总页码]

    现在我想知道如果要现实总页码,该用怎么样的代码?我试过用<pageCount/>,但还是显示不出来。
    有人可以帮忙看看嘛。。。

    1 Reply Last reply
    0
    • mrshellyM Offline
      mrshellyM Offline
      mrshelly
      wrote on last edited by
      #2

      addons/base/res/res_company.py
      中的
      _get_header2 中有段代码[code]
      <drawRightString x="19.7cm" y="28.3cm"><pageNumber/> / </drawRightString>
      <drawString x="19.8cm" y="28.3cm"><pageCount/></drawString>

      [/code]看起来应该是 <pageCount/>

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vincent
        wrote on last edited by
        #3

        @shelly
        试过了,什么都没有显示,不知道是不是Bug

        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