parent
9f02474155
commit
d5e50a5159
|
@ -373,7 +373,7 @@ class module(osv.osv):
|
|||
m.state not in ('uninstalled','uninstallable','to remove')''', (module.name,))
|
||||
res = cr.fetchall()
|
||||
if res:
|
||||
raise orm.except_orm(_('Error'), _('The module you are trying to remove depends on installed modules :\n %s') % '\n'.join(map(lambda x: '\t%s: %s' % (x[0], x[1]), res)))
|
||||
raise orm.except_orm(_('Error'), _('Some installed modules depends on the module you plan to desinstall :\n %s') % '\n'.join(map(lambda x: '\t%s: %s' % (x[0], x[1]), res)))
|
||||
self.write(cr, uid, ids, {'state': 'to remove'})
|
||||
return True
|
||||
|
||||
|
|
|
@ -124,6 +124,12 @@ class boolean(_column):
|
|||
_symbol_set = (_symbol_c, _symbol_f)
|
||||
|
||||
|
||||
class integer_big(_column):
|
||||
_type = 'integer_big'
|
||||
_symbol_c = '%d'
|
||||
_symbol_f = lambda x: int(x or 0)
|
||||
_symbol_set = (_symbol_c, _symbol_f)
|
||||
|
||||
class integer(_column):
|
||||
_type = 'integer'
|
||||
_symbol_c = '%d'
|
||||
|
@ -675,7 +681,7 @@ class related(function):
|
|||
where += " %s.%s %s '%%%s%%' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2])
|
||||
if field_detail[1] in ('date'):
|
||||
where += " %s.%s %s '%s' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2])
|
||||
if field_detail[1] in ['integer', 'long', 'float']:
|
||||
if field_detail[1] in ['integer', 'long', 'float','integer_big']:
|
||||
where += " %s.%s %s '%d' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2])
|
||||
query += where.rstrip('and')
|
||||
cr.execute(query)
|
||||
|
|
|
@ -244,6 +244,7 @@ def get_pg_type(f):
|
|||
type_dict = {
|
||||
fields.boolean: 'bool',
|
||||
fields.integer: 'int4',
|
||||
fields.integer_big: 'int8',
|
||||
fields.text: 'text',
|
||||
fields.date: 'date',
|
||||
fields.time: 'time',
|
||||
|
|
Loading…
Reference in New Issue