跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • 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. [bug] Editable List脚本异常

[bug] Editable List脚本异常

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

    浏览器: 版本 30.0.1599.101 m / IE 11.0.9600
    OE版本:runbot里7.0最新版 (http://runbot.openerp.com/),但应该存在于所有7.0以后的版本。

    用户 admin
    密码 admin
    [hr]

    重现条件:
    (任何一个含有inline editing单据都会包含)
    模块 Accounting
    编辑 Customer Invoices 下任何一个draft状态的单据。

    1. 添加一个Invoice Line.
    2. 在必填项中填入任意有效内容。
    3. 将鼠标移动至最后一个可输入的输入框。
    4. 按 Tab。

    异常出现。

    <br />Uncaught TypeError: Cannot read property &#039;id&#039; of null<br / [检测到链接无效,已移除] br />
    



    [s]初步分析和Chrome的版本有关。(调试了一下,和cancel_edition方法有关,可能是浏览器事件机制的问题)
    尚未想到解决办法。[/s]

    修复:

    <br />=== modified file &#039;addons/web/static/src/js/view_form.js&#039;<br />--- addons/web/static/src/js/view_form.js	2013-10-10 09:11:25 +0000<br />+++ addons/web/static/src/js/view_form.js	2013-10-30 03:37:56 +0000<br />@@ -3826,7 +3826,6 @@<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  GroupsType: instance.web.form.One2ManyGroups,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ListType: instance.web.form.One2ManyList<br />&nbsp; &nbsp; &nbsp; &nbsp;  }));<br />-&nbsp; &nbsp; &nbsp; &nbsp; this.on(&#039;edit:before&#039;, this, this.proxy(&#039;_before_edit&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.on(&#039;edit:after&#039;, this, this.proxy(&#039;_after_edit&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.on(&#039;save:before cancel:before&#039;, this, this.proxy(&#039;_before_unedit&#039;));<br /> <br />@@ -3947,11 +3946,11 @@<br />&nbsp; &nbsp; &nbsp; &nbsp;  });<br />&nbsp; &nbsp;  },<br /> <br />-&nbsp; &nbsp; _before_edit: function () {<br />+&nbsp; &nbsp; _after_edit: function () {<br />+&nbsp; &nbsp; &nbsp; &nbsp; // fixbug [检测到链接无效,已移除] move the blurred listener in edit:after<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.__ignore_blur = false;<br />&nbsp; &nbsp; &nbsp; &nbsp;  this.editor.form.on(&#039;blurred&#039;, this, this._on_form_blur);<br />-&nbsp; &nbsp; },<br />-&nbsp; &nbsp; _after_edit: function () {<br />+&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp;  // The form&#039;s blur thing may be jiggered during the edition setup,<br />&nbsp; &nbsp; &nbsp; &nbsp;  // potentially leading to the o2m instasaving the row. Cancel any<br />&nbsp; &nbsp; &nbsp; &nbsp;  // blurring triggered the edition startup here<br /><br />
    



    via https://launchpadlibrarian.net/155367789/openerp-web_bug1182101_one2many_list_cancel_issue.patch

    1 条回复 最后回复
    0
    • C 离线
      C 离线
      ccdos
      写于 最后由 编辑
      #2

      不明觉历

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

        [quote author=ccdos link=topic=14559.msg25138#msg25138 date=1383902560]
        不明觉历
        [/quote]

        😮

        1 条回复 最后回复
        0
        • wjfonhandW 离线
          wjfonhandW 离线
          wjfonhand
          写于 最后由 编辑
          #4

          firefox 17.0.10
          未见异常

          GoodERP -- Odoo China fork

          1 条回复 最后回复
          0

          • 登录

          • 没有帐号? 注册

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