Odoo 中文社区

    • 注册
    • 登录
    • 搜索
    • 版块
    • 标签
    • 热门
    • 用户
    • 群组
    1. 主页
    2. Wangliun
    3. 帖子

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

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

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

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

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

    W
    • 资料
    • 关注 0
    • 粉丝 0
    • 主题 1
    • 帖子 3
    • 最佳 0
    • 有争议的 0
    • 群组 0

    Wangliun 发布的帖子

    • RE: web js extend

      @hui 请问在formView.extend中alert('append after---');不执行的原因是什么?

      发布在 Odoo 开发与实施交流
      W
      Wangliun
    • RE: odoo应用商城下载的tree视图扩展web_tree_resize_column,安装后不生效,麻烦朋友们帮忙看看是什么原因
      <odoo>
          <template id="assets_backend" inherit_id="web.assets_backend">
              <xpath expr=".">
                  <script src="/web_tree_resize_column/static/lib/resizableColumns/jQuery.resizableColumns.js"></script>
      
                  <script src="/web_tree_resize_column/static/src/js/backend.js"></script>
              </xpath>
          </template>
      </odoo>
      
      发布在 Odoo 新手求助
      W
      Wangliun
    • odoo应用商城下载的tree视图扩展web_tree_resize_column,安装后不生效,麻烦朋友们帮忙看看是什么原因
      odoo.define('web_tree_resize_column.backend', function (require) {
          "use strict";
          var ListRenderer = require('web.ListRenderer');
      
          ListRenderer.include({
      
              /**
               * @override
               */
              _renderView: function() {
                  // Preserve width of columns
                  var styles = [];
                  this.$el.find('thead th').each(function () {
                      styles.push($(this).attr('style'));
                  });
      
                  var res = this._super.apply(this, arguments);
      
                  // Initialize jQuery plugin
                  this.$el.find('table').resizableColumns();
      
                  // Restore width of columns
                  this.$el.find('thead th').each(function (index, th) {
                      $(th).attr('style', styles[index]);
                  });
      
                  return res;
              },
      
              /**
               * Prevent sorting when the user is resizing a column.
               *
               * @override
               */
              _onSortColumn: function (event) {
                  if ($(event.target).is('.resizer')) {
                      return;
                  }
      
                  this._super.apply(this, arguments);
              },
          });
      });```
      code_text
      
      发布在 Odoo 新手求助
      W
      Wangliun