跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • 浅色
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • 深色
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

  1. 主页
  2. 版块
  3. Odoo 开发与实施交流
  4. OE7里面如何实现分配的功能

OE7里面如何实现分配的功能

已定时 已固定 已锁定 已移动 Odoo 开发与实施交流
4 帖子 3 发布者 3.3k 浏览 1 关注中
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • W 离线
    W 离线
    webeasymail
    发表于 最后由 编辑
    #1

    “客户”和“用户”是many2one的关系,

    功能是这样的:在客户列表界面,多选客户,然后点击“分配”按钮,弹出一个“用户”列表界面,大约是这个样子
    [attachimg=1]
    图片上是复选框,最好能够是单选框,然后选择一个“用户”记录,点击“确定”执行一个后台代码,将“客户”分配给“用户”。

    不知道弹出的这个界面是如何画的,可以弹出tree,但是按钮不知道如何加到上面:

    <br />&lt;record id=&quot;crm_member_allocation_view&quot; model=&quot;ir.ui.view&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;分配客户&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model&quot;&gt;res.partner&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tree string=&quot;分配客户&quot; version=&quot;7.0&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&nbsp; class=&quot;oe_inline&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tree&gt;<br />			<br />					&lt;button string=&quot;分配&quot; name=&quot;_action_allocation&quot; type=&quot;object&quot; class=&quot;oe_highlight&quot;/&gt;<br />					or<br />					&lt;button string=&quot;取消&quot; class=&quot;oe_link&quot; special=&quot;cancel&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/record&gt;<br />	<br />		<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;act_window id=&quot;action_crm_member_allocation&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; multi=&quot;True&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; key2=&quot;client_action_multi&quot; name=&quot;分配客户&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res_model=&quot;res.partner&quot; src_model=&quot;crm.member&quot;<br />					view_id=&quot;crm_member_allocation_view&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; view_mode=&quot;tree&quot; target=&quot;new&quot; view_type=&quot;tree&quot;/&gt;<br />
    



    上面的代码显示出来的效果如下,没有按钮也也没有单选框:

    [attachimg=2]

    1 条回复 最后回复
    0
    • M 离线
      M 离线
      mrshelly
      发表于 最后由 编辑
      #2

      学会开发就OK了.
      简单地讲, 就是给 object 添加 wizard.
      在 wizard 中,你可以玩很多很high的功能.只是你现在不会, 脚踏实地地一步一步地从基础开发做起. 不要吃快餐.

      想吃快餐, 请购买 OpenERP 开发高级培训服务..

      1 条回复 最后回复
      0
      • Y 离线
        Y 离线
        youring
        发表于 最后由 编辑
        #3

        这个需求/类似批量编辑的功能,可以通过 Mass Edit 模块实现
        http://bazaar.launchpad.net/~serpentcs/server-env-tools/mass_editing_7.0/files/head:/mass_editing/

        1 条回复 最后回复
        0

        你好!看起来您对这段对话很感兴趣,但您还没有一个账号。

        厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。

        有了你的建议,这篇帖子会更精彩哦 💗

        注册 登录
        回复
        • 在新帖中回复
        登录后回复
        • 从旧到新
        • 从新到旧
        • 最多赞同


        • 登录

        • 没有帐号? 注册

        • 登录或注册以进行搜索。
        • 第一个帖子
          最后一个帖子
        0
        • 版块
        • 标签
        • 热门
        • 用户
        • 群组