Python 通过单击列名,Odoo库存数量批次id列排序错误
我有一列似乎排序不正确。我无法通过单击列名按序列号排序。它似乎是随机排序的。谈到其他列,如数量、产品、创建日期或产品一切正常,我可以通过单击数量或产品、创建日期列对desc/asc进行排序 我找不到哪里不对劲Python 通过单击列名,Odoo库存数量批次id列排序错误,python,sorting,openerp,Python,Sorting,Openerp,我有一列似乎排序不正确。我无法通过单击列名按序列号排序。它似乎是随机排序的。谈到其他列,如数量、产品、创建日期或产品一切正常,我可以通过单击数量或产品、创建日期列对desc/asc进行排序 我找不到哪里不对劲 <record model="ir.ui.view" id="view_stock_quant_splius_tree"> <field name="name">stock.quant.splius.tree</field> <fi
<record model="ir.ui.view" id="view_stock_quant_splius_tree">
<field name="name">stock.quant.splius.tree</field>
<field name="model">stock.quant</field>
<field eval="1" name="priority"/>
<field name="arch" type="xml">
<tree string="Quants" create="0" delete="0">
<field name="location_id"/>
<field name="product_id"/>
<field name="qty"/>
<field name="product_uom_id" string="Uom"/>
<field name="lot_id"/>
<field name="in_date"/>
</tree>
</field>
</record>
stock.quant.splius.tree
股票数量
如果我知道,你不能对关系字段(o2m、m2o、m2m)进行排序。如果我知道,你不能对关系字段(o2m、m2o、m2m)进行排序。如果我们可以在stock.quant模型上使用order属性,这是可能的。从其他方面看,你必须在树状视图(列表视图)上进行更多的自定义是的,问题在于stock.quant模型核心代码中没有属性顺序。所以我用属性_顺序扩展了模型。非常感谢。如果且仅当我们可以在stock.quant模型上使用order属性时,这是可能的。从其他方面来说,你必须在树视图(列表视图)上进行更多的自定义。是的,问题是stock.quant模型核心代码中没有属性_order。所以我用属性_顺序扩展了模型。非常感谢。