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

W

Wangliun

@Wangliun
关于
帖子
3
主题
1
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • web js extend
    W Wangliun

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


  • odoo应用商城下载的tree视图扩展web_tree_resize_column,安装后不生效,麻烦朋友们帮忙看看是什么原因
    W Wangliun
    <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应用商城下载的tree视图扩展web_tree_resize_column,安装后不生效,麻烦朋友们帮忙看看是什么原因
    W Wangliun
    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
    
  • 登录

  • 没有帐号? 注册

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