bugGNU Health - Bugs: bug #40721, Query error when executing...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #40721: Query error when executing appointment report

Submitted by:  Mario Puntin <mariomop>
Submitted on:  Wed 27 Nov 2013 12:08:46 PM UTC  
 
Category: FunctionalitySeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Sebastián Marró <smarro>
Open/Closed: ClosedRelease: 2.3.0
Module: health

Sat 21 Dec 2013 10:41:04 PM UTC, comment #1:

Fixed in changeset 1092:1c03cb2c5c8b with the migration to python-sql

Thanks Mario for reporting the bug

Sebastián Marró <smarro>In charge of this item.
Wed 27 Nov 2013 12:08:46 PM UTC, original submission:

I'm getting the following when running an appoinment report:

ERROR:tryton.common.common:Traceback (most recent call last):
File "/trytond/protocols/jsonrpc.py", line 123, in _marshaled_dispatch
response['result'] = dispatch_method(method, params)
File "/trytond/protocols/jsonrpc.py", line 156, in _dispatch
res = dispatch(*args)
File "/trytond/protocols/dispatcher.py", line 158, in dispatch
result = rpc.result(meth(args, *kwargs))
File "/trytond/model/modelsql.py", line 1095, in search
cursor.execute(query_str, tables_args + qu2)
File "/trytond/backend/postgresql/database.py", line 306, in execute
res = self.cursor.execute(sql, params)
DataError: la sintaxis de entrada no es válida para integer: «2013-11-26»
LINE 1: ...ent_date >= '2013-11-26' AND a.appointment_date < '2013-11-2...

la sintaxis de entrada no es válida para integer: «2013-11-26»
LINE 1: ...ent_date >= '2013-11-26' AND a.appointment_date < '2013-11-2...
^
To solve it I applied this change in health/health.py, line 1734

--- "a.appointment_date < %s + integer '1' "
+++ "a.appointment_date < date %s + integer '1' "

Mario Puntin <mariomop>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by smarro (Updated the item)
  • -unavailable- added by mariomop (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 21 Dec 2013 10:41:04 PM UTCsmarroStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Mon 09 Dec 2013 07:59:29 PM UTCsmarroStatusNone=>In Progress
      Assigned toNone=>smarro
      ReleaseNone=>2.3.0

    Back to the top


    Powered by Savane 3.1-cleanup1