OpenERP 订单等按时间排序模块

模块名称:base_ordered

Camptocamp出品

下载地址:

http://apps.openerp.com/addon/6183?filter={%22order_by%22%3A+%22name%22%2C+%22author%22%3A+133}&page=0

安装后默认按时间降序排列:销售订单、采购订单、发货单、入库单、形式发票。

贴一下主要代码:
ordered.py

from osv import fields, osv

class 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()

 

 

posted @ 2012-11-01 10:26  openlog  阅读(312)  评论(0编辑  收藏  举报