Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_columns(self):
return [Column('began', _('Began'), data_type=datetime.date,
width=100),
Column('ended', _('Ended'), data_type=datetime.date,
width=100, sorted=True),
Column('role.name', _('Role'), data_type=str, width=200),
Column('salary', _('Salary'), data_type=currency)]
def _get_columns(self):
return [Column('group', title=_('Group'), data_type=str, width=100,
sorted=True),
Column('short_description', title=_('Parameter Name'),
data_type=str, expand=True),
AccessorColumn('field_value', title=_('Current Value'),
accessor=self._get_parameter_value,
data_type=str, width=200)]
def get_columns(self):
return [Column('sellable.base_sellable_info.description',
title=_('Description'),
data_type=str, expand=True, searchable=True),
Column('quantity', title=_('Quantity'), data_type=float,
width=90, format_func=format_quantity,
editable=True),
Column('sellable.unit_description', title=_('Unit'),
data_type=str, width=50),
Column('cost', title=_('Cost'), data_type=currency,
editable=True, width=90),
Column('total', title=_('Total'), data_type=currency,
width=100)]
def _get_columns(self):
return [Column('order_number_str', title=_('Number'), sorted=True,
data_type=str, width=100),
Column('open_date', title=_('Date Started'),
data_type=datetime.date, justify=gtk.JUSTIFY_RIGHT),
ForeignKeyColumn(Person, 'name', title=_('Supplier'),
data_type=str,
obj_field='supplier', adapted=True,
searchable=True, width=270),
Column('purchase_total', title=_('Ordered'),
data_type=currency, width=120),
Column('received_total', title=_('Received'),
data_type=currency)]
def _get_items_columns(self):
return [Column('sellable.code', _("Code"), sorted=True,
data_type=str, width=80),
Column('sellable.base_sellable_info.description',
_("Description"), data_type=str, expand=True,
width=200),
Column('quantity', _("Quantity"), data_type=int, width=100),
Column('price', _("Price"), data_type=currency, width=100),
Column('total', _("Total"), data_type=currency, width=100)]
def _get_items_columns(self):
return [Column('sellable.code', _("Code"), sorted=True,
data_type=str, width=80),
Column('sellable.base_sellable_info.description',
_("Description"), data_type=str, expand=True,
width=200),
Column('quantity', _("Quantity"), data_type=int, width=100),
Column('price', _("Price"), data_type=currency, width=100),
Column('total', _("Total"), data_type=currency, width=100)]
def _get_columns(self):
return [Column('code', title=_('Number'), data_type=str, width=90),
Column('base_sellable_info.description',
title=_('Description'),
data_type=str, expand=True, searchable=True),
Column('base_sellable_info.price', title=_('Price'),
data_type=currency, width=90)]
def _get_payments_columns(self):
return [Column('payment_number', "#", data_type=int, width=50),
Column('method.description', _("Method of Payment"),
expand=True, data_type=str, width=200),
Column('due_date', _("Due Date"), sorted=True,
data_type=datetime.date, width=120),
Column('status_str', _("Status"), data_type=str, width=100),
Column('value', _("Value"), data_type=currency, width=100)]
def _get_ordered_columns(self):
return [Column('sellable.base_sellable_info.description',
title=_('Description'),
data_type=str, expand=True, searchable=True),
Column('quantity', title=_('Quantity'), data_type=float,
width=90, format_func=format_quantity,
editable=True),
Column('sellable.unit_description', title=_('Unit'),
data_type=str, width=40),
Column('cost', title=_('Cost'), data_type=currency,
editable=True, width=90),
Column('total', title=_('Total'), data_type=currency,
width=100)]
def _get_columns(self, *args):
return [Column('payment_id', _('Number'), data_type=int, width=100,
format_func=self._get_payment_id, sorted=True),
# XXX Waiting for bug 2214
# format='%03d'),
Column('due_date', _('Due Date'),
data_type=datetime.date, width=120),
Column('description', _('Description'), data_type=str,
expand=True),
ColoredColumn('value', _('Value'), data_type=currency,
color='red', data_func=self._colorize,
width=120)]