Different account product depending on party

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.

Opinions?

(*) in this case are customer invoices but could be valid for supplier invoices as well.

What is exactly the rational for such distinction of account revenue?
For me it is not a real requirement but just a poor way to do analytic/reporting.

It is an agricultural cooperative company and the accounting is subject to strict auditing conditions in which this is required (AFAIK is not a legal requirement).

I do not understand :thinking:. It is required but not required.
So for me it is an old practice which makes no sense with digital accounting.
Usually such distinction is for tax reporting but it is always too strict and simple. The tax code base system solves the problem globally.

It is not mandatory at the government administration level but at the level of the accounting audit that is approved by the cooperative executive board.