跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • 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

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

Odoo 中文社区

  1. 主页
  2. 版块
  3. Odoo 开发与实施交流
  4. 为什么tree的editable已经设置为"buttom",却还是依然有弹窗出来?

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

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

    问题是这样的:
    在询价页面中,采购订单的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
    • digitalsatoriD 离线
      digitalsatoriD 离线
      digitalsatori 管理员
      写于 最后由 编辑
      #2

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

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

      1 条回复 最后回复
      0
      • KevinKongK 离线
        KevinKongK 离线
        KevinKong
        写于 最后由 编辑
        #3

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

        <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

        • 登录

        • 没有帐号? 注册

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