We have an scenario where a customer wants post invoices (*) in different revenue accounts depending on the customer is national, intracommunitary or extracommunitary.
Although this is the first time we have found this requirement in a Tryton project, I must say that we have done it in other ERP projects.
So we think this can be achieved with a new model “Product account rule” that works similar to “Account Tax rule”:
- it will be configured optionally on Party accounting page (customer_product_account_rule and supplier_product_account_rule).
- it will allow to define account substitutions
So in the on_change_product method of invoice the system will take the party’s product account rule into account to compute the account used.
(*) in this case are customer invoices but could be valid for supplier invoices as well.