hi , i have put in permission based on the owner of document. can i change the owner of document
do you mean in internal documents such as a âSales Invoiceâ or an attached file?
I guess in both cases you can pseudo change the ownership by âassigningâ it to someone.
I think the creator of any document will remain the same (and I think that is so on purpose, so you can always track te origins of a document)
Hi,
I think I understand why changing / transferring ownership of document is important, while I agree that the creator of the document will remain the same. I think, both âcreatorâ and âownerâ are always the same in ERPNext, regardless of any âAssign Toâ or âShared Withâ action that have been done to that particular document.
Take Quotation for example. In many typical sales organization, it is common to have each sales people be able to see only their own quotations, not quotations of other sales user, to avoid friction or un-healthy competition among peers. Therefore, the role permission for Quotation docs will be set to âIf Ownerâ for all Sales User. Now, letâs see a case where a User-A was acting on behalf of User-B to create a Quotation. User-B would noât be able to see or edit the quotation, until User-A shared or assigned this particular quotation with User-B. However, User-B would never be able to âSubmitâ that quotation, even though this quotation was intended for his Customer and User-A has shared and assigned to him. Only User-A can submit the quotation.
This is why we need to be able to transfer document ownership (not document creator).
Cheers,
-Lucky
Any updates to this? I have the same problem.
Another solution would be to create another role in the Role permission manager. Adding another role that says âIf assigned toâ would be useful. That way the users who are assigned to the document will be able to see the document.
As far as Iâm aware, the only way to change a document owner is direct in the database or via an equivalent frappe.db.sql
call or frappe.db.set_value(doctype, name, fieldname, value)
:
UPDATE `tabDoc Type Here`
SET owner='user@domain.com'
WHERE name='Document Name';
frappe.db.set_value will also change the modified date of the document unless specified not to with update_modified=False
.