Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
我新扩展了制造中的产品模块,在现有的treeview基础上新增了在手总价(即 在手总量*单价)可是这个新增字段不能跟其他原有字段那样可以点击自动排序了。这是怎么回事?新字段是这样定义的:total = fields.Float('在手总价',compute='get_total')更新后,点击treeview的新字段没有反应
computed fields默认不是排序的。加上store=True把该字段存储到数据库中就能排序了。官方文档如下:computed fields are not stored by default, they are computed and returned when requested. Setting store=True will store them in the database and automatically enable searching
你好!看起来您对这段对话很感兴趣,但您还没有一个账号。
厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。
有了你的建议,这篇帖子会更精彩哦 💗