Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
bbc2d11d10
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import webnotes
|
import webnotes
|
||||||
from webnotes.utils import cint, flt, comma_or, _round
|
from webnotes.utils import cint, flt, comma_or, _round, add_days, cstr
|
||||||
from setup.utils import get_company_currency
|
from setup.utils import get_company_currency
|
||||||
from selling.utils import get_item_details
|
from selling.utils import get_item_details
|
||||||
from webnotes import msgprint, _
|
from webnotes import msgprint, _
|
||||||
@ -291,7 +291,7 @@ class SellingController(StockController):
|
|||||||
sr.doc.customer = self.doc.customer
|
sr.doc.customer = self.doc.customer
|
||||||
sr.doc.customer_name = self.doc.customer_name
|
sr.doc.customer_name = self.doc.customer_name
|
||||||
if sr.doc.warranty_period:
|
if sr.doc.warranty_period:
|
||||||
sr.doc.warranty_expiry_date = add_days(cstr(self.doc.delivery_date),
|
sr.doc.warranty_expiry_date = add_days(cstr(self.doc.posting_date),
|
||||||
cint(sr.doc.warranty_period))
|
cint(sr.doc.warranty_period))
|
||||||
sr.doc.status = 'Delivered'
|
sr.doc.status = 'Delivered'
|
||||||
|
|
||||||
|
@ -4,10 +4,9 @@ cancelled = []
|
|||||||
uncancelled = []
|
uncancelled = []
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
from stock.stock_ledger import update_entries_after
|
global cancelled, uncancelled
|
||||||
|
|
||||||
stock_entries = webnotes.conn.sql("""select * from `tabStock Entry`
|
stock_entries = webnotes.conn.sql("""select * from `tabStock Entry`
|
||||||
where docstatus >= 1 and date(modified) >= "2013-08-16" and date(modified) <= "2013-08-21"
|
where docstatus >= 1 and date(modified) >= "2013-08-16"
|
||||||
and ifnull(production_order, '') != '' and ifnull(bom_no, '') != ''
|
and ifnull(production_order, '') != '' and ifnull(bom_no, '') != ''
|
||||||
order by modified desc, name desc""", as_dict=True)
|
order by modified desc, name desc""", as_dict=True)
|
||||||
|
|
||||||
@ -18,7 +17,6 @@ def execute():
|
|||||||
where voucher_type='Stock Entry' and voucher_no=%s
|
where voucher_type='Stock Entry' and voucher_no=%s
|
||||||
and is_cancelled='No'""", entry.name, as_dict=True)
|
and is_cancelled='No'""", entry.name, as_dict=True)
|
||||||
if res:
|
if res:
|
||||||
print entry
|
|
||||||
make_stock_entry_detail(entry, res)
|
make_stock_entry_detail(entry, res)
|
||||||
|
|
||||||
if cancelled or uncancelled:
|
if cancelled or uncancelled:
|
||||||
@ -98,11 +96,11 @@ def send_email():
|
|||||||
if cancelled else ""
|
if cancelled else ""
|
||||||
|
|
||||||
subject = "[ERPNext] [Important] Cancellation undone for some Stock Entries"
|
subject = "[ERPNext] [Important] Cancellation undone for some Stock Entries"
|
||||||
content = """Dear user,
|
content = """Dear System Manager,
|
||||||
|
|
||||||
An error got introduced into the code that cleared the item table in Stock Entry associated to a Production Order.
|
An error got introduced into the code that cleared the item table in a Stock Entry associated to a Production Order.
|
||||||
|
|
||||||
Hence,
|
To undo its effect,
|
||||||
%s
|
%s
|
||||||
|
|
||||||
%s
|
%s
|
||||||
@ -114,6 +112,6 @@ Sorry for the inconvenience this has caused.
|
|||||||
Regards,
|
Regards,
|
||||||
Team ERPNext.""" % (uncancelled, cancelled)
|
Team ERPNext.""" % (uncancelled, cancelled)
|
||||||
|
|
||||||
print subject, content
|
# print subject, content
|
||||||
|
|
||||||
# sendmail_to_system_managers(subject, content)
|
sendmail_to_system_managers(subject, content)
|
@ -256,5 +256,5 @@ patch_list = [
|
|||||||
"patches.august_2013.p05_update_serial_no_status",
|
"patches.august_2013.p05_update_serial_no_status",
|
||||||
"patches.august_2013.p05_employee_birthdays",
|
"patches.august_2013.p05_employee_birthdays",
|
||||||
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-08-16",
|
"execute:webnotes.reload_doc('accounts', 'Print Format', 'POS Invoice') # 2013-08-16",
|
||||||
# "patches.august_2013.p06_fix_sle_against_stock_entry",
|
"patches.august_2013.p06_fix_sle_against_stock_entry",
|
||||||
]
|
]
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-16 10:59:15",
|
"creation": "2013-05-16 10:59:15",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-08-16 10:16:00",
|
"modified": "2013-08-21 13:37:01",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -35,8 +35,7 @@
|
|||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"write": 1
|
||||||
"submit": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@ -446,38 +445,26 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1
|
"search_index": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"doctype": "DocField",
|
|
||||||
"fieldname": "fiscal_year",
|
|
||||||
"fieldtype": "Select",
|
|
||||||
"in_filter": 1,
|
|
||||||
"label": "Fiscal Year",
|
|
||||||
"options": "link:Fiscal Year",
|
|
||||||
"read_only": 0,
|
|
||||||
"reqd": 1,
|
|
||||||
"search_index": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cancel": 1,
|
"cancel": 1,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"role": "Material Master Manager",
|
"report": 1,
|
||||||
"write": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"doctype": "DocPerm",
|
|
||||||
"role": "Material Manager",
|
"role": "Material Manager",
|
||||||
"write": 0
|
"submit": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
|
"create": 1,
|
||||||
|
"doctype": "DocPerm",
|
||||||
|
"report": 1,
|
||||||
|
"role": "Material User",
|
||||||
|
"submit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
"create": 0,
|
"create": 0,
|
||||||
"doctype": "DocPerm",
|
"doctype": "DocPerm",
|
||||||
"role": "Material User",
|
"role": "Accounts User"
|
||||||
"write": 0
|
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
x
Reference in New Issue
Block a user