Merge branch 'v12-pre-release' into version-12

This commit is contained in:
Sahil Khan 2019-10-26 20:02:19 +05:30
commit 0c0604b7ee
6 changed files with 11 additions and 5 deletions

View File

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

View File

@ -308,7 +308,7 @@ frappe.ui.form.on('Payment Entry', {
() => {
frm.set_party_account_based_on_party = false;
if (r.message.bank_account) {
frm.set_value("bank_account", r.message.bank_account);
frm.set_value("party_bank_account", r.message.bank_account);
}
}
]);

View File

@ -640,3 +640,4 @@ erpnext.patches.v12_0.create_default_energy_point_rules
erpnext.patches.v12_0.set_produced_qty_field_in_sales_order_for_work_order
erpnext.patches.v12_0.generate_leave_ledger_entries
erpnext.patches.v12_0.set_default_shopify_app_type
erpnext.patches.v12_0.replace_accounting_with_accounts_in_home_settings

View File

@ -4,7 +4,7 @@ from frappe.model.utils.rename_field import rename_field
def execute():
frappe.reload_doc('desk', 'doctype', 'auto_repeat')
frappe.reload_doc('automation', 'doctype', 'auto_repeat')
doctypes_to_rename = {
'accounts': ['Journal Entry', 'Payment Entry', 'Purchase Invoice', 'Sales Invoice'],
@ -41,4 +41,4 @@ def drop_columns_from_subscription():
if field in frappe.db.get_table_columns("Subscription"):
fields_to_drop['Subscription'].append(field)
frappe.model.delete_fields(fields_to_drop, delete=1)
frappe.model.delete_fields(fields_to_drop, delete=1)

View File

@ -0,0 +1,5 @@
import frappe
def execute():
frappe.db.sql("""UPDATE `tabUser` SET `home_settings` = REPLACE(`home_settings`, 'Accounting', 'Accounts')""")
frappe.cache().delete_key('home_settings')

View File

@ -66,7 +66,7 @@ def place_order():
from erpnext.selling.doctype.quotation.quotation import _make_sales_order
sales_order = frappe.get_doc(_make_sales_order(quotation.name, ignore_permissions=True))
if not cart_settings.allow_items_not_in_stock:
if not cint(cart_settings.allow_items_not_in_stock):
for item in sales_order.get("items"):
item.reserved_warehouse, is_stock_item = frappe.db.get_value("Item",
item.item_code, ["website_warehouse", "is_stock_item"])