Customer has two companies that have a vendor - customer relationship on the ERPNext instance. So when a user who has access to only one company C ( the customer company ) creates a PO against company V ( the vendor company ) , the system should automatically create a sales order. However the user who creates the PO does not have rights to create the SO on Company V.
If we have an extension which creates the SO on submit, is it possible that it can be done with another user-id ( say a system user id ) , so that it is not restricted by the input user’s privileges? Would it work if we do the SO creation as a background task ?