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 开发与实施交流
8 Posts 3 Posters 10.1k 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.
  • C
    C
    chengwenge
    wrote on last edited by
    #1

    我需要实现有明细,然后最后一行是合计,在OpenERP上面如何实现?
    我当前是用视图,但是合计不知道如何实现?

    按我们原来做系统的办法,是通过union来实现,但是通过OpenERP不知道是否可以在查询的时候拼SQL,给个现成的addon例子就好了。

    1 Reply Last reply
    0
    • C
      C
      chengwenge
      wrote on last edited by
      #2

      通过研究,重载 search可以实现

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

        search 实现合计???

        按道理 来讲, search 应该只实现了 合并....

        合计, 你应该要添加虚拟字段, 采用代码来实现合计吧?

        1 Reply Last reply
        0
        • C
          C
          chengwenge
          wrote on last edited by
          #4

          还在研究,其实就是union一下,出来一条合计记录数据。
          在sql执行数据都是可以的,但是在OE执行合计记录没有出来,还要跟踪。

          1 Reply Last reply
          0
          • N
            N
            NewZN
            wrote on last edited by
            #5

            字段的合计,视图中字段定义上在sum,示例:<field name="jine" sum="合计" />
            更复杂的合计,添加数据库View 类型的Report,示例参看CRM的case Report。

            1 Reply Last reply
            0
            • C
              C
              chengwenge
              wrote on last edited by
              #6

              我需要的横向的合计,不是增加列。

              xxxx xxxx xxxx
              xxxx xxxx xxxx
              合计 ssss ssss

              1 Reply Last reply
              0
              • C
                C
                chengwenge
                wrote on last edited by
                #7

                已经实现。
                通过重载 search函数,动态建立view来实现。
                最好的办法应该是通过临时表,但是OE好像在读取数据的时候,需要拿 id到数据库里面匹配,匹配不到的就不能显示。

                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