line: add help, fix form

This commit is contained in:
Frederik Jaeckel 2023-02-21 22:36:20 +01:00
parent f9892379b1
commit 83950fc23a
3 changed files with 16 additions and 0 deletions

View file

@ -112,18 +112,21 @@ class Line(SecondUomMixin, metaclass=PoolMeta):
'on_change_with_diff_percent')
trade_fee = fields.Function(fields.Numeric(string='Fee',
help='Trading fee for the current booking line.',
readonly=True, digits=(16, Eval('currency_digits', 2)),
states = {
'invisible': Eval('feature', '') != 'asset',
}, depends=['currency_digits', 'feature']),
'get_yield_data', searcher='search_trade_fee')
asset_dividend = fields.Function(fields.Numeric(string='Dividend',
help='Dividend received at the current booking line.',
readonly=True, digits=(16, Eval('currency_digits', 2)),
states = {
'invisible': Eval('feature', '') != 'asset',
}, depends=['currency_digits', 'feature']),
'get_yield_data', searcher='search_asset_dividend')
asset_gainloss = fields.Function(fields.Numeric(string='Profit/Loss',
help='Profit or loss on sale on the current booking line.',
readonly=True, digits=(16, Eval('currency_digits', 2)),
states = {
'invisible': Eval('feature', '') != 'asset',