wbportfolio 1.56.5__py2.py3-none-any.whl → 1.56.6__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wbportfolio might be problematic. Click here for more details.

@@ -67,9 +67,15 @@ class CompanyModelDisplay(BaseCompanyModelDisplay):
67
67
  list_display = super().get_list_display()
68
68
  list_display.fields = (
69
69
  *list_display.fields[:5],
70
- dp.Field(key="invested_assets_under_management_usd", label="AUM Invested"),
71
- dp.Field(key="asset_under_management", label="AUM"),
72
- dp.Field(key="potential", label="Potential"),
70
+ dp.Field(
71
+ key=None,
72
+ label=_("AUM"),
73
+ children=[
74
+ dp.Field(key="invested_assets_under_management_usd", label="AUM Invested", width=100),
75
+ dp.Field(key="asset_under_management", label="AUM", width=100),
76
+ dp.Field(key="potential", label="Potential", width=100),
77
+ ],
78
+ ),
73
79
  *list_display.fields[5:],
74
80
  )
75
81
  return list_display
@@ -140,9 +146,15 @@ class PersonModelDisplay(BasePersonModelDisplay):
140
146
 
141
147
  list_display.fields = (
142
148
  *list_display.fields[:7],
143
- dp.Field(key="invested_assets_under_management_usd", label="AUM Invested"),
144
- dp.Field(key="asset_under_management", label="AUM"),
145
- dp.Field(key="potential", label="Potential"),
149
+ dp.Field(
150
+ key=None,
151
+ label=_("AUM"),
152
+ children=[
153
+ dp.Field(key="invested_assets_under_management_usd", label="AUM Invested", width=100),
154
+ dp.Field(key="asset_under_management", label="AUM", width=100),
155
+ dp.Field(key="potential", label="Potential", width=100),
156
+ ],
157
+ ),
146
158
  *list_display.fields[7:],
147
159
  )
148
160
  return list_display
@@ -103,22 +103,11 @@ class CompanyPortfolioDataMixin(serializers.ModelSerializer):
103
103
  read_only=True,
104
104
  **_get_assets_under_management_kwargs(field_name="invested_assets_under_management_usd"),
105
105
  )
106
- investment_discretion = serializers.ChoiceField(**_get_investment_discretion_kwargs())
107
- assets_under_management_currency = serializers.PrimaryKeyRelatedField(
108
- required=False,
109
- queryset=Currency.objects.all(),
110
- default=None,
111
- label=CompanyPortfolioData.assets_under_management_currency.field.verbose_name,
112
- )
106
+
113
107
  assets_under_management_currency_repr = serializers.CharField(read_only=True, required=False)
114
- _assets_under_management_currency = CurrencyRepresentationSerializer(source="assets_under_management_currency")
108
+
115
109
  potential = serializers.DecimalField(**_get_potential_kwargs())
116
- potential_currency = serializers.PrimaryKeyRelatedField(
117
- required=False,
118
- queryset=Currency.objects.all(),
119
- label=CompanyPortfolioData.potential_currency.field.verbose_name,
120
- )
121
- _potential_currency = CurrencyRepresentationSerializer(source="potential_currency")
110
+ investment_discretion = serializers.ChoiceField(**_get_investment_discretion_kwargs())
122
111
 
123
112
  # Not sure why read_only_fields does not work...
