How to assign bank statement lines to customer invoices?

Hello everybody, and happy easter!

I could manage to import SEPA bank statements now. Nice.

But now I need to find how I can assign incoming payments to outgoing invoices, in order to flag the latter as “paid”. How can I achieve this?

As always when asking a question from my “basics” series, I’ll publish the results for the whole process at Tryton Community HOWTOS, so other people can easily find and improve them.

Thanks lot in advace, Wolf

Sounds like Reconciliation is what you are looking for.

Thank you for your hint. In my test environment, which has a number of not-yet-paid invoices and imported bank statements, I ran the reconcile wizard - but it stopped without any result.

menu > financial > payments > open payment lines
I find a reconcile wizard as well, but this only offers write-off methods.

So I think this is not what I’m looking for, or did I miss the essential ?

Thanks a lot in advance, Wolf

I’m not using sepa yet, so the exact process may vary, but for manual statements I have two possibilities:

  • lines that correspond to one invoice are attributed to that invoice in the statement form, which marks the invoice as paid
  • lines that correspond to multiple invoices need the next step

When I confirm a statement for which some lines are not attributed to an invoice, I have a «Reconcile» button there to start the reconciliation process for that statement. This process tries to find a corresponding combination for each line of the statement, and marks the confirmed invoices as paid.

1 Like

It will be great if you could write that in a usage section of Account Statement Module — Tryton module with account statements

part of it is already in the design section (reconcile wizard), it’s just a bit cryptic because it doesn’t clearly state what the end result is (invoices marked as paid).

But there is no mention of the possibility to directly link an invoice to a line in the statement form to automatically mark it as paid. This should be added to the design section.

Now a usage section with clear use cases would be a great addition, but… I have no idea how to add that :slight_smile:

I called this thread “basics” on purpose, because I really do not have any idea how to deal with this feature. Thank you for your contributions so far - but still I do not know how to how to assign bank statements to customer invoices…



in a statement, you have multiple lines.

If one of those lines correspond to the payment for an invoice:

  • in the « party » column, select the right party (the client or supplier)
  • in the « related to » column, select invoice in the first field, then search for the right invoice in the second field

Done. The invoice is paid when you submit that statement.

Of course, this must be done before the statement is posted.

I found how to contribute to the documentation, but apparently there is a mismatch between mercurial and evolve in debian sid, so I’m waiting for an up to date evolve to push :slight_smile:

Thank you so much for holding my hand… :wink:

This is how statement lines and origins are looking now:

Looks as if I’m missing essentials - party does not have entries, nor has “related to”.

  • I can set the party in “origins” - but does this have to happen manually?
  • I do not know what has to happen with “related to” - can you give me some advice on this?

Thank you so much for your patience.


Origins are used to store the data imported from other sources. For example when importing a SEPA file the origins will be created and you just need to create the related lines.

There is the

In case the created line is linked to an invoice, you must select the invoice in the related to. This way after posting the statement the invoice will be marked as paid.

As I could not get any forward with this - would somebody be so kind an hold a little video session on this with me? - Promised: I’ll share all findings on Tryton community wiki, so they’ll not be lost for the rest of the world… (:


When you import a bank statement, the system doesn’t know what to do with the imported statement lines. So it’s up to you to link each BANK statement line (Origin) to a TRYTON statement line (Statement Line).

I don’t know exactly how the sepa importer works, but I think it will search for parties based on IBAN numbers. So when you have a party with an IBAN number, the importer should be able to add a party to the Origin line for you.

When you double-click on a Origin Line, you will get a dialog, where you also can enter the Statement Line. Most of the fields are already filled for you.

But doing it that way can be cumbersome, so there is the Statement Rule module where you can define several rules. Then when you have imported the statement, you can apply those rules which automatically creates the Statement Lines for you.

The way I use the rules is to have very specific rules at the top and the last two are the most general (amount < 0 = account payble; amount > 0 = account_receivable), So I always get all the Origin Lines linked to a Statement Line, I only need to walk through the statements, maybe change the account to another one, reconcile it and I’m done.

There is a youtube video (sorry but in spanish) that explains the usage of bank statements importing files:

This would be a good case for a tutorial video then :slight_smile:

(Sadly the infrastructure for creating tutorial video is still not set up properly.)

Maybe. But at the moment I’d be really happy with a simple checklist - or a rough screencast. And I’m quite a bit away from this

Thou art te p’rson.

But I think we’ve got other priorities…

I also had a hard time finding out how to handle bank statements.
Here are my notes:

The statement file from the bank is imported into Tryton using the “Import Statement” Wizard.

Each single line in the bank statement is called an “Origin Line” or short an “Origin”.
It originates from the bank statement, and it does not do anything in Tryton, it is just there as an information.

To change the state of a Customer Invoice from “Posted” to “Paid”, I have to create a relation between my “Origin Line” (the customer’s payment that I find in the bank statement file) and the Customer Invoice in Tryton.

This is done with a “Tryton Statement Line” or short “Statement Line”.

My problem was that this conzept was not clear to me.
It is important to recognize the difference between

  • Origins (“Ursprünge”) → the raw statement lines which come from the bank


  • Statement Lines (“Kontoauszugspositionen”) → kind of “Tryton’s view” of the bank statement

A “Statement Line” is in fact more than a simple relation from an Origin to a Customer Invoice, but that’s out of scope here.

To relate the Origin Line to a Customer Invoice, do the following:

Go to [Financial] → [Statements] → [Statements] and open the imported statement.

Change to the “Origins” tab to see the originating lines as they come from your bank.

Double click the Origin Line to see details for this line.

Have a look at the “Information” section.

In my example, I find the invoice number unter “Remittance Information”.

In the “Lines” section, click on “+”, choose “Related To” → “Invoice”, and enter the invoice number in the search field.

The customer’s Party and the Account is filled automatically depending on the chosen invoice.
Click “Add” and see that the invoice is now related to the origin line.

Click “Apply Changes”.

After saving the Statement (with the “Save this record” button or by pressing [Ctrl+S]), click on the “Statement Lines” tab.
You should see a line with Party, Related To and Account correctly filled.

Note: The “Statement Lines” are not shown when you did not save the Statement, so don’t forget to save the Statement!

Click on “Validate” and then on “Post”. That’s it - manually.

I think I will write a short tutorial on how to create a rule to do the relation by a rule.



Thank you so much, @lars_wuerfel , this is the kind of message which is really helpful to a simple-minded user as I am.

Could you be so kind and write it into Tryton community HOWTOS? - Let me know if you don’t have the time, in this case I’ll do it for you, if you don’t mind.

And I’m really looking forward for the “rules” part.