Odoo 中文社区

    • 注册
    • 登录
    • 搜索
    • 版块
    • 标签
    • 热门
    • 用户
    • 群组

    Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

    开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

    如果您登录系统碰到问题,请在微信公众号留言:

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

    Odoo 开发与实施交流
    3
    4
    2823
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • W
      webeasymail 最后由 编辑

      “客户”和“用户”是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
      • mrshelly
        mrshelly 最后由 编辑

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

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

        1 条回复 最后回复 回复 引用 0
        • Y
          youring 最后由 编辑

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

          1 条回复 最后回复 回复 引用 0
          • First post
            Last post