Thursday, October 3, 2019¶
‘PaymentOrder’ object has no attribute ‘your_ref’¶
I worked on #3236 (‘PaymentOrder’ object has no attribute ‘your_ref’)
lino_book.projects.cosi_ee. Select organization “Garage
Mergelsberg”, go to the Accounting tab and click on “19 open movements (758.68 €)”.
I added a method
is extended by
lino_xl.lib.sepa.Payable to also show the
lino_xl.lib.sepa.Payable.your_ref field (unless it is empty).
I saw a problem in the demo data which led to the discovery of a bug:
Payment Orders were also suggesting negative payments (e.g. open sales
invoices). The filter condition was not enough. I added a new filter parameter
ExpectedMovements.same_dc and have it used by
lino_xl.lib.finan.SuggestionsByPaymentOrder. I had to change the
signature of the
get_due_movements() function because the new condition
TypeError: get_due_movements() got multiple values for
argument 'dc'. I opened a ticket for this: #3251.
Payment orders weren’t cleared by bank statement in the
fixture. Code change: Whether a payment order generates individual counter
entries (one per partner) no longer depends on
but on whether the journal has a partner or not (whether
is empty or not).
TODO: remove Account.needs_partner and replace all usages to use Account.clearable instead. The two fields are now synonyms. Their difference has indeed always been mysterious…
More issues and observations to meditate:
Consider a creditor for which a payment order has been registered, but that payment order is still pending (not yet cleared by a bank statement). Lino currently shows these creditors as debtors. Lino should know that being negative in certain accounts shouldn’t count for the Debtors and Creditors report.
Some organizations are strictly speaking “creditors”, but we are not used to show them in the list of creditors: e.g. banks and tax offices.
PS: I committed above changes only the next day because the test suites required revision.