Author: peter
Date: Thu Feb 7 12:01:51 2013
New Revision: 1443433
URL: http://svn.apache.org/viewvc?rev=1443433&view=rev
Log:
Preselect product field based on current product environment (#328)
Modified:
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_theme/bhtheme/theme.py
Modified:
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_theme/bhtheme/theme.py
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_theme/bhtheme/theme.py?rev=1443433&r1=1443432&r2=1443433&view=diff
==============================================================================
---
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_theme/bhtheme/theme.py
(original)
+++
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_theme/bhtheme/theme.py
Thu Feb 7 12:01:51 2013
@@ -373,6 +373,11 @@ class QuickCreateTicketDialog(Component)
all_fields = dict([f['name'], f] \
for f in tm._prepare_fields(fakereq, ticket) \
if f['type'] == 'select')
+
+ product_field = all_fields['product'];
+ if product_field and self.env.product:
+ product_field['value'] = self.env.product.prefix
+
data['qct'] = {'fields': [all_fields[k] for k in self.qct_fields
if k in all_fields]}
return template, data, content_type