reconciliation in GeneralLedgerLine

19 views
Skip to first unread message

Richard PALO

unread,
Mar 29, 2017, 12:20:06 PM3/29/17
to tryto...@googlegroups.com
I prototyped adding display of line.reconciliation.name in General Ledger
reports iff the reconciliation date is '<=' to the end_date of the end_period
(if specified) or of the fiscal year.

This seems to work nicely in the generated report, but for 'correctness' I'd
like to filter the column already in the GeneralLedgerLine output screen instead.

I initially thought to put the fields.Many2One for account.move.reconciliation I
added in a fields.Function and provide a 'getter' function get_reconciliation,
but then I realised that I probably didn't have the context necessary (namely
GeneralLedgerAccountContext) in order to do pick up fiscalyear and end_period.

How could this be done? Is there any way to filter columns as opposed to records?

cheers,
--
Richard PALO

Udo Spallek

unread,
Mar 31, 2017, 5:53:19 AM3/31/17
to tryto...@googlegroups.com
Wed, 29 Mar 2017 18:09:00 +0200
Richard PALO <ric...@netbsd.org>:
>I initially thought to put the fields.Many2One for
>account.move.reconciliation I added in a fields.Function and provide
>a 'getter' function get_reconciliation, but then I realised that I
>probably didn't have the context necessary (namely
>GeneralLedgerAccountContext) in order to do pick up fiscalyear and
>end_period.
>
>How could this be done? Is there any way to filter columns as opposed
>to records?

IIUC, you need a searcher[1] for the function field to use the field as
filter.

Regards Udo Spallek

[1]
http://doc.tryton.org/4.2/trytond/doc/ref/models/fields.html#trytond.model.fields.Function.searcher
--
_____________________________
virtual things
Preisler & Spallek GbR

Windeckstr. 77
81375 München
Tel: +49 (89) 710 481 55
Fax: +49 (89) 710 481 56

in...@virtual-things.biz
http://www.virtual-things.biz
Reply all
Reply to author
Forward
0 new messages