Currently tryton allows users to define the default payment term for invoices (or purchases or sales) at the party form.
That default value used to be a couple of fields of type Property but in latest versions that was converted to MultiValue fields.
The information of the party’s customer_payment_term and supplier_payment_term fields is stored in account.invoice.payment_term and the model has the fields:
- supplier_payment term
The thing is that we’d like to be able to customize the way the payment term is choosen based on some other criteria (a “type” field on invoices, for example -could also be the journal), but which would only apply to customer invoices.
The idea would be to change account.invoice.payment_term so that it only has the following fields:
Kind could be a selection with the following options:
- Empty (affects both customer and supplier invoices)
- Customer Invoice
- Customer Credit Note
- Supplier Invoice
- Supplier Credit Note
To clarify, in our experience usually the company wants Customer Credit Notes to have a different payment term than the invoice.
This design would allow us to add a new field (invoice_type, or journal) to be applied to lines of kind “Customer Invoice” and thus provide defaults in other circumstances.