模块名称:base_ordered
Camptocamp出品
下载地址:
安装后默认按时间降序排列:销售订单、采购订单、发货单、入库单、形式发票。
贴一下主要代码:
ordered.pyfrom osv import fields, osvclass purchase_order(osv.osv): _inherit = "purchase.order" _order = 'date_order desc, id desc'purchase_order()class sale_order(osv.osv): _inherit = "sale.order" _order = 'date_order desc, id desc'sale_order()class stock_picking(osv.osv): _inherit = "stock.picking" _order = 'date desc, id desc'stock_picking()class stock_move(osv.osv): _inherit = "stock.move" _order = 'date desc, id desc'stock_move()class account_invoice(osv.osv): _inherit = "account.invoice" _order = 'date_invoice desc, id desc'account_invoice()