<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[新扩展的字段不能在视图中点击排序]]></title><description><![CDATA[<p dir="auto">我新扩展了制造中的产品模块，在现有的treeview基础上新增了在手总价（即 在手总量*单价）<br />可是这个新增字段不能跟其他原有字段那样可以点击自动排序了。这是怎么回事？<br />新字段是这样定义的：total = fields.Float('在手总价',compute='get_total')<br /><br />更新后，点击treeview的新字段没有反应</p>
]]></description><link>https://odoo.net.cn/topic/3947/新扩展的字段不能在视图中点击排序</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 15:44:07 GMT</lastBuildDate><atom:link href="https://odoo.net.cn/topic/3947.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Nov 2015 05:42:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 新扩展的字段不能在视图中点击排序 on Fri, 20 Nov 2015 16:46:29 GMT]]></title><description><![CDATA[<p dir="auto">computed fields默认不是排序的。加上store=True把该字段存储到数据库中就能排序了。<br /><br />官方文档如下:<br />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</p>
]]></description><link>https://odoo.net.cn/post/21143</link><guid isPermaLink="true">https://odoo.net.cn/post/21143</guid><dc:creator><![CDATA[larjia]]></dc:creator><pubDate>Fri, 20 Nov 2015 16:46:29 GMT</pubDate></item></channel></rss>