Tryton continues to create invoices even when invoice_method is manual

Hello,

my default invoice_method for purchases is set to manual.

But for some parties, tryton continues to change the invoice_method on purchases. And I don’t find any toggle to change that…

It really depends on the party because it changes when I change the party on a draft purchase.

Help ? :smiley:

Tryton remembers the most common invoice method used in the last 10 purchases for a supplier and set it back for the next purchase.

1 Like

ok thanks. That’s great, but I think 10 is a very big lot.

Would you consider a patch that makes it lower (like 2 or 3), or event better configurable per party ?

It’s here in the code:

Lowering the size will make the feature less interesting for supplier changing often or from which the company buys often but on the other for supplier with low purchases, it is not useful to use very old orders.
So I will not be against an improvement that improves for all the cases which will keep using a trend but also limited by the time. Maybe a limit of 3 over one year.

But at least I think the invoice method should be displayed next to the payment term in front as it is a “dynamic” that is important to setup right.