From 85413d277123f7de70aefcc8cdc8743c450e46a5 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 21 Jan 2009 02:45:50 +0100 Subject: [PATCH] [FIX] point_of_sale - Change the type of the date_create to text lp bug: https://launchpad.net/bugs/319335 fixed bzr revid: stephane@tinyerp.com-20090121014550-0p2110kjwa6d87ch --- addons/point_of_sale/pos.py | 6 ++++-- addons/point_of_sale/pos_view.xml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index ce92ee977b2..772e34dbc59 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -25,6 +25,7 @@ import netsvc from osv import fields, osv from mx import DateTime from tools.translate import _ +import tools class pos_config_journal(osv.osv): @@ -915,7 +916,7 @@ class report_transaction_pos(osv.osv): _description = "transaction for the pos" _auto = False _columns = { - 'date_create': fields.date('Date', readonly=True), + 'date_create': fields.char('Date', size=16, readonly=True), 'journal_id': fields.many2one('account.journal', 'Journal', readonly=True), 'user_id': fields.many2one('res.users', 'User', readonly=True), 'no_trans': fields.float('Number of transaction', readonly=True), @@ -924,6 +925,7 @@ class report_transaction_pos(osv.osv): } def init(self, cr): + tools.drop_view_if_exists(cr, 'report_transaction_pos') cr.execute(""" create or replace view report_transaction_pos as ( select @@ -931,7 +933,7 @@ class report_transaction_pos(osv.osv): count(pp.id) as no_trans, sum(amount) as amount, pp.journal_id, - date_trunc('day',pp.create_date)::date as date_create, + date_trunc('day',pp.create_date)::text as date_create, ps.user_id, ps.invoice_id from diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index 68eb8ebf3ed..f4db90912a8 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -255,7 +255,7 @@
- + @@ -270,7 +270,7 @@ tree - +