Re: [tryton-dev] reconciliation in GeneralLedgerLine

2017-03-31 Thread 'Udo Spallek' via tryton-dev
Wed, 29 Mar 2017 18:09:00 +0200
Richard PALO :
>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

i...@virtual-things.biz
http://www.virtual-things.biz

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20170331115301.2269500f%40bender.dsl.


pgpca6PKOfn3c.pgp
Description: Digitale Signatur von OpenPGP


[tryton-dev] reconciliation in GeneralLedgerLine

2017-03-29 Thread Richard PALO

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

--
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/05d06957-fc0c-3059-68f0-841198ff6a47%40netbsd.org.