Commit graph

98 commits

Author SHA1 Message Date
prssanna
c7f0aafa7e feat: add button to go to ref doctype list 2020-05-30 15:28:25 +05:30
prssanna
62ac2494e7 style: fix formatting 2020-05-30 15:28:25 +05:30
prssanna
d621a994a1 fix: fix state filter 2020-05-30 15:28:25 +05:30
prssanna
49f4eea963 fix: don't get states count if form is new 2020-05-30 15:28:25 +05:30
prssanna
37dcef5f53 fix: code formatting 2020-05-30 15:28:25 +05:30
prssanna
2df481e990 fix: increase table width 2020-05-30 15:28:24 +05:30
prssanna
f61f5ec834 fix: get indicator color from state 2020-05-30 15:28:24 +05:30
prssanna
aaf1618898 refactor: refactor rendering of table 2020-05-30 15:28:24 +05:30
prssanna
d1c4af1255 refactor: use frappe.warn and render table in form also 2020-05-30 15:28:07 +05:30
prssanna
09dd31a79c feat: show warning if documents have workflow states that do not exist in the workflow 2020-05-30 15:28:07 +05:30
Suraj Shetty
3b93b2a456 refactor: Commonify transition condition evaluation
- This add safe_globals for transition evaluation in workflow_action
2020-03-24 13:28:30 +05:30
Chinmay D. Pai
9d36b05804
fix: correctly pickle email_args for workflow emails
currently, since we return possible actions as dict_values, pickle fails
to work with it with the following error:

```python-traceback
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 99, in execute_job
    method(**kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/workflow/doctype/workflow_action/workflow_action.py", line 210, in send_workflow_action_email
    enqueue(method=frappe.sendmail, queue='short', **email_args)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 69, in enqueue
    kwargs=queue_args)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 258, in enqueue_call
    job = self.enqueue_job(job, at_front=at_front)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 324, in enqueue_job
    job.save(pipeline=pipe)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 516, in save
    connection.hmset(key, self.to_dict(include_meta=include_meta))
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 469, in to_dict
    obj['data'] = zlib.compress(self.data)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py", line 234, in data
    self._data = dumps(job_tuple)
TypeError: can't pickle dict_values objects
```

passing the values as a list instead works fine.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-07 18:06:02 +05:30
Suraj Shetty
ddd091d9f7 fix: Wrap condition field with bactick since it is a reserved keyword 2020-02-07 17:54:18 +05:30
Suraj Shetty
0461696fd8 fix: De-duplicate actions sent in mail 2020-02-07 11:19:01 +05:30
mergify[bot]
62ea837d07
Merge pull request #9363 from prssanna/workflow-fix
fix(Workflow): Set workflow state when some action is performed on a …
2020-02-05 10:04:49 +00:00
prssanna
70316e8670 fix(test): set workflow state Approved docstatus to 1 in test 2020-02-05 11:47:03 +05:30
prssanna
2edfca9fb5 test: add test case to check if workflow state is set 2020-02-04 12:09:18 +05:30
Suraj Shetty
51bae0df50 fix(translations): Incorrect syntax 2020-01-29 15:35:28 +05:30
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
Suraj Shetty
160d495743
style: Update docstring and fix formatting 2020-01-08 09:37:06 +05:30
prssanna
3cce101c2d test: add test to check if document status is updated 2020-01-07 00:58:43 +05:30
prssanna
04e7b7a96b fix: compare docs by state as key 2020-01-05 15:59:38 +05:30
prssanna
764f18e2e9 fix: check if doc_before_save exists 2019-12-31 12:24:30 +05:30
prssanna
173960e50b fix: update docstatus of documents if docstatus value is changed in workflow 2019-12-30 16:56:07 +05:30
Suraj Shetty
2242146c82 fix: Rename Reference DocType -> Reference Document Type 2019-09-05 15:47:40 +05:30
Suraj Shetty
84c3eb3d62 fix: Disable caching for respond_as_web_page response (#8276)
* fix: Do not cache workflow approval confirmation page

* fix: Make it readable

* fix: Disable caching for respond_as_web_page

* fix: Remove info about no_cache from docstring
2019-08-27 19:36:44 +05:30
Govind S Menokee
206f8fca03
fix: workflow action creation is not skipped
Workflow action creation check is not properly executed due to incorrect field name used in validation.
2019-07-16 16:34:59 +05:30
Suraj Shetty
bea7c72ae9 fix: Update checkbox description 2019-06-14 16:40:33 +05:30
Suraj Shetty
59ac009d5a fix: Codacy 2019-06-14 13:03:48 +05:30
Suraj Shetty
1833c01029 fix: Skip transition if next state of the transition is optional 2019-06-14 11:44:53 +05:30
Suraj Shetty
6d910fc9cd fix: Skip workflow action for transition which cancels the doc 2019-06-13 14:41:41 +05:30
Suraj Shetty
d327dc518e refactor: Make function to create new todo 2019-06-03 12:18:30 +05:30
Suraj Shetty
67b41deb44 test: Add test case to check get_common_transition_actions 2019-06-02 10:56:20 +05:30
Suraj Shetty
8528298b55 test: Init bulk approval test 2019-05-31 13:44:15 +05:30
Nabin Hait
8c91e46563 Fixed merge conflict 2019-04-11 11:56:37 +05:30
Suraj Shetty
0c9e5e2540
style: Add space between key and value 2019-04-09 22:54:52 +05:30
Ahmed Madi
035a8457f6
Update workflow_action.py
Add reference_doctype and reference_name to the send_workflow_action_email function
2019-03-31 11:56:00 +03:00
Suraj Shetty
aee7c67f8b refactor: Move get_users_with_role to utils.user 2019-03-21 21:06:54 +05:30
Frappe Bot
497a14046e Merge branch 'master' into develop 2019-03-01 09:10:17 +00:00
Rushabh Mehta
b288522f3f
Merge pull request #7006 from rohitwaghchaure/indexing_for_workflow_action
(fix, workflow action): added indexing for user and status columns
2019-03-01 09:08:53 +05:30
Rohit Waghchaure
7aad78be75 (fix, workflow action): added indexing for user and status columns 2019-02-28 18:55:57 +05:30
Frappe Bot
54e97b9ebc Merge branch 'master' into develop 2019-02-28 10:05:32 +00:00
Rohit Waghchaure
0ede34aeb3 fix: explicit commit submitting the document even if exception is raised 2019-02-27 17:10:41 +05:30
Saurabh
b727233948 Merge branch 'staging' into develop 2018-12-13 10:37:25 +05:30
Prateeksha Singh
c964d1420c [custom-field] Admin-owned programmed fields 2018-12-11 16:10:02 +05:30
Nabin Hait
d37d111f61 Fixed merge conflict 2018-10-15 15:53:26 +05:30
Nabin Hait
b218a16dc3 fix(name): naming of workflow action based on hash 2018-10-15 14:21:40 +05:30
Ameya Shenoy
63c5613f92
Merge branch 'staging' into develop 2018-10-11 10:11:26 +00:00
Nabin Hait
56be85c934 User permissions patch fixes for skip-for-doctypes (#6229)
* fix(patch): Fixed skip_for_doctypes in User Permissions

* fix(address): Made address_title non-mandatory, because it is set based on links
2018-10-11 15:29:03 +05:30
Ameya Shenoy
e551153ea0
Merge branch 'staging' into develop 2018-09-26 07:21:28 +00:00