← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 675888] Re: email_template : ProgrammingError: syntax error at or near "desc"

 

** Description changed:

  * Tools > Configuration > Email Templates
-   New > Select "Mailgateway Message" as Resource > Click on "Priview Templates"
-   Following error appears:
+   New > Select "Mailgateway Message" as Resource > Click on "Priview Templates"
+   Following error appears:
  
- Environment Information : 
+ Environment Information :
  System : Linux-2.6.32-21-generic-i686-with-Ubuntu-10.04-lucid
  OS Name : posix
  Distributor ID:	Ubuntu
  Description:	Ubuntu 10.04 LTS
  Release:	10.04
  Codename:	lucid
  Operating System Release : 2.6.32-21-generic
  Operating System Version : #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010
  Operating System Architecture : 32bit
  Operating System Locale : en_IN.ISO8859-1
  Python Version : 2.6.5
  OpenERP-Client Version : 6.0.0-rc1-1
  Last revision No. & ID :1689 nch@xxxxxxxxxxx-20101116060354-f4gxs3wdu6ue9l9r
  Traceback (most recent call last):
-   File "/home/tiny/workspace/trunk/server/bin/netsvc.py", line 489, in dispatch
-     result = ExportService.getService(service_name).dispatch(method, auth, params)
-   File "/home/tiny/workspace/trunk/server/bin/service/web_services.py", line 586, in dispatch
-     res = fn(db, uid, *params)
-   File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 57, in wrapper
-     return f(self, dbname, *args, **kwargs)
-   File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 140, in execute
-     res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
-   File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 130, in execute_cr
-     return getattr(object, method)(cr, uid, *args, **kw)
-   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1734, in fields_view_get
-     xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=context)
-   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1439, in __view_look_dom_arch
-     fields = self.fields_get(cr, user, fields_def.keys(), context)
-   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1252, in fields_get
-     user, context)
-   File "/home/tiny/workspace/trunk/addons/email_template/email_template.py", line 734, in _get_model_recs
-     ref_obj_ids = model_obj.search(cr, uid, [], 0, 20, 'id desc', context=context)
-   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1834, in search
-     return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
-   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 4058, in _search
-     cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
-   File "/home/tiny/workspace/trunk/server/bin/sql_db.py", line 75, in wrapper
-     return f(self, *args, **kwargs)
-   File "/home/tiny/workspace/trunk/server/bin/sql_db.py", line 122, in execute
-     res = self._obj.execute(query, params)
+   File "/home/tiny/workspace/trunk/server/bin/netsvc.py", line 489, in dispatch
+     result = ExportService.getService(service_name).dispatch(method, auth, params)
+   File "/home/tiny/workspace/trunk/server/bin/service/web_services.py", line 586, in dispatch
+     res = fn(db, uid, *params)
+   File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 57, in wrapper
+     return f(self, dbname, *args, **kwargs)
+   File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 140, in execute
+     res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
+   File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 130, in execute_cr
+     return getattr(object, method)(cr, uid, *args, **kw)
+   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1734, in fields_view_get
+     xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=context)
+   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1439, in __view_look_dom_arch
+     fields = self.fields_get(cr, user, fields_def.keys(), context)
+   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1252, in fields_get
+     user, context)
+   File "/home/tiny/workspace/trunk/addons/email_template/email_template.py", line 734, in _get_model_recs
+     ref_obj_ids = model_obj.search(cr, uid, [], 0, 20, 'id desc', context=context)
+   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1834, in search
+     return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
+   File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 4058, in _search
+     cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
+   File "/home/tiny/workspace/trunk/server/bin/sql_db.py", line 75, in wrapper
+     return f(self, *args, **kwargs)
+   File "/home/tiny/workspace/trunk/server/bin/sql_db.py", line 122, in execute
+     res = self._obj.execute(query, params)
  ProgrammingError: syntax error at or near "desc"
  LINE 1: ...sage".id FROM "mailgate_message" ORDER BY id desc desc  limi...
+ 
+ This Above Error traceback will occur in some resources only (Mailgateway Message, Invoices Statistics etc.)
+ Some resource like Fields, Bank, etc will not face the above traceback by clicking preview button. 
+ 
+ Thanks.

-- 
email_template : ProgrammingError: syntax error at or near "desc"
https://bugs.launchpad.net/bugs/675888
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: In Progress

Bug description:
* Tools > Configuration > Email Templates
  New > Select "Mailgateway Message" as Resource > Click on "Priview Templates"
  Following error appears:

Environment Information :
System : Linux-2.6.32-21-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04 LTS
Release:	10.04
Codename:	lucid
Operating System Release : 2.6.32-21-generic
Operating System Version : #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_IN.ISO8859-1
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :1689 nch@xxxxxxxxxxx-20101116060354-f4gxs3wdu6ue9l9r
Traceback (most recent call last):
  File "/home/tiny/workspace/trunk/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/tiny/workspace/trunk/server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/tiny/workspace/trunk/server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1734, in fields_view_get
    xarch, xfields = self.__view_look_dom_arch(cr, user, result['arch'], view_id, context=context)
  File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1439, in __view_look_dom_arch
    fields = self.fields_get(cr, user, fields_def.keys(), context)
  File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1252, in fields_get
    user, context)
  File "/home/tiny/workspace/trunk/addons/email_template/email_template.py", line 734, in _get_model_recs
    ref_obj_ids = model_obj.search(cr, uid, [], 0, 20, 'id desc', context=context)
  File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 1834, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/tiny/workspace/trunk/server/bin/osv/orm.py", line 4058, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/home/tiny/workspace/trunk/server/bin/sql_db.py", line 75, in wrapper
    return f(self, *args, **kwargs)
  File "/home/tiny/workspace/trunk/server/bin/sql_db.py", line 122, in execute
    res = self._obj.execute(query, params)
ProgrammingError: syntax error at or near "desc"
LINE 1: ...sage".id FROM "mailgate_message" ORDER BY id desc desc  limi...

This Above Error traceback will occur in some resources only (Mailgateway Message, Invoices Statistics etc.)
Some resource like Fields, Bank, etc will not face the above traceback by clicking preview button. 

Thanks.





References