mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -20,7 +20,7 @@ from webnotes import _, msgprint
|
|||||||
from webnotes.utils import flt, cint, today, cstr
|
from webnotes.utils import flt, cint, today, cstr
|
||||||
from setup.utils import get_company_currency, get_price_list_currency
|
from setup.utils import get_company_currency, get_price_list_currency
|
||||||
from accounts.utils import get_fiscal_year, validate_fiscal_year
|
from accounts.utils import get_fiscal_year, validate_fiscal_year
|
||||||
from utilities.transaction_base import TransactionBase, validate_conversion_rate, validate_uom_is_integer
|
from utilities.transaction_base import TransactionBase, validate_conversion_rate
|
||||||
import json
|
import json
|
||||||
|
|
||||||
class AccountsController(TransactionBase):
|
class AccountsController(TransactionBase):
|
||||||
@@ -55,15 +55,15 @@ class AccountsController(TransactionBase):
|
|||||||
label=self.meta.get_label(date_field))
|
label=self.meta.get_label(date_field))
|
||||||
|
|
||||||
def validate_for_freezed_account(self):
|
def validate_for_freezed_account(self):
|
||||||
for fld in ["customer", "supplier"]:
|
for fieldname in ["customer", "supplier"]:
|
||||||
if self.meta.get_field(fld):
|
if self.meta.get_field(fieldname) and self.doc.fields.get(fieldname):
|
||||||
accounts = webnotes.conn.get_values("Account", {"master_type": fld.upper(),
|
accounts = webnotes.conn.get_values("Account", {"master_type": fieldname.title(),
|
||||||
"master_name": self.doc.fields[fld], "company": self.doc.company},
|
"master_name": self.doc.fields[fieldname], "company": self.doc.company},
|
||||||
"freeze_account", as_dict=1)
|
"freeze_account", as_dict=1)
|
||||||
|
|
||||||
if accounts:
|
if accounts:
|
||||||
if not filter(lambda x: cstr(x.freeze_account) in ["", "No"], accounts):
|
if not filter(lambda x: cstr(x.freeze_account) in ["", "No"], accounts):
|
||||||
msgprint(_("Account for this ") + fld + _(" has been freezed. ") +
|
msgprint(_("Account for this ") + fieldname + _(" has been freezed. ") +
|
||||||
self.doc.doctype + _(" can not be made."), raise_exception=1)
|
self.doc.doctype + _(" can not be made."), raise_exception=1)
|
||||||
|
|
||||||
def set_price_list_currency(self, buying_or_selling):
|
def set_price_list_currency(self, buying_or_selling):
|
||||||
|
|||||||
@@ -4,3 +4,18 @@
|
|||||||
}
|
}
|
||||||
---
|
---
|
||||||
The Calendar is a tool where you can create and share Events and also see auto-generated events from the system.
|
The Calendar is a tool where you can create and share Events and also see auto-generated events from the system.
|
||||||
|
|
||||||
|
### Repeating Events
|
||||||
|
|
||||||
|
You can set events to repeat on every interval by Checking the "Repeat This Event"
|
||||||
|
as shown in the example.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
You can see the repeat events by switching back to the calendar.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Reminders
|
||||||
|
|
||||||
|
You will also get a daily digest of all upcoming events for the day if any if the reminder field is checked.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:14",
|
"creation": "2013-01-10 16:34:14",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-22 15:27:26",
|
"modified": "2013-07-26 15:24:31",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -16,11 +16,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
|
"fieldname": "grade_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Grade",
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
|
"oldfieldname": "grade_name",
|
||||||
|
"oldfieldtype": "Data",
|
||||||
"parent": "Grade",
|
"parent": "Grade",
|
||||||
"parentfield": "fields",
|
"parentfield": "fields",
|
||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0
|
"permlevel": 0,
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
@@ -42,22 +48,7 @@
|
|||||||
"name": "Grade"
|
"name": "Grade"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField"
|
||||||
"fieldname": "trash_reason",
|
|
||||||
"fieldtype": "Small Text",
|
|
||||||
"label": "Trash Reason",
|
|
||||||
"oldfieldname": "trash_reason",
|
|
||||||
"oldfieldtype": "Small Text",
|
|
||||||
"read_only": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"doctype": "DocField",
|
|
||||||
"fieldname": "grade_name",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"label": "Grade",
|
|
||||||
"oldfieldname": "grade_name",
|
|
||||||
"oldfieldtype": "Data",
|
|
||||||
"reqd": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocPerm"
|
"doctype": "DocPerm"
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ class DocType(DocListController):
|
|||||||
|
|
||||||
def get_calendar_events(self, user_id):
|
def get_calendar_events(self, user_id):
|
||||||
from core.doctype.event.event import get_events
|
from core.doctype.event.event import get_events
|
||||||
events = get_events(self.future_from_date, self.future_to_date)
|
events = get_events(self.future_from_date.strftime("%Y-%m-%d"), self.future_to_date.strftime("%Y-%m-%d"))
|
||||||
|
|
||||||
html = ""
|
html = ""
|
||||||
if events:
|
if events:
|
||||||
|
|||||||
@@ -41,14 +41,10 @@ def get_things_todo():
|
|||||||
|
|
||||||
def get_todays_events():
|
def get_todays_events():
|
||||||
"""Returns a count of todays events in calendar"""
|
"""Returns a count of todays events in calendar"""
|
||||||
|
from core.doctype.event.event import get_events
|
||||||
from webnotes.utils import nowdate
|
from webnotes.utils import nowdate
|
||||||
todays_events = webnotes.conn.sql("""\
|
today = nowdate()
|
||||||
SELECT COUNT(*) FROM `tabEvent`
|
return len(get_events(today, today))
|
||||||
WHERE owner = %s
|
|
||||||
AND event_type != 'Cancel'
|
|
||||||
AND %s between date(starts_on) and date(ends_on)""", (
|
|
||||||
webnotes.session.user, nowdate()))
|
|
||||||
return todays_events[0][0]
|
|
||||||
|
|
||||||
def get_unread_messages():
|
def get_unread_messages():
|
||||||
"returns unread (docstatus-0 messages for a user)"
|
"returns unread (docstatus-0 messages for a user)"
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ def execute_all():
|
|||||||
run_fn(flush)
|
run_fn(flush)
|
||||||
|
|
||||||
def execute_daily():
|
def execute_daily():
|
||||||
|
# event reminders
|
||||||
|
from core.doctype.event.event import send_event_digest
|
||||||
|
run_fn(send_event_digest)
|
||||||
|
|
||||||
# email digest
|
# email digest
|
||||||
from setup.doctype.email_digest.email_digest import send
|
from setup.doctype.email_digest.email_digest import send
|
||||||
run_fn(send)
|
run_fn(send)
|
||||||
|
|||||||
@@ -185,9 +185,4 @@ fieldset[disabled] .btn-default:active,
|
|||||||
fieldset[disabled] .btn-default.active {
|
fieldset[disabled] .btn-default.active {
|
||||||
background-color: #a7a9aa;
|
background-color: #a7a9aa;
|
||||||
border-color: #a7a9aa;
|
border-color: #a7a9aa;
|
||||||
}
|
|
||||||
|
|
||||||
.breadcrumb {
|
|
||||||
margin: 0 -20px 20px;
|
|
||||||
border-radius: 0px;
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user