* Update README.md
* refactor for better readability
adds ability to name by concatenating fields
add comments
PEP 8 fixes
throw error when field option autoname fails
adds concatenation option description to DocType doctype
* codacy
* remove explicit cast to `str`
* more pep8 fixes
* revert incorrect link
* code review - move internal functions to bottom of module
* Init workflow actions
- WIP code
- Add hooks to create and update
workflow action on document status changes.
- Tweak listview to show host document on list view item click
- Add new doctype "Pending Workflow Action"
- Add allow_self_approval check in Workflow master
* Rename doctypes
- Rename "Workflow Action" to "Workflow Action Master"
- Rename "Pending Workflow Action" to "Workflow Action"
- Remove irrelevant files
* Clear old workflow action on docstatus change
- Add check for user permission before creating a workflow action record
- Make doctype changes to support the Workflow Action System
* Show host document only if workflow action status is open
* Send workflow action mail notifications
* Add patch to rename `tabWorkflow Action` to `tab Workflow Master`
- Rename table to retain data in `tabWorkflow Action` as it
will be overwritten with new structure on migration
* Enqueue email
* Remove unused files
* Add hook for custom has_permission
* Optimize send_workflow_action_email method
* Add permission_query_condition hook
* Show notification based on status
* Override get_form_link in list view
* Refactor workflow action
- Add action link
- update workflow action hooks
* Avoid repeated creation of Worklow Actions
- Update hooks entry to avoid unwanted method call
* Fix error with frappe.db.count usage
* Fix ui/ux for Workflow Action
- Fix action url and improve response on action button click
- Fix workflow action template style
* Fix Codacy
* Add self approval check
* Fix codacy
* Fix test
* Fix python version confilct and a permission error
* Fix incorrect 'this' reference
* Update with requested changes
* Add next action email template option
* Fix string formatting
* Refactor workflow Action
- Make process_workflow_action smaller
* Fix bugs and errors due to refactor
* Fix workflow field caching
* Add a workflow action test
* Fix bugs with email template
* Prevents circular linking of docs
- also added test case to check if code to prevent circular linking of
doctypes works
* created a CircularLinkingError class
- this can be used later if circular linking error needs to be thrown
elsewhere
* add new docfield fetch_from - serves as add_fetch
* replace options.split with fetch_from.split
* copied data from options to fetch_from
* patch to update fetch_from for docfield, custom_field and property_setter
* update tests according to fetch_from change
* Update email.py
* Get the correct Email Address for Administrator
Get the correct Email Address for the Administrator User as well. I see no reason why.
- Return every available roles if the user is admin
This will allow admin to access doctype even if doctype
has docperm with only disabled roles
- No more need to add roles for admin on every new role creation
* use multiselect for email dialog, improv email fetch query
* patch to create contact for all user
* append number if same name found for company
* update tests
* Check for list_renderer before accessing settings
In the master version of frappe, in the first attempt of calling the file manager (when onload is called) the report doesn't build, because in the report view, there is no such attribute list_renderer available.
In that change we check if the list renderer is not undefined and only setup the menu, drag and drop and copy function, when the list_renderer object is available.
This problem might not occur in the developer versions (datatables), but many people still work with the master version and need a working file manager report.
* Update file_list.js
* Overwrite "if owner" restriction*
- Overwrite "if owner" restriction if user has other valid roles
(with access rights) without if_owner enabled for it in doc perm
eg:
If a doctype has 2 docperm for Role A and Role B and the docperm with
Role A has if owner enabled.
Suppose User 1 has Role A, then User 1 should see only docs
which was created by him.
Now if User 2 has Role A and Role B, User 2 should be able to see all the
records because Role B has unrestricted access on doctype.
------------------------------------------------------
Previously in case of User 2, the restriction(of if owner) from Role A
used to reflect and User 2 was only able to view only records made by
him.
This commit will overwrite the if_owner restriction in such case.
- Refactor get_role_permission method
* Add advanced control for user permission
- Add ability to skip user permission check for specific doctype
* Refactor "linked with" method
- Add option to skip linked with doctype which has
ignore_user_permission enabled against them.
* Clear "linked with doctype" cache on doctype changes
* [Minor] Fix formatting
* Fix error and bugs in linked_with method
* Format code
* Add fix to get allowed docs from user_permission
* Fix has_user_permission bug
* Add before migrate patch for user permission
* Fix typo