[minor] repost future gl entries only for current voucher items

This commit is contained in:
Nabin Hait
2013-09-04 17:55:45 +05:30
32 changed files with 293 additions and 78 deletions

View File

@@ -16,7 +16,9 @@ def boot_session(bootinfo):
if webnotes.session['user']!='Guest':
bootinfo['letter_heads'] = get_letter_heads()
load_country_and_currency(bootinfo)
import webnotes.model.doctype
bootinfo['notification_settings'] = webnotes.doc("Notification Control",
"Notification Control").get_values()
@@ -36,7 +38,15 @@ def boot_session(bootinfo):
bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center
from `tabCompany`""", as_dict=1, update={"doctype":":Company"})
def load_country_and_currency(bootinfo):
if bootinfo.control_panel.country and \
webnotes.conn.exists("Country", bootinfo.control_panel.country):
bootinfo["docs"] += [webnotes.doc("Country", bootinfo.control_panel.country)]
bootinfo["docs"] += webnotes.conn.sql("""select * from tabCurrency
where ifnull(enabled,0)=1""", as_dict=1, update={"doctype":":Currency"})
def get_letter_heads():
"""load letter heads with startup"""
import webnotes

View File

@@ -64,6 +64,12 @@ def check_if_expired():
webnotes.response['message'] = 'Account Expired'
raise webnotes.AuthenticationError
def on_build():
from website.helpers.make_web_include_files import make
make()
from home.page.latest_updates import latest_updates
latest_updates.make()
def comment_added(doc):
"""add comment to feed"""