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. 请大神解释下res_model和src_model这两个属性分别代表什么意思啊???

请大神解释下res_model和src_model这两个属性分别代表什么意思啊???

Scheduled Pinned Locked Moved Odoo 新手求助
6 Posts 4 Posters 8.1k Views 3 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.
  • W Offline
    W Offline
    winbo
    wrote on last edited by
    #1

    <act_window id="purchase_order_allcheck"
    multi="True"
    key2="client_action_multi" name="批量询价单审核"
    res_model="diff.purchase.order" src_model="purchase.order"
    view_mode="form" target="new" view_type="form"/>
    这act里面的res_model和src_model这两个属性分别代表什么意思啊???

    1 Reply Last reply
    0
    • W Offline
      W Offline
      winbo
      wrote on last edited by
      #2

      diff.purchase.order是一个临时表,我想操作的是purchase.order表,我选中了几条purchase.order表的记录,我想批量操作,下拉框有个按钮,点击一下弹出一个对话框,有个批量审核通过,批量审核不通过,取消,三个按钮,该怎么实现啊?

      1 Reply Last reply
      0
      • W Offline
        W Offline
        winbo
        wrote on last edited by
        #3

        已解决。
        通过传值处理,原来传递的context中包含了我要得ids,谢谢

        1 Reply Last reply
        0
        • D Offline
          D Offline
          digitalsatori
          管理员
          wrote on last edited by
          #4

          问题解决了,不过还是解释一下res_model和src_model, 对其他人或许有帮助,

          当一个action所操作的数据对象在操作前后是不同时,就要用到上面的两个参数了。
          src_model对应操作前的数据对象, res_model对应操作后的数据对象

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

          Z 1 Reply Last reply
          3
          • O Offline
            O Offline
            ob
            wrote on last edited by
            #5

            @digitalsatori 在 请大神解释下res_model和src_model这两个属性分别代表什么意思啊??? 中说:

            当一个action所操作的数据对象在操作前后是不同时,就要用到上面的两个参数了。
            src_model对应操作前的数据对象, res_model对应操作后的数据对象

            受教了

            1 Reply Last reply
            0
            • D digitalsatori

              问题解决了,不过还是解释一下res_model和src_model, 对其他人或许有帮助,

              当一个action所操作的数据对象在操作前后是不同时,就要用到上面的两个参数了。
              src_model对应操作前的数据对象, res_model对应操作后的数据对象

              Z Offline
              Z Offline
              zerone40
              wrote on last edited by zerone40
              #6

              @digitalsatori 在 请大神解释下res_model和src_model这两个属性分别代表什么意思啊??? 中说:

              点个赞吧

              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