124
113
  tier = serializers.ChoiceField(
@@ -144,10 +133,6 @@ class CompanyPortfolioDataMixin(serializers.ModelSerializer):
144
133
  "asset_under_management", # TODO: add an s after asset - After removing this field from the base model
145
134
  "assets_under_management_currency_repr",
146
135
  "invested_assets_under_management_usd",
147
- "potential_currency",
148
- "_potential_currency",
149
- "assets_under_management_currency",
150
- "_assets_under_management_currency",
151
136
  "investment_discretion",
152
137
  "potential",
153
138
  "tier",
@@ -156,6 +141,19 @@ class CompanyPortfolioDataMixin(serializers.ModelSerializer):
156
141
 
157
142
  class CompanyModelSerializer(CompanyPortfolioDataMixin, BaseCompanyModelSerializer):
158
143
  SERIALIZER_CLASS_FOR_REMOTE_ADDITIONAL_RESOURCES = BasePersonModelSerializer
144
+ assets_under_management_currency = serializers.PrimaryKeyRelatedField(
145
+ required=False,
146
+ queryset=Currency.objects.all(),
147
+ default=None,
148
+ label=CompanyPortfolioData.assets_under_management_currency.field.verbose_name,
149
+ )
150
+ _assets_under_management_currency = CurrencyRepresentationSerializer(source="assets_under_management_currency")
151
+ potential_currency = serializers.PrimaryKeyRelatedField(
152
+ required=False,
153
+ queryset=Currency.objects.all(),
154
+ label=CompanyPortfolioData.potential_currency.field.verbose_name,
155
+ )
156
+ _potential_currency = CurrencyRepresentationSerializer(source="potential_currency")
159
157
 
160
158
  def update(self, instance, validated_data):
161
159
  validated_data, portfolio_data = get_portfolio_data(validated_data)
@@ -209,6 +207,20 @@ class CompanyModelListSerializer(CompanyPortfolioDataMixin, BaseCompanyModelList
209
207
  class PersonModelSerializer(CompanyPortfolioDataMixin, BasePersonModelSerializer):
210
208
  SERIALIZER_CLASS_FOR_REMOTE_ADDITIONAL_RESOURCES = BasePersonModelSerializer
211
209
 
210
+ assets_under_management_currency = serializers.PrimaryKeyRelatedField(
211
+ required=False,
212
+ queryset=Currency.objects.all(),
213
+ default=None,
214
+ label=CompanyPortfolioData.assets_under_management_currency.field.verbose_name,
215
+ )
216
+ _assets_under_management_currency = CurrencyRepresentationSerializer(source="assets_under_management_currency")
217
+ potential_currency = serializers.PrimaryKeyRelatedField(
218
+ required=False,
219
+ queryset=Currency.objects.all(),
220
+ label=CompanyPortfolioData.potential_currency.field.verbose_name,
221
+ )
222
+ _potential_currency = CurrencyRepresentationSerializer(source="potential_currency")
223
+
212
224
  asset_under_management = serializers.DecimalField(
213
225
  **_get_assets_under_management_kwargs(field_name="assets_under_management"),
214
226
  read_only=True,
@@ -155,6 +155,9 @@ class OrderOrderProposalListModelSerializer(wb_serializers.ModelSerializer):
155
155
  "currency_fx_rate",
156
156
  "price",
157
157
  )
158
+ extra_kwargs = {
159
+ "price": {"required": False},
160
+ }
158
161
  fields = (
159
162
  "id",
160
163
  "shares",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbportfolio
3
- Version: 1.56.5
3
+ Version: 1.56.6
4
4
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
5
5
  License-File: LICENSE
6
6
  Requires-Dist: cryptography==3.4.*
@@ -42,12 +42,12 @@ wbportfolio/contrib/company_portfolio/filters.py,sha256=jLDo3PRhofuqR2EA7G2R2aiA
42
42
  wbportfolio/contrib/company_portfolio/management.py,sha256=CofBifGGGKfA06uWRDWXY_9y7y-PGNRz3VhsVaDeAz8,857
43
43
  wbportfolio/contrib/company_portfolio/models.py,sha256=0YlWZfpBTUy4nCE0FYY6Kqcx3H28-AbeIVXgxcF6hM0,13963
44
44
  wbportfolio/contrib/company_portfolio/scripts.py,sha256=wFfc1L-it0UTaBwNFs8hhGARbJoaNzmnlsXh6KEbslU,2497
45
- wbportfolio/contrib/company_portfolio/serializers.py,sha256=i4lXu79Mkr_b4zOO4iQ73Tl6DucLK7Aj9npaG8ox7js,12067
45
+ wbportfolio/contrib/company_portfolio/serializers.py,sha256=-ewPrtu8Z1WT2iU3MzDm1BfdFa75GJ8JpS2dTw25CY4,12570
46
46
  wbportfolio/contrib/company_portfolio/tasks.py,sha256=nIBTqC36JCakCug7YVt1aBqai5bKDsgZd2HS7Jwpf5U,1384
47
47
  wbportfolio/contrib/company_portfolio/urls.py,sha256=eyq6IpaDPG1oL8-AqPS5nC5BeFewKPA1BN_HI7M3i1c,1118
48
48
  wbportfolio/contrib/company_portfolio/viewsets.py,sha256=o-_D_bEt283xngDbsMwdRQxFyuK7rfSChI8u5dGYyLM,8312
49
49
  wbportfolio/contrib/company_portfolio/configs/__init__.py,sha256=AVH0v-uOJBPRKggz7fO7IpRyVJ1YlQiF-if_cMsOvvM,72
50
- wbportfolio/contrib/company_portfolio/configs/display.py,sha256=wuscS82RDL5uTfXOmpAp_4EyTUyDAgmvUlEHg4ro7_Q,6372
50
+ wbportfolio/contrib/company_portfolio/configs/display.py,sha256=BfQgIltW128ee3-8BdirIxDc6e6jBfDvBdBoAFn2ssA,6768
51
51
  wbportfolio/contrib/company_portfolio/configs/endpoints.py,sha256=QWkxvGOjCyPtB9cIc9hQHcqkeZv_KEvfGue-JgAn2p4,1662
52
52
  wbportfolio/contrib/company_portfolio/configs/previews.py,sha256=pSZTESST-s8yBhKDcnpB_eGjufrp4NYAqlIGxEN8TOM,1395
53
53
  wbportfolio/contrib/company_portfolio/migrations/0001_initial.py,sha256=WAB7FJL4PdMhQAB-k_tZcMZ2SjAOmqHKj86NrzxWbXE,9856
@@ -376,7 +376,7 @@ wbportfolio/serializers/roles.py,sha256=T-9NqTldpvaEMFy-Bib5MB6MeboygEOqcMP61mzz
376
376
  wbportfolio/serializers/signals.py,sha256=hD6R4oFtwhvnsJPteytPKy2JwEelmxrapdfoLSnluaE,7053
377
377
  wbportfolio/serializers/orders/__init__.py,sha256=PKJRksA1pWsh8nVfGASoB0m3LyUzVRnq1m9VPp90J7k,271
378
378
  wbportfolio/serializers/orders/order_proposals.py,sha256=Jxea2-Ze8Id5URv4UV-vTfCQGt11tjR27vRRfCs0gXU,4791
379
- wbportfolio/serializers/orders/orders.py,sha256=7FOjeT-YAACzKjnJ2Ki2ads7wMq2Td8Zy7ot4TvJ8qs,10014
379
+ wbportfolio/serializers/orders/orders.py,sha256=wLAlgRnMzsqsvfz0aCevMpOtK5O9hU9PJFrzz8bbPqE,10091
380
380
  wbportfolio/serializers/transactions/__init__.py,sha256=-7Pan4n7YI3iDvGXff6okzk4ycEURRxp5n_SHCY_g_I,493
381
381
  wbportfolio/serializers/transactions/claim.py,sha256=mEt67F2v8HC6roemDT3S0dD0cZIVl1U9sASbLW3Vpyo,11611
382
382
  wbportfolio/serializers/transactions/dividends.py,sha256=ADXf9cXe8rq55lC_a8vIzViGLmQ-yDXkgR54k2m-N0w,1814
@@ -567,7 +567,7 @@ wbportfolio/viewsets/transactions/claim.py,sha256=Pb1WftoO-w-ZSTbLRhmQubhy7hgd68
567
567
  wbportfolio/viewsets/transactions/fees.py,sha256=WT2bWWfgozz4_rpyTKX7dgBBTXD-gu0nlsd2Nk2Zh1Q,7028
568
568
  wbportfolio/viewsets/transactions/mixins.py,sha256=WipvJoi5hylkpD0y9VATe30WAcwIHUIroVkK10FYw7k,636
569
569
  wbportfolio/viewsets/transactions/trades.py,sha256=xBgOGaJ8aEg-2RxEJ4FDaBs4SGwuLasun3nhpis0WQY,12363
570
- wbportfolio-1.56.5.dist-info/METADATA,sha256=RROv2cPMXS4c5q03yrXpQTM5ncGQRYdjH8PR-i62Hfw,751
571
- wbportfolio-1.56.5.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
572
- wbportfolio-1.56.5.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
573
- wbportfolio-1.56.5.dist-info/RECORD,,
570
+ wbportfolio-1.56.6.dist-info/METADATA,sha256=fQghqDSt3WiAimoU8VXsx1V2vQpbEIAsARN_L3bW39c,751
571
+ wbportfolio-1.56.6.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
572
+ wbportfolio-1.56.6.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
573
+ wbportfolio-1.56.6.dist-info/RECORD,,