[6694][IMP] stock_valuation_fifo_lot: add validation error when there is no…#226
[6694][IMP] stock_valuation_fifo_lot: add validation error when there is no…#226AungKoKoLin1997 wants to merge 3 commits into
Conversation
… quant for lot in revaluation
|
I will follow up on adding the translation. |
|
Not sure if it's worth implementing this change. I guess the cause is rather obvious when the revaluation wizard silently not process anything. It's a corner-case which doesn't mess with data IIUC. |
I think the user needs to clearly understand the situation, so showing an explicit error is preferable here. Right now, the problematic behavior is that the user clicks the revaluation button in the wizard, the wizard simply closes without any error, but no stock valuation revaluation record is actually created. In that situation, the user cannot immediately tell whether the revaluation succeeded or not unless they refresh the page and carefully verify the valuation results afterward. Technically, it is possible to notice the issue later by checking the valuation record, but from a usability perspective, raising an error at the moment of revaluation is much more user-friendly. It immediately tells the user that forced FIFO lot outbound processing is required, rather than requiring them to manually investigate the new valuation record. I also agree this is probably not a frequent scenario since we have not encountered it before, but I still think the validation improves clarity and user experience enough to justify the change. |
| ] | ||
| ) | ||
| if not quants: | ||
| raise ValidationError( |
There was a problem hiding this comment.
As a matter of convention.
| raise ValidationError( | |
| raise UserError( |
6694