Odoo 中文社区

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

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

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

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

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

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

    为什么tree的editable已经设置为"buttom",却还是依然有弹窗出来?

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

      问题是这样的:
      在询价页面中,采购订单的tab页中的项目有两种添加方式,一种是弹出窗口的方式,一种是直接在行中修改的方式,决定这两种显示方式应该是 <tree string="Purchase Order Lines" editable="bottom"> 中的editable="buttom"


      正常的页面是这样的:
      [检测到链接无效,已移除]
      http://images.cnitblog.com/i/396990/201403/151451559809494.png
      但是在我本地的页面中却还是弹出窗口的方式:
      http://images.cnitblog.com/i/396990/201403/151450037307320.png
      http://images.cnitblog.com/i/396990/201403/151450163087911.png
      而且不能删除editable属性,一旦闪删除就会报错。后来分析可能是由于采购分析模块引发的,看采购分析的代码:
      purchase_anaytic_plans_view.xml:

      &lt;record id=&quot;view_purchase_order_form_editable_list&quot; model=&quot;ir.ui.view&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;name&quot;&gt;purchase.order.form.editable.list&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;model&quot;&gt;purchase.order&lt;/field&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;inherit_id&quot; ref=&quot;purchase.purchase_order_form&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;groups_id&quot; eval=&quot;[(6, 0, [ref(&#039;product.group_uom&#039;), ref(&#039;purchase.group_analytic_accounting&#039;)])]&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;xpath expr=&quot;//field[@name=&#039;order_line&#039;]/tree&quot; position=&quot;attributes&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;attribute name=&quot;editable&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/xpath&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/field&gt;<br />&nbsp; &nbsp; &lt;/record&gt;<br />
      




      stackoverflow上面说,可以通过下面的方式删除editable属性:

      &lt;xpath expr=&quot;//field[@name=&#039;order_line&#039;]/tree&quot; position=&quot;attributes&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;attribute name=&quot;editable&quot;/&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/xpath&gt;
      




      但是我试过了,还是不行,有大神知道是为什么么?

      1 条回复 最后回复 回复 引用 0
      • digitalsatori
        digitalsatori 管理员 最后由 编辑

        kevin提问题和总结问题的文字都超赞,这样的问题没法不回答。
        还是卖个关子,不直接说答案。给个提示:OE V7后支持给不同的用户组(group)指定视图(view)
        具体参见Joshua大神的文章:[font=Verdana][size=78%] http://cn.openerp.cn/view_groups/ [/size][/font]

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

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

          回校长,你给的那个链接看过了。
          我使用下面的代码成功地让它不弹窗了:

          <br />&lt;xpath expr=&quot;//field[@name=&#039;order_line&#039;]/tree&quot; position=&quot;attributes&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;attribute name=&quot;editable&quot;&gt;bottom&lt;/attribute&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/xpath&gt;<br />
          



          但我有个疑问是,为什么添加了采购分析这个模块,要让不同的用户使用不同的编辑方式呢,本例中的弹窗方式和直接修改的方式有什么不一样的地方吗?

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