fix: adjusted width of colums to see full column names, also fixes #21556
This commit is contained in:
parent
5ec5584319
commit
500dff63e7
@ -14,21 +14,21 @@ def execute(filters=None):
|
|||||||
'fieldname': 'new_customers',
|
'fieldname': 'new_customers',
|
||||||
'fieldtype': 'Int',
|
'fieldtype': 'Int',
|
||||||
'default': 0,
|
'default': 0,
|
||||||
'width': 100
|
'width': 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': _('Repeat Customers'),
|
'label': _('Repeat Customers'),
|
||||||
'fieldname': 'repeat_customers',
|
'fieldname': 'repeat_customers',
|
||||||
'fieldtype': 'Int',
|
'fieldtype': 'Int',
|
||||||
'default': 0,
|
'default': 0,
|
||||||
'width': 100
|
'width': 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': _('Total'),
|
'label': _('Total'),
|
||||||
'fieldname': 'total',
|
'fieldname': 'total',
|
||||||
'fieldtype': 'Int',
|
'fieldtype': 'Int',
|
||||||
'default': 0,
|
'default': 0,
|
||||||
'width': 100
|
'width': 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': _('New Customer Revenue'),
|
'label': _('New Customer Revenue'),
|
||||||
@ -52,10 +52,10 @@ def execute(filters=None):
|
|||||||
'width': 150
|
'width': 150
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
if filters.get('view_type') == 'Territory Wise':
|
if filters.get('view_type') == 'Monthly':
|
||||||
return get_data_by_territory(filters, common_columns)
|
|
||||||
else:
|
|
||||||
return get_data_by_time(filters, common_columns)
|
return get_data_by_time(filters, common_columns)
|
||||||
|
else:
|
||||||
|
return get_data_by_territory(filters, common_columns)
|
||||||
|
|
||||||
def get_data_by_time(filters, common_columns):
|
def get_data_by_time(filters, common_columns):
|
||||||
# key yyyy-mm
|
# key yyyy-mm
|
||||||
|
@ -20,31 +20,36 @@ def get_columns():
|
|||||||
"label": _("Territory"),
|
"label": _("Territory"),
|
||||||
"fieldname": "territory",
|
"fieldname": "territory",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"options": "Territory"
|
"options": "Territory",
|
||||||
|
"width": 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": _("Opportunity Amount"),
|
"label": _("Opportunity Amount"),
|
||||||
"fieldname": "opportunity_amount",
|
"fieldname": "opportunity_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"options": currency
|
"options": currency,
|
||||||
|
"width": 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": _("Quotation Amount"),
|
"label": _("Quotation Amount"),
|
||||||
"fieldname": "quotation_amount",
|
"fieldname": "quotation_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"options": currency
|
"options": currency,
|
||||||
|
"width": 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": _("Order Amount"),
|
"label": _("Order Amount"),
|
||||||
"fieldname": "order_amount",
|
"fieldname": "order_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"options": currency
|
"options": currency,
|
||||||
|
"width": 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": _("Billing Amount"),
|
"label": _("Billing Amount"),
|
||||||
"fieldname": "billing_amount",
|
"fieldname": "billing_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"options": currency
|
"options": currency,
|
||||||
|
"width": 150
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -63,7 +68,6 @@ def get_data(filters=None):
|
|||||||
t_opportunity_names = []
|
t_opportunity_names = []
|
||||||
if territory_opportunities:
|
if territory_opportunities:
|
||||||
t_opportunity_names = [t.name for t in territory_opportunities]
|
t_opportunity_names = [t.name for t in territory_opportunities]
|
||||||
|
|
||||||
territory_quotations = []
|
territory_quotations = []
|
||||||
if t_opportunity_names and quotations:
|
if t_opportunity_names and quotations:
|
||||||
territory_quotations = list(filter(lambda x: x.opportunity in t_opportunity_names, quotations))
|
territory_quotations = list(filter(lambda x: x.opportunity in t_opportunity_names, quotations))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user