Add biginteger
This commit is contained in:
1 parent
b703356015
commit
61575c88a8
6 files changed
+12
-4
No files matched your search
@@ -559,6 +559,7 @@ TYPES = {
|
||||
'sha': CharField,
|
||||
'float_time': FloatField,
|
||||
'integer' : IntegerField,
|
||||
'biginteger' : IntegerField,
|
||||
'float' : FloatField,
|
||||
'numeric' : NumericField,
|
||||
'many2one' : M2OField,
|
||||
|
||||
@@ -837,6 +837,7 @@ WIDGETS_TYPE = {
|
||||
'float': (Float, 1, False, False),
|
||||
'numeric': (Float, 1, False, False),
|
||||
'integer': (Integer, 1, False, False),
|
||||
'biginteger': (Integer, 1, False, False),
|
||||
'selection': (Selection, 1, False, False),
|
||||
'char': (Char, 1, False, False),
|
||||
'sha': (Sha, 1, False, False),
|
||||
|
||||
@@ -142,6 +142,7 @@ class ParserTree(ParserInterface):
|
||||
col.set_clickable(True)
|
||||
twidth = {
|
||||
'integer': 60,
|
||||
'biginteger': 60,
|
||||
'float': 80,
|
||||
'numeric': 80,
|
||||
'float_time': 80,
|
||||
@@ -169,7 +170,8 @@ class ParserTree(ParserInterface):
|
||||
col.set_visible(not fields[fname].get('tree_invisible', False))
|
||||
i = treeview.append_column(col)
|
||||
if 'sum' in fields[fname] and fields[fname]['type'] \
|
||||
in ('integer', 'float', 'numeric', 'float_time'):
|
||||
in ('integer', 'biginteger', 'float', 'numeric',
|
||||
'float_time'):
|
||||
label = gtk.Label()
|
||||
label.set_use_markup(True)
|
||||
label_str = fields[fname]['sum'] + ': '
|
||||
@@ -248,8 +250,8 @@ class Char(object):
|
||||
cell.set_property('text', text)
|
||||
color = self.get_color(model)
|
||||
cell.set_property('foreground', str(color))
|
||||
if self.attrs['type'] in ('float', 'integer', 'boolean', 'numeric',
|
||||
'float_time'):
|
||||
if self.attrs['type'] in ('float', 'integer', 'biginteger', 'boolean',
|
||||
'numeric', 'float_time'):
|
||||
align = 1
|
||||
else:
|
||||
align = 0
|
||||
@@ -822,6 +824,7 @@ CELLTYPES = {
|
||||
'numeric': Float,
|
||||
'float_time': FloatTime,
|
||||
'integer': Int,
|
||||
'biginteger': Int,
|
||||
'datetime': Datetime,
|
||||
'boolean': Boolean,
|
||||
'text': Char,
|
||||
|
||||
@@ -275,6 +275,7 @@ WIDGETS_TYPE = {
|
||||
'float': (float.Float, 2),
|
||||
'numeric': (float.Float, 2),
|
||||
'integer': (integer.Integer, 2),
|
||||
'biginteger': (integer.Integer, 2),
|
||||
'selection': (selection.Selection, 2),
|
||||
'many2one_selection': (selection.Selection, 2),
|
||||
'char': (char.Char, 2),
|
||||
|
||||
@@ -45,7 +45,8 @@ class Parse(object):
|
||||
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_fixed_height_from_font(1)
|
||||
if field_type in ('float', 'numeric', 'integer', 'float_time'):
|
||||
if field_type in ('float', 'numeric', 'integer',
|
||||
'biginteger', 'float_time'):
|
||||
cell.set_property('xalign', 1.0)
|
||||
column.pack_start(cell, expand=False)
|
||||
column.add_attribute(cell, 'text', self.pos)
|
||||
|
||||
@@ -17,6 +17,7 @@ import mx.DateTime
|
||||
FIELDS_LIST_TYPE = {
|
||||
'boolean': gobject.TYPE_BOOLEAN,
|
||||
'integer': gobject.TYPE_INT,
|
||||
'biginteger': gobject.TYPE_INT,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user