2011-12-22 12:48:10 +00:00
|
|
|
import webnotes
|
2011-12-22 12:51:57 +00:00
|
|
|
from webnotes.model.doc import Document
|
2011-12-22 12:48:10 +00:00
|
|
|
|
|
|
|
def execute():
|
|
|
|
companies_list = webnotes.conn.sql("SELECT company_name FROM `tabCompany`", as_list=1)
|
|
|
|
for company in companies_list:
|
|
|
|
if company and company[0]:
|
|
|
|
edigest = Document('Email Digest', "Default Weekly Digest - " + company[0])
|
|
|
|
if edigest:
|
|
|
|
edigest.income_year_to_date = 1
|
|
|
|
edigest.save()
|