Skip to content
  • Categories
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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 5.8k Views 1 Watching
  • 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.
  • 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
    • M Offline
      M 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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

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