[minor] cache refactor and workflow docs (#13598)
This commit is contained in:
parent
ad76f9ad70
commit
fb5d678b0c
@ -42,9 +42,21 @@ submit button / option if you have not specified it in the workflow.
|
||||
> Note 4: If you wish to give the option to cancel, you will have to write a
|
||||
workflow transition step that says from submitted you can cancel.
|
||||
|
||||
|
||||
#### Conditions
|
||||
|
||||
#### Example of a Leave Application Process:
|
||||
> New in Version 11
|
||||
|
||||
In Version 11, you can also add a condition for the transition to be applicable. For example in this case if someone applies to leave for more than 5 days, a particular role must approve. For this in the particular transition you can set a property for `Condition` as:
|
||||
|
||||
```
|
||||
doc.total_leave_days <= 5
|
||||
```
|
||||
|
||||
Then if someone applied for leave for less than 5 days, only that particular transition will apply.
|
||||
|
||||
This can be extended to any property of the document.
|
||||
|
||||
#### Example of a Leave Application Process:
|
||||
|
||||
When a Leave Application is saved by Employee, the status of the document changes to "Applied"
|
||||
|
||||
|
@ -7,7 +7,7 @@ from frappe import _
|
||||
|
||||
from frappe.utils import cint, today, formatdate
|
||||
import frappe.defaults
|
||||
|
||||
from frappe.cache_manager import clear_defaults_cache
|
||||
|
||||
from frappe.model.document import Document
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
@ -240,7 +240,7 @@ class Company(Document):
|
||||
frappe.db.sql("""update `tabDefaultValue` set defvalue=%s
|
||||
where defkey='Company' and defvalue=%s""", (newdn, olddn))
|
||||
|
||||
frappe.defaults.clear_cache()
|
||||
clear_defaults_cache()
|
||||
|
||||
def abbreviate(self):
|
||||
self.abbr = ''.join([c[0].upper() for c in self.company_name.split()])
|
||||
|
Loading…
x
Reference in New Issue
Block a user