I am trying to add a simple custom module that I made.  Everything seems to 
work fine installing including the form view and model.  For some reason the 
tree search view won't load.  It keeps throwing this error:


Traceback (most recent call last):
  File "/usr/local/openERP/bin/netsvc.py", line 231, in dispatch
    result = LocalService(service_name)(method, 
*params)
  File "/usr/local/openERP/bin/netsvc.py", line 74, in __call__
    return getattr(self, method)(*params)
  File "/usr/local/openERP/bin/service/web_services.py", line 481, in 
execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/local/openERP/bin/osv/osv.py", line 59, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/openERP/bin/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/openERP/bin/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, 
**kw)
  File "/usr/local/openERP/bin/osv/orm.py", line 1092, in fields_view_get
    xarch, xfields = self.__view_look_dom_arch(cr, user, doc, 
view_id, context=context)
  File "/usr/local/openERP/bin/osv/orm.py", line 897, in 
__view_look_dom_arch
    cr.execute('select name, model from ir_ui_view where 
(id=%s or inherit_id=%s) and arch like %s', (view_id, view_id, 
'%%%s%%' % field))
  File "/usr/local/openERP/bin/sql_db.py", line 76, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/local/openERP/bin/sql_db.py", line 118, in execute
    res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: select name, model from ir_ui_view where (id=false or inheri...
                      
                      
        ^
HINT:  No operator matches the given name and argument 
type&#40;s&#41;. You might need to add explicit type casts.</code>

Here is the code from my module:

#############################
#hr_custom_holiday_view.xml
#############################
<xml>
<openerp> 
&nbsp; &nbsp;<data>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;<menuitem> name="Holiday Management" 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parent="hr.menu_hr_root"
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;id="menu_hr_custom_holiday"/>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp;<record>
&nbsp; &nbsp; &nbsp; &nbsp;<field>Holiday Events</field>&nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;<field>hr.custom.holiday</field>
&nbsp; &nbsp; &nbsp; &nbsp;<field>form</field>
&nbsp; &nbsp; &nbsp; &nbsp;<field>form,tree</field>
&nbsp; &nbsp; &nbsp;</record>
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;<menuitem> name="Holiday Events"
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;parent="menu_hr_custom_holiday" 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;id="menu_add_update_holiday_events"
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;action="action_hr_custom_holiday_events"/>&nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;<record>
&nbsp; &nbsp; &nbsp; &nbsp;<field>hr.custom.holiday</field>
&nbsp; &nbsp; &nbsp; &nbsp;<field>hr.custom.holiday</field>
&nbsp; &nbsp; &nbsp; &nbsp;<field>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <form>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<separator>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<field>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<field>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </form>
&nbsp; &nbsp; &nbsp; &nbsp;</field>
&nbsp; &nbsp; &nbsp;</record>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; 
&nbsp; &nbsp;</data>
</openerp>

#####################################
#hr_custom_holiday.py
#####################################
from osv import osv, fields

#default holiday list, update as need be
holiday_list = &#91;&#40;'new_years_eve','New Years Eve'&#41;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&#40;'new_years_day','New Years Day'&#41;,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&#40;'good_friday','Good Friday'&#41;&#93;

class hr_custom_holiday&#40;osv.osv&#41;&#58;
&nbsp; &nbsp; _name = 'hr.custom.holiday'
&nbsp; &nbsp; _columns = &#123;
&nbsp; &nbsp; &nbsp; &nbsp; 'holiday_date' &#58;&nbsp; 
fields.datetime&#40;'Holiday Date', required=True&#41;,
&nbsp; &nbsp; &nbsp; &nbsp; 'holiday_event' &#58; 
fields.selection&#40;holiday_list, 'Holiday Name'&#41;,
&nbsp; &nbsp; &#125;
&nbsp; &nbsp; 
hr_custom_holiday&#40;&#41;

It seems to not be able to find the generic search view for some reason.  Any 
help would be appreciated.




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=32219#32219

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to