mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-12 17:51:20 +00:00
[fix] [minor] merge conflict fixed
This commit is contained in:
25
patches/1311/p07_scheduler_errors_digest.py
Normal file
25
patches/1311/p07_scheduler_errors_digest.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.reload_doc("setup", "doctype", "email_digest")
|
||||
|
||||
from webnotes.profile import get_system_managers
|
||||
system_managers = get_system_managers(only_name=True)
|
||||
if not system_managers:
|
||||
return
|
||||
|
||||
# scheduler errors digest
|
||||
edigest = webnotes.new_bean("Email Digest")
|
||||
edigest.doc.fields.update({
|
||||
"name": "Scheduler Errors",
|
||||
"company": webnotes.conn.get_default("company"),
|
||||
"frequency": "Daily",
|
||||
"enabled": 1,
|
||||
"recipient_list": "\n".join(system_managers),
|
||||
"scheduler_errors": 1
|
||||
})
|
||||
edigest.insert()
|
||||
11
patches/1311/p08_email_digest_recipients.py
Normal file
11
patches/1311/p08_email_digest_recipients.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
from webnotes.utils import extract_email_id
|
||||
for name, recipients in webnotes.conn.sql("""select name, recipient_list from `tabEmail Digest`"""):
|
||||
recipients = "\n".join([extract_email_id(r) for r in recipients.split("\n")])
|
||||
webnotes.conn.set_value("Email Digest", name, "recipient_list", recipients)
|
||||
0
patches/1312/__init__.py
Normal file
0
patches/1312/__init__.py
Normal file
17
patches/1312/p01_delete_old_stock_reports.py
Normal file
17
patches/1312/p01_delete_old_stock_reports.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
def execute():
|
||||
import webnotes, os, shutil
|
||||
from webnotes.utils import get_base_path
|
||||
|
||||
webnotes.delete_doc('Page', 'stock-ledger')
|
||||
webnotes.delete_doc('Page', 'stock-ageing')
|
||||
webnotes.delete_doc('Page', 'stock-level')
|
||||
webnotes.delete_doc('Page', 'general-ledger')
|
||||
|
||||
for d in [["stock", "stock_ledger"], ["stock", "stock_ageing"],
|
||||
["stock", "stock_level"], ["accounts", "general_ledger"]]:
|
||||
path = os.path.join(get_base_path(), "app", d[0], "page", d[1])
|
||||
if os.path.exists(path):
|
||||
shutil.rmtree(path)
|
||||
@@ -256,7 +256,10 @@ patch_list = [
|
||||
"patches.1311.p06_fix_report_columns",
|
||||
"execute:webnotes.delete_doc('DocType', 'Documentation Tool')",
|
||||
"execute:webnotes.delete_doc('Report', 'Stock Ledger') #2013-11-29",
|
||||
"patches.1312.p01_delete_old_stock_reports",
|
||||
"execute:webnotes.delete_doc('Report', 'Payment Collection With Ageing')",
|
||||
"execute:webnotes.delete_doc('Report', 'Payment Made With Ageing')",
|
||||
"patches.1311.p07_scheduler_errors_digest",
|
||||
"patches.1311.p08_email_digest_recipients",
|
||||
"execute:webnotes.delete_doc('DocType', 'Warehouse Type')",
|
||||
]
|
||||
Reference in New Issue
Block a user