Closed pedrobaeza closed 1 year ago
Hi @ernestotejeda, some modules you are maintaining are being modified, check this out!
Investigating more, this is not a FIX, but an IMP. Initial text changed according this.
My only doubt here about this improvement is that the sales statistics are changed time after you "close" such data. Imagine an RMA done 6 months after the sales for a broken stuff. There are no possible replacements, so you decide to refund. This will decrease the sold quantity of 6 months ago. It's correct, because you didn't have any revenue for that, but is it convenient?
One possible option is to have a system parameter (but it's not black or white), and another to query on each return if decrease sales statistics or not, but most users won't know what this means (even if we give extended instructions), as they are simple transactional users.
What community think about this?
Please tell me what can break. This operation is atomic, so no intermediate inconsistent data.
Please tell me what can break.
The user expecting that the invoiced/delivered quantities won't change by the effect of RMAs
Well, I see this as something expected (and the PR has been motivated by that), so saying users the "new behavior" should be enough, but masking it under an option deactivated by default will provoke the undiscoverability of the feature.
This PR has the approved
label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
I've found that splitting the RMA leads to inconsistencies in delivered and invoiced quantities.
For example, if we receive an RMA for 5 units and return 2 to the customer and refund the remaining 3, we'll have a count of 0 delivered and 2 invoiced.
This is because once the reception is linked to the sale line we can't split those outcomes.
Given this issue, I think this should go at least behind a company setting as we discussed earlier.
This fix/imp has been finished on 15.0 in #354, so anyone wanted to have it in this version, please cherry pick from that PR.
Steps to reproduce:
Result: the delivered quantity is 1 instead of 0.
This is because the refund generated from the RMA is not linked to sales order line, nor the RMA reception move. This is done because other operations are performed:
And we don't also want that meanwhile the RMA is being performed, the sales order is pending to invoice.
But when the refund has been done, we have it clear, so let's link both and have the sales statistics correct.
@Tecnativa TT41645