Blocking backdated stock transaction is incorrectly blocking Landed Cost Voucher

When Backdated stock transactions is disallowed by setting a role in stock setting for the field “Role Allowed to Create/Edit Back-dated Transactions”, it wrongly blocks Landed Cost Vouchers from being posted as well.
The very need of the LCV is to be able to post at a later point in time when additional expense for a purchase is figured out. It is also posted as a modification of the same transaction.

I realize that the validate() function calls the following function: validate_with_last_transaction_posting_time()
This should be exempted if the voucher type is LCV.

Dear Basant

The Stock settings works well with frozen stock and in this case of LCV, you can define dedicated role and set it there in stock setting for which you have to define role permission manager for other stock doctypes so that that particular role user can only create LCV and not being able to play with other frozen stock.

Hi Ahsantareen,

So, I create a new role called LCV User and the only permission the role will have is to edit LCV doctype. I then assign this role for backdated posting. Few question:
If I assign user_1 the following role: Stock User, LCV User, will user_1 be able to submit backdated stock entry/Delivery Note/Purchase Receipt as well because of the combination of role assigned - Stock Use & LCV User?

Since LCV is a valid case for back dated entries, shouldn’t it be more easy to be allowed then to setup this way for all stock users? We can have a simple setting in stock setting to allow backdated LCV for users with permission on LCV doctype. And use this to bypass the validation in the stock controller?

Hi @Basant

The proposed Role with defined set of permissions will server the purpose. The whole idea is here to control the back dated transactions and LCV is one of them. Excluding LCV and customizing stock setting doctype is not necessary. Hope justifies.