Linking credit notes to assets

See the following scenario:

  • An asset is purchased for 10.000€.
  • The invoice is received and the corresponding asset is created in Tryton.
  • Some days or weeks later a problem is found in the asset and a compensation from the supplier is negotiated. For example, the supplier sends a credit note worth 1.000€.

Currently, we can use the Update Asset wizard to indicate the new value of the asset. However, there’s no traceability that the amount has been updated because there’s this credit note.

So I propose to add a Many2One in the Update Asset wizard that allows the user to select an invoice line. If selected, the value field of the wizard will be automatically computed as “value + invoice line amount” (credit note lines are negative so we’d get the expected value).

When the user accepts the wizard, the credit note invoice line is added in a Many2Many (maybe One2Many) field that links invoice lines to assets.

Thoughts?

I’m not sure it is really necessary because we already have the links between invoice lines and stock moves. Thus a credit note that modify the cost price of an assets should already be linked to the same stock move as the initial invoice line.
So I would not like to have duplicated links which may also be incoherent.
But maybe we should have a kind of generic history of all asset value updates where the user could store a justification.

The problem I see is that users may not have created a Tryton purchase document

Apart from the fact that I’m not very fond of all goods having stock moves because not all assets are goods. Assets may be licenses, patents, etc.

That sounds good to me. I guess a One2Many field could be added to account.asset with these fields:

  • Date
  • Value
  • Description

I would personally add the link to the invoice too because that’s where the user will expect to see that information. He could add that information to the description but I don’t think it is a good practice that users copy&paste invoice numbers instead of providing them with a m2o field.

Also the fact that we have a m2o field allows us to propose a good default value in the Update Wizard.

It will be better to have a Reference field so it can be used to refer other kind of document (like a reparation).