Commit graph

184 commits

Author SHA1 Message Date
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache (#21282) 2023-06-08 11:47:17 +05:30
Shariq Ansari
3736aaa26f chore: linter fix 2023-05-10 17:36:57 +05:30
Shariq Ansari
ecc431875e chore: updated banner text 2023-05-10 17:21:39 +05:30
Shariq Ansari
ab5570f447 chore: removed try new workflow builder button 2023-05-10 14:42:35 +05:30
Shariq Ansari
35f1c0213d fix: dont save if state or transition is empty and is_active is set 2023-05-10 14:41:15 +05:30
Shariq Ansari
f5310e1d03 fix: wrong workflow_builder_url in existing doc's banner 2023-05-04 18:06:54 +05:30
Shariq Ansari
997f2f64fa fix: added button on list view to open workflow builder 2023-05-03 16:22:06 +05:30
Shariq Ansari
5ad8079086 fix: added banner on workflow doc to try new workflow builder with gif 2023-05-03 16:06:27 +05:30
Shariq Ansari
9ab905c46c fix: show state/transition data on sidebar on click 2023-05-02 20:09:47 +05:30
Shariq Ansari
f258ca09ac fix: render states & transition by fetching workflow data 2023-05-02 17:55:46 +05:30
Shariq Ansari
96057eb632 fix: try workflow builder button in workflow doc 2023-05-01 13:31:53 +05:30
Shariq Ansari
289c774b1a fix: workflow creating/editing dialog 2023-05-01 13:25:39 +05:30
Shariq Ansari
aa3b6d3ecc feat: workflow builder
created page with vue setup
2023-05-01 13:13:27 +05:30
Sagar Vora
53c9869ce3 style: use set.isdisjoint when comparing roles (+ minor refactor) 2023-04-27 17:39:33 +05:30
Wolfram Schmidt
4a7e039b87
fix: allow renaming workflow action master (#20698)
allow to rename work flow action masters will help to consolidate and make sure that typos can be corrected at ease
2023-04-14 14:53:04 +05:30
Ankush Menat
0cab0b830d
refactor: replace imghdr with filetype (#20680)
* refactor: replace `imaghdr` with `filetype`

```
11:52:06 worker.1      | /home/ankush/benches/develop/apps/frappe/frappe/core/doctype/file/utils.py:2: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13
```

* feat: improved extension guessing using filecontent
2023-04-13 12:19:08 +05:30
Ankush Menat
d5a9f198ec
refactor: set docfield options without method (#20653) 2023-04-11 18:08:19 +05:30
Andrew McLeod
b898029894
fix(workflow): add whitelisted functions permissions checks (#20575)
Add permissions checks to workflow.py whitelisted functions.
2023-04-11 14:45:35 +05:30
Raffael Meyer
d48a1c9e7c
feat: make workflow state translatable (#20326) 2023-03-20 21:55:08 +05:30
Leonard Goertz
6cba6753bc
fix: raise_exception=False for has_permission in filter_allowed_users (#20113)
* raise_exception=False for has_permission for workflow users

* style: format

[skip ci]

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-02-22 11:18:00 +05:30
Ahmed Hasanin
57bc2ebf57
fix(workflow): Remove docstatus field from get_workflow_state_count (#19332)
remove docstatus from get_workflow_state_count as it is not being used
and causes error with postgresql as it requires the selected column
to either appear in the group by clause or an aggregat function


[skip ci]
2022-12-19 11:50:58 +05:30
Ankush Menat
0896873c8a test: add test role to user 2022-09-10 12:48:33 +05:30
Aradhya Tripathi
e73ae6f039
Merge branch 'develop' into get-all-mod 2022-08-19 15:42:35 +05:30
Ankush Menat
3e2d2a703a test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
Aradhya Tripathi
0656ea9b07
Merge branch 'develop' into get-all-mod 2022-08-14 11:39:30 +05:30
Ankush Menat
40f27f908a style: format JS files with prettier 2022-08-04 14:51:01 +05:30
Gavin D'souza
85e3ee9403 chore: Minified DocType JSON notation from old verbose notation 2022-08-03 12:22:03 +05:30
Aradhya
69089d3fd5 refactor: removed unnecesary pseudocolumns 2022-07-24 14:47:51 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
chillaranand
25f82e966c refactor: Remove unused imports & code 2022-05-19 15:34:35 +05:30
Shariq Ansari
b4e43257c3
fix: bad query if user has ' in the email address (#16796) 2022-05-04 19:07:51 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Mohammad Hasnain Mohsin Rajan
f21b343488
perf: role instead of users in workflow actions (#15789)
Create a single workflow action document for pending transitions.
The Roles that are allowed to make the transition are stored in a Table MultiSelect field.
Workflow action doctype is filtered on the basis of applied roles on the visiting user.
The user column is retained for backward compatibility.

BREAKING CHANGE: The user field will no longer be used, A new field that stores applicable roles will be used instead.
2022-03-07 13:01:31 +05:30
Shariq Ansari
57614e9a6e
fix: Give select permission to 'All' for workflow state (#15044) 2021-11-22 18:49:56 +05:30
leela
73843b0ab3 fix: include doc details in workflow action email subject 2021-09-28 20:50:31 +05:30
Suraj Shetty
1553ebdc99 fix: Link workflow document 2021-09-20 10:34:59 +05:30
Suraj Shetty
20c9af556f fix(Workflow Action): Pass doc to attach_print to avoid "Not Found"
- Printview used to go empty for new document due to "Not Found" error in printview because that new document has not been saved in the database while processing workflow action email.
2021-09-19 21:23:03 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
ebc220db39 refactor(tests): frappe.db.delete > frappe.db.sql
Use frappe.db.delete wherever possible. Get rid of all the frappe.db.sql ;)
This commit focuses on the tests written under the doctype specific
tests
2021-08-19 19:50:48 +05:30
Ankush Menat
a85744be27
test: Python syntax validation "integration" test 2021-08-06 15:04:18 +05:30
Ankush
257723cb0a
feat: PythonExpression and Python option with syntax validation for Code field types (#13707)
* feat: `PythonExpression` and `Python` options for `Code` fields

* fix: check python expressions in assignment rule

* fix: replace server script syntax validation

* fix: validate condition in workflow transition

Add PythonExpression in Options.
2021-08-06 04:10:09 +00:00
Gavin D'souza
01d275f667 style: Format code for better readability
* Remove trailing whitespaces
* Format code to fit module conventions
* Add appropriate new lines between imports, classes, fn defs, etc
* Added comments, docstrings & module headers
2021-07-28 18:55:27 +05:30
Aradhya-Tripathi
84ff1d0af9 style: removed frappe.db.sql comments 2021-07-28 13:48:01 +05:30
Aradhya-Tripathi
538ef2168b fix: removed wrong queries 2021-07-24 22:58:12 +05:30
Aradhya-Tripathi
2f3371d873 refactor: Moved raw queries to frappe orm 2021-07-23 23:14:24 +05:30
Aradhya-Tripathi
79ccaa95f3 refactor: Moved raw queries to frappe orm 2021-07-21 23:29:50 +05:30
Mohammad Hasnain Mohsin Rajan
d25252b1e1
perf: Index workflow action fields (#13622)
* feat: add number format parameter in doc.get_formatted

* fix: add test cases

* fix: test_document test

* fix: test_document test fix

* fix: readding test for test_formatter

* perf: add indexes in workflow action

* chore: commit auto created file

* Revert "feat: add number format parameter in doc.get_formatted"

This reverts commit 6bdcae1201.

* Revert "fix: add test cases"

This reverts commit 4bafae6e38.

* Revert "fix: test_document test"

This reverts commit 3336915dae.

* Revert "fix: readding test for test_formatter"

This reverts commit f5e40141af.

* chore: remove unwanted changes

* chore: remove unwanted changes

Co-authored-by: Kenneth Sequeira <seq.kenneth@gmail.com>
2021-07-07 15:52:19 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Frappe Bot
d30596b15e refactor: Delete Qunit test files
Since it is no longer used
2021-04-27 21:37:15 +05:30
Suraj Shetty
7eb3445f57
fix: Pass option as string 2021-04-13 12:03:31 +05:30