Merge branch 'hotfix'

This commit is contained in:
Nabin Hait 2018-03-07 13:09:06 +05:30
commit f0543a9765
5 changed files with 18 additions and 10 deletions

View File

@ -5,7 +5,7 @@ import frappe
from erpnext.hooks import regional_overrides
from frappe.utils import getdate
__version__ = '10.1.5'
__version__ = '10.1.6'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -20,6 +20,11 @@ class InvalidPaymentEntry(ValidationError):
class PaymentEntry(AccountsController):
def __init__(self, *args, **kwargs):
super(PaymentEntry, self).__init__(*args, **kwargs)
if not self.is_new():
self.setup_party_account_field()
def setup_party_account_field(self):
self.party_account_field = None
self.party_account = None
@ -287,6 +292,7 @@ class PaymentEntry(AccountsController):
def set_unallocated_amount(self):
self.unallocated_amount = 0
if self.party:
total_deductions = sum([flt(d.amount) for d in self.get("deductions")])

View File

@ -200,7 +200,7 @@ def get_data():
"color": "#fd784f",
"icon": "octicon octicon-calendar",
"label": _("Course Schedule"),
"link": "Calendar/Course Schedule",
"link": "List/Course Schedule/Calendar",
"_doctype": "Course Schedule",
"type": "list",
"hidden": 1

View File

@ -2,7 +2,7 @@
"allow_copy": 0,
"allow_guest_to_view": 0,
"allow_import": 1,
"allow_rename": 0,
"allow_rename": 1,
"autoname": "GARD.####",
"beta": 0,
"creation": "2016-07-21 15:32:51.163292",
@ -507,7 +507,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-12-06 18:17:38.090252",
"modified": "2018-03-07 12:51:06.941609",
"modified_by": "Administrator",
"module": "Education",
"name": "Guardian",

View File

@ -9,15 +9,17 @@ def execute():
# update the sales order item in the material request
frappe.reload_doc('stock', 'doctype', 'material_request_item')
frappe.db.sql('''update `tabMaterial Request Item` mri set sales_order_item = (select name from
`tabSales Order Item` soi where soi.parent=mri.sales_order and soi.item_code=mri.item_code) where docstatus = 1 and
ifnull(mri.sales_order, "")!=""
frappe.db.sql('''update `tabMaterial Request Item` mri, `tabSales Order Item` soi
set mri.sales_order_item = soi.name
where ifnull(mri.sales_order, "")!="" and soi.parent=mri.sales_order
and soi.item_code=mri.item_code and mri.docstatus=1
''')
# update the sales order item in the purchase order
frappe.db.sql('''update `tabPurchase Order Item` poi set sales_order_item = (select name from
`tabSales Order Item` soi where soi.parent=poi.sales_order and soi.item_code=poi.item_code) where docstatus = 1 and
ifnull(poi.sales_order, "")!=""
frappe.db.sql('''update `tabPurchase Order Item` poi, `tabSales Order Item` soi
set poi.sales_order_item = soi.name
where ifnull(poi.sales_order, "")!="" and soi.parent=poi.sales_order
and soi.item_code=poi.item_code and poi.docstatus = 1
''')
# Update the status in material request and sales order