I created a module for dayli stock moves(Initial Stock, In, Out, Final Stock) and need filter by today, specific date and range o dates. But this don't show the search in my tree view. What is wrong?(Sorry for my english)
This is my module(stock_picking_extra.py):
class stock_moves(osv.osv):
_name="report.movimientos.stock"
_auto = False
_columns = {
'date': fields.date('Fecha', readonly=True),
'product_id': fields.many2one('product.product','Producto', readonly=True),
'qty_inicial': fields.float('Inicial', readonly=True),
'qty_in': fields.float('In', readonly=True),
'qty_out': fields.float('Out', readonly=True),
'qty_final': fields.float('Final', readonly=True)
}
_order = "date DESC"
def init(self, cr):
tools.sql.drop_view_if_exists(cr,'report_movimientos_stock')
cr.execute("""
CREATE OR REPLACE VIEW report_movimientos_stock AS
SELECT movimientos_stock.id, movimientos_stock.date, movimientos_stock.product_id, movimientos_stock.qty_inicial, movimientos_stock.qty_in, movimientos_stock.qty_out, movimientos_stock.qty_final
FROM movimientos_stock() movimientos_stock(id, date, product_id, qty_inicial, qty_in, qty_out, qty_final);
""")
stock_moves()
My filter (stock_picking_in_view.xml)
movimientos.stock.filter report.movimientos.stock
My tree (stock_picking_in_view.xml)movimientos.stock.tree report.movimientos.stock tree 10
And action
Movimientos Diarios report.movimientos.stock tree {"datetime.strftim('%%Y%%m%%d')":1} tree
↧