Fixed version conflict

This commit is contained in:
Nabin Hait 2016-09-23 12:16:31 +05:30
commit 6b4eb7f77f
12 changed files with 19 additions and 8 deletions

View File

@ -51,6 +51,9 @@ class Budget(Document):
def validate_expense_against_budget(args): def validate_expense_against_budget(args):
args = frappe._dict(args) args = frappe._dict(args)
if not args.cost_center:
return
if frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"}): if frappe.db.get_value("Account", {"name": args.account, "root_type": "Expense"}):
cc_lft, cc_rgt = frappe.db.get_value("Cost Center", args.cost_center, ["lft", "rgt"]) cc_lft, cc_rgt = frappe.db.get_value("Cost Center", args.cost_center, ["lft", "rgt"])

View File

@ -667,7 +667,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
show_items_in_item_cart: function() { show_items_in_item_cart: function() {
var me = this; var me = this;
var $items = this.wrapper.find(".items").empty(); var $items = this.wrapper.find(".items").empty();
me.frm.doc.net_total = 0.0
$.each(this.frm.doc.items|| [], function(i, d) { $.each(this.frm.doc.items|| [], function(i, d) {
$(frappe.render_template("pos_bill_item", { $(frappe.render_template("pos_bill_item", {
item_code: d.item_code, item_code: d.item_code,

View File

@ -55,7 +55,6 @@ def notify_status(doc, method=None):
if party.status == 'Open': if party.status == 'Open':
# may be open elsewhere, check # may be open elsewhere, check
# default status # default status
party.status = status
update_status(party) update_status(party)
party.update_modified() party.update_modified()

View File

@ -268,7 +268,7 @@ erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
erpnext.patches.v6_27.fix_recurring_order_status erpnext.patches.v6_27.fix_recurring_order_status
erpnext.patches.v6_20x.update_product_bundle_description erpnext.patches.v6_20x.update_product_bundle_description
erpnext.patches.v7_0.update_party_status erpnext.patches.v7_0.update_party_status #2016-09-22
erpnext.patches.v7_0.update_item_projected erpnext.patches.v7_0.update_item_projected
erpnext.patches.v7_0.remove_features_setup erpnext.patches.v7_0.remove_features_setup
erpnext.patches.v7_0.update_home_page erpnext.patches.v7_0.update_home_page

View File

@ -28,6 +28,7 @@ def execute():
time_sheet.update_cost() time_sheet.update_cost()
time_sheet.calculate_total_amounts() time_sheet.calculate_total_amounts()
time_sheet.flags.ignore_validate = True time_sheet.flags.ignore_validate = True
time_sheet.flags.ignore_links = True
time_sheet.save(ignore_permissions=True) time_sheet.save(ignore_permissions=True)
# To ignore validate_mandatory_fields function # To ignore validate_mandatory_fields function

View File

@ -17,10 +17,10 @@ def execute():
add_timesheet_detail(time_sheet, args) add_timesheet_detail(time_sheet, args)
time_sheet.docstatus = tlb.docstatus time_sheet.docstatus = tlb.docstatus
time_sheet.flags.ignore_links = True
time_sheet.save(ignore_permissions=True) time_sheet.save(ignore_permissions=True)
def get_timesheet_data(data): def get_timesheet_data(data):
time_log = frappe.get_all('Time Log', fields=["*"], time_log = frappe.get_all('Time Log', fields=["*"], filters = {'name': data.time_log})
filters = {'name': data.time_log})[0] if time_log:
return get_timelog_data(time_log[0])
return get_timelog_data(time_log)

View File

@ -5,6 +5,8 @@ def execute():
frappe.reload_doc('accounts', 'doctype', 'sales_invoice_payment') frappe.reload_doc('accounts', 'doctype', 'sales_invoice_payment')
for time_sheet in frappe.db.sql(""" select sales_invoice, name, total_billable_amount from `tabTimesheet` for time_sheet in frappe.db.sql(""" select sales_invoice, name, total_billable_amount from `tabTimesheet`
where sales_invoice is not null and docstatus < 2""", as_dict=True): where sales_invoice is not null and docstatus < 2""", as_dict=True):
if not frappe.db.exists('Sales Invoice', time_sheet.sales_invoice):
continue
si_doc = frappe.get_doc('Sales Invoice', time_sheet.sales_invoice) si_doc = frappe.get_doc('Sales Invoice', time_sheet.sales_invoice)
ts = si_doc.append('timesheets',{}) ts = si_doc.append('timesheets',{})
ts.time_sheet = time_sheet.name ts.time_sheet = time_sheet.name

View File

@ -7,6 +7,8 @@ def execute():
frappe.reload_doctype('Stock Settings') frappe.reload_doctype('Stock Settings')
stock_settings = frappe.get_doc('Stock Settings', 'Stock Settings') stock_settings = frappe.get_doc('Stock Settings', 'Stock Settings')
stock_settings.show_barcode_field = cint(frappe.db.get_value("Features Setup", None, "fs_item_barcode")) stock_settings.show_barcode_field = cint(frappe.db.get_value("Features Setup", None, "fs_item_barcode"))
if not frappe.db.exists("UOM", stock_settings.stock_uom):
stock_settings.stock_uom = None
stock_settings.save() stock_settings.save()
create_compact_item_print_custom_field() create_compact_item_print_custom_field()

View File

@ -16,4 +16,5 @@ def execute():
"company": frappe.db.get_value("Account", expense_claim_type.default_account, "company"), "company": frappe.db.get_value("Account", expense_claim_type.default_account, "company"),
"default_account": expense_claim_type.default_account, "default_account": expense_claim_type.default_account,
}) })
doc.flags.ignore_mandatory = True
doc.save(ignore_permissions=True) doc.save(ignore_permissions=True)

View File

@ -668,6 +668,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
me._set_values_for_item_list(r.message); me._set_values_for_item_list(r.message);
if(item) me.set_gross_profit(item); if(item) me.set_gross_profit(item);
if(calculate_taxes_and_totals) me.calculate_taxes_and_totals(); if(calculate_taxes_and_totals) me.calculate_taxes_and_totals();
if(me.frm.doc.apply_discount_on) me.frm.trigger("apply_discount_on")
} }
} }
}); });

View File

@ -553,6 +553,9 @@ def get_events(start, end, filters=None):
def make_purchase_order_for_drop_shipment(source_name, for_supplier, target_doc=None): def make_purchase_order_for_drop_shipment(source_name, for_supplier, target_doc=None):
def set_missing_values(source, target): def set_missing_values(source, target):
target.supplier = for_supplier target.supplier = for_supplier
target.apply_discount_on = ""
target.additional_discount_percentage = 0.0
target.discount_amount = 0.0
default_price_list = frappe.get_value("Supplier", for_supplier, "default_price_list") default_price_list = frappe.get_value("Supplier", for_supplier, "default_price_list")
if default_price_list: if default_price_list:

View File

@ -71,7 +71,7 @@ class Warehouse(NestedSet):
"freeze_account": "No" "freeze_account": "No"
}) })
ac_doc.flags.ignore_permissions = True ac_doc.flags.ignore_permissions = True
ac_doc.flags.ignore_mandatory = True
try: try:
ac_doc.insert() ac_doc.insert()
msgprint(_("Account head {0} created").format(ac_doc.name)) msgprint(_("Account head {0} created").format(ac_doc.name))