asset: spalte 'einheit' entfällt, Spalte 'Kurs' hat nun die Einheit
This commit is contained in:
parent
92cd89ef2e
commit
c9a6df2371
5 changed files with 16 additions and 3 deletions
5
asset.py
5
asset.py
|
@ -48,6 +48,10 @@ class Asset(SymbolMixin, ModelSQL, ModelView):
|
|||
], depends=['product_uom', 'product'])
|
||||
symbol = fields.Function(fields.Char(string='UOM', readonly=True),
|
||||
'get_name_symbol', searcher='search_uom_symbol')
|
||||
asset_symbol = fields.Function(fields.Many2One(string='Symbol',
|
||||
readonly=True, model_name='investment.asset'),
|
||||
'get_name_symbol')
|
||||
|
||||
rates = fields.One2Many(string='Rates', field='asset',
|
||||
model_name='investment.rate')
|
||||
rate = fields.Function(fields.Numeric(string='Current Rate',
|
||||
|
@ -278,6 +282,7 @@ class Asset(SymbolMixin, ModelSQL, ModelView):
|
|||
'name': record[1],
|
||||
'product_uom': record[2],
|
||||
'symbol': record[3],
|
||||
'asset_symbol': record[0],
|
||||
}
|
||||
|
||||
for name in names:
|
||||
|
|
|
@ -206,6 +206,10 @@ msgctxt "field:investment.asset,symbol:"
|
|||
msgid "UOM"
|
||||
msgstr "Einheit"
|
||||
|
||||
msgctxt "field:investment.asset,asset_symbol:"
|
||||
msgid "Symbol"
|
||||
msgstr "Symbol"
|
||||
|
||||
msgctxt "field:investment.asset,wkn:"
|
||||
msgid "NSIN"
|
||||
msgstr "WKN"
|
||||
|
|
|
@ -166,6 +166,10 @@ msgctxt "field:investment.asset,symbol:"
|
|||
msgid "UOM"
|
||||
msgstr "UOM"
|
||||
|
||||
msgctxt "field:investment.asset,asset_symbol:"
|
||||
msgid "Symbol"
|
||||
msgstr "Symbol"
|
||||
|
||||
msgctxt "field:investment.asset,wkn:"
|
||||
msgid "NSIN"
|
||||
msgstr "NSIN"
|
||||
|
|
|
@ -87,6 +87,7 @@ class AssetTestCase(ModuleTestCase):
|
|||
company=company,
|
||||
product = product)
|
||||
self.assertEqual(asset.symbol, 'usd/u')
|
||||
self.assertEqual(asset.asset_symbol.symbol, 'usd/u')
|
||||
|
||||
# check ranges
|
||||
Asset.write(*[
|
||||
|
|
|
@ -3,14 +3,13 @@
|
|||
The COPYRIGHT file at the top level of this repository contains the
|
||||
full copyright notices and license terms. -->
|
||||
<tree>
|
||||
<field name="name" expand="2"/>
|
||||
<field name="name" expand="1"/>
|
||||
<field name="change_day1" />
|
||||
<field name="change_month1" />
|
||||
<field name="change_month3" />
|
||||
<field name="change_month6" />
|
||||
<field name="date"/>
|
||||
<field name="rate"/>
|
||||
<field name="symbol"/>
|
||||
<field name="rate" symbol="asset_symbol"/>
|
||||
<field name="isin"/>
|
||||
<field name="wkn" />
|
||||
</tree>
|
||||
|
|
Loading…
Reference in a new issue