diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 723e7cecae1..9a1686af083 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1,2 +1,2 @@ from __future__ import unicode_literals -__version__ = '6.12.8' +__version__ = '6.12.9' diff --git a/erpnext/change_log/v6/v6_12_9.md b/erpnext/change_log/v6/v6_12_9.md new file mode 100644 index 00000000000..b6060f0aea9 --- /dev/null +++ b/erpnext/change_log/v6/v6_12_9.md @@ -0,0 +1,2 @@ +- Task status will be automatically set to "Overdue" when it crosses expected end date. +- Task notification will only be for overdue tasks, not open tasks. diff --git a/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html b/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html index 05fd9ce42c3..eb34f9bfb78 100644 --- a/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html +++ b/erpnext/docs/current/api/controllers/erpnext.controllers.status_updater.html @@ -75,7 +75,7 @@ Installation Note: Update Installed Qty, Update Percent Qty and Validate over in set_status - (self, update=False, status=None) + (self, update=False, status=None, update_modified=True)
No docs
+ + + erpnext.shopping_cart.cart.set_customer_in_address + (doc, method=None) +
+No docs
+diff --git a/erpnext/docs/current/index.html b/erpnext/docs/current/index.html index 338ec01ad57..26f1b233eff 100644 --- a/erpnext/docs/current/index.html +++ b/erpnext/docs/current/index.html @@ -35,7 +35,7 @@ Version
6.12.3
+ 6.12.6
data_10get_items_from_product_bundlesection_break_26base_totalbase_net_totalcolumn_break_28totalnet_totaltaxes_sectiontaxes_and_chargestaxesother_charges_calculationtotalsbase_taxes_and_charges_addedbase_taxes_and_charges_deductedbase_total_taxes_and_chargescolumn_break_40taxes_and_charges_addedtaxes_and_charges_deductedtotal_taxes_and_chargessection_break_44apply_discount_oncolumn_break_46discount_amountbase_discount_amountsection_break_49base_grand_totalbase_in_wordscolumn_break8grand_totalin_wordstotal_advanceoutstanding_amountwrite_offwrite_off_amountbase_write_off_amountcolumn_break_61write_off_accountwrite_off_cost_centeradvances_sectionget_advances_paidadvancesterms_section_breaktc_nametermscontact_sectionsupplier_addresscol_break23contact_personprinting_settingsletter_headselect_print_headingmore_infocredit_toparty_account_currencyis_openingdue_dateagainst_expense_accountcolumn_break_63mode_of_paymentfiscal_yearremarksrecurring_invoiceis_recurringrecurring_typefrom_dateto_daterepeat_on_day_of_monthend_datecolumn_break_82next_daterecurring_idnotification_email_addressrecurring_print_formatget_last_purchase_rateget_items_from_product_bundlesb_last_purchasebase_totalbase_net_totalcolumn_break_26totalnet_totaltaxes_sectiontaxes_and_chargestaxesother_charges_calculationtotalsbase_taxes_and_charges_addedbase_taxes_and_charges_deductedbase_total_taxes_and_chargescolumn_break_39taxes_and_charges_addedtaxes_and_charges_deductedtotal_taxes_and_chargesdiscount_sectionapply_discount_oncolumn_break_45discount_amountbase_discount_amounttotals_sectionbase_grand_totalbase_in_wordsbase_rounded_totaladvance_paidcolumn_break4grand_totalin_wordsterms_section_breaktc_nametermscontact_sectionsupplier_addresscb_contactcontact_personmore_infostatusfiscal_yearref_sqcolumn_break_74per_receivedper_billedcolumn_break5letter_headselect_print_headingraw_material_detailssupplied_itemsrecurring_ordercolumn_breakis_recurringrecurring_typefrom_dateto_daterepeat_on_day_of_monthend_datecolumn_break83next_daterecurring_idnotification_email_addressrecurring_print_formatcolumn_break_10default_taxes_and_chargescredit_daysaddress_contactsaddress_htmlcolumn_break1contact_htmldefault_payable_accountsaccountscolumn_break2websitesupplier_detailscommunicationsget_items_from_product_bundlesection_break_22base_totalbase_net_totalcolumn_break_24totalnet_totaltaxes_sectiontaxes_and_chargestaxesother_charges_calculationtotalsbase_taxes_and_charges_addedbase_taxes_and_charges_deductedbase_total_taxes_and_chargescolumn_break_37taxes_and_charges_addedtaxes_and_charges_deductedtotal_taxes_and_chargessection_break_41apply_discount_oncolumn_break_43discount_amountbase_discount_amountsection_break_46base_grand_totalbase_in_wordsbase_rounded_totalcolumn_break4grand_totalin_wordsterms_section_breaktc_nametermscontact_sectionsupplier_addresscontact_personprinting_settingsselect_print_headingletter_headmore_infostatusis_subcontractedcolumn_break_57fiscal_yearcolumn_break_14default_taxes_and_chargesaddress_contactsaddress_htmlcolumn_break1contact_htmldefault_receivable_accountsaccountscolumn_break2credit_days_based_oncredit_dayscredit_limitmore_infocustomer_detailswebsitesales_team_section_breakdefault_sales_partnerdefault_commission_ratesales_team_sectionsales_teamcommunicationsUpdate delivery status from Purchase Order for drop shipping
get_items_from_product_bundlemore_inforequested_bytransaction_datecolumn_break2statusper_orderedprinting_detailsletter_headselect_print_headingterms_section_breaktc_nametermsget_items_from_product_bundlesection_break0base_totalbase_net_totalcolumn_break_27totalnet_totaltaxes_sectiontaxes_and_chargestaxesother_charges_calculationtotalsbase_taxes_and_charges_addedbase_taxes_and_charges_deductedbase_total_taxes_and_chargescolumn_break3taxes_and_charges_addedtaxes_and_charges_deductedtotal_taxes_and_chargessection_break_42apply_discount_oncolumn_break_44discount_amountbase_discount_amountsection_break_46base_grand_totalbase_in_wordsbase_rounded_totalcolumn_break_50grand_totalin_wordsterms_section_breaktc_nametermscontact_sectionsupplier_addresscolumn_break_57contact_personraw_material_detailsis_subcontractedsupplier_warehousesupplied_itemsbill_nobill_datemore_infostatusrejected_warehouseamended_fromrangecolumn_break4companyfiscal_yearprinting_settingsletter_headselect_print_headingother_detailsinstructionsremarkstransporter_infotransporter_namecolumn_break5lr_nolr_date+ + + __setup__ + (self) +
+No docs
++ + + check_if_linked + (self) +
+No docs
+diff --git a/erpnext/hooks.py b/erpnext/hooks.py index bed3a914c73..05e53c5677c 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd." app_description = """ERP made simple""" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "6.12.8" +app_version = "6.12.9" app_email = "info@erpnext.com" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" @@ -125,7 +125,8 @@ scheduler_events = { "erpnext.setup.doctype.email_digest.email_digest.send", "erpnext.support.doctype.issue.issue.auto_close_tickets", "erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year", - "erpnext.hr.doctype.employee.employee.send_birthday_reminders" + "erpnext.hr.doctype.employee.employee.send_birthday_reminders", + "erpnext.projects.doctype.task.task.set_tasks_as_overdue" ] } diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js index 9ed5c764f24..f2e5a9ed689 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.js +++ b/erpnext/hr/doctype/salary_slip/salary_slip.js @@ -32,7 +32,7 @@ cur_frm.cscript.month = cur_frm.cscript.employee = cur_frm.cscript.fiscal_year; cur_frm.cscript.leave_without_pay = function(doc,dt,dn){ if (doc.employee && doc.fiscal_year && doc.month) { - return $c_obj(doc, 'get_leave_details',doc.leave_without_pay,function(r, rt) { + return $c_obj(doc, 'get_leave_details', {"lwp": doc.leave_without_pay}, function(r, rt) { var doc = locals[dt][dn]; cur_frm.refresh(); calculate_all(doc, dt, dn); diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 818c95e324e..671fbb888aa 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -90,14 +90,14 @@ class SalarySlip(TransactionBase): start_date = joining_date elif joining_date > month['month_end_date']: return - + + end_date = month['month_end_date'] if relieving_date: if relieving_date > start_date and relieving_date < month['month_end_date']: end_date = relieving_date elif relieving_date < month['month_start_date']: - frappe.throw(_("Employee relieved on {0} must be set as 'Left'").format(relieving_date)) - else: - end_date = month['month_end_date'] + frappe.throw(_("Employee relieved on {0} must be set as 'Left'") + .format(relieving_date)) payment_days = date_diff(end_date, start_date) + 1 diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json index 61ce9e85b78..5465705d921 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json @@ -19,10 +19,12 @@ "in_filter": 0, "in_list_view": 0, "label": "Capacity Planning", + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -34,7 +36,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "description": "Disables creation of time logs against Production Orders.\nOperations shall not be tracked against Production Order", + "description": "Disables creation of time logs against Production Orders. Operations shall not be tracked against Production Order", "fieldname": "disable_capacity_planning", "fieldtype": "Check", "hidden": 0, @@ -42,10 +44,12 @@ "in_filter": 0, "in_list_view": 0, "label": "Disable Capacity Planning and Time Tracking", + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -65,10 +69,12 @@ "in_filter": 0, "in_list_view": 0, "label": "Allow Overtime", + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -88,11 +94,13 @@ "in_filter": 0, "in_list_view": 1, "label": "Allow Production on Holidays", + "length": 0, "no_copy": 0, "options": "", "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -110,10 +118,12 @@ "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 0, + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -134,10 +144,12 @@ "in_filter": 0, "in_list_view": 0, "label": "Capacity Planning For (Days)", + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -157,10 +169,12 @@ "in_filter": 0, "in_list_view": 0, "label": "Time Between Operations (in mins)", + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -178,10 +192,12 @@ "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 0, + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -200,10 +216,12 @@ "in_filter": 0, "in_list_view": 0, "label": "Over Production Allowance Percentage", + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -223,11 +241,13 @@ "in_filter": 0, "in_list_view": 0, "label": "Backflush Raw Materials Based On", + "length": 0, "no_copy": 0, "options": "BOM\nMaterial Transferred for Manufacture", "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -245,10 +265,12 @@ "ignore_user_permissions": 0, "in_filter": 0, "in_list_view": 0, + "length": 0, "no_copy": 0, "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -267,11 +289,13 @@ "in_filter": 0, "in_list_view": 0, "label": "Default Work In Progress Warehouse", + "length": 0, "no_copy": 0, "options": "Warehouse", "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -290,11 +314,13 @@ "in_filter": 0, "in_list_view": 0, "label": "Default Finished Goods Warehouse", + "length": 0, "no_copy": 0, "options": "Warehouse", "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -306,12 +332,15 @@ "hide_heading": 0, "hide_toolbar": 0, "icon": "icon-wrench", + "idx": 0, "in_create": 0, "in_dialog": 0, "is_submittable": 0, "issingle": 1, "istable": 0, - "modified": "2015-08-21 08:27:03.794133", + "max_attachments": 0, + "menu_index": 0, + "modified": "2015-12-10 00:03:20.895790", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing Settings", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index ac5e5ca5eb2..612a44732ac 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -239,3 +239,4 @@ erpnext.patches.v6_10.email_digest_default_quote erpnext.patches.v6_10.fix_billed_amount_in_drop_ship_po erpnext.patches.v6_10.fix_delivery_status_of_drop_ship_item #2015-12-08 erpnext.patches.v5_8.tax_rule #2015-12-08 +erpnext.patches.v6_12.set_overdue_tasks diff --git a/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py b/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py index 23de9d05202..9a53b7f5d39 100644 --- a/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py +++ b/erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals import frappe def execute(): + frappe.reload_doctype("Sales Order Item") for so_name in frappe.db.sql("""select distinct parent from `tabSales Order Item` where delivered_by_supplier=1 and docstatus=1"""): so = frappe.get_doc("Sales Order", so_name[0]) diff --git a/erpnext/patches/v6_12/__init__.py b/erpnext/patches/v6_12/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/patches/v6_12/set_overdue_tasks.py b/erpnext/patches/v6_12/set_overdue_tasks.py new file mode 100644 index 00000000000..39d601aa004 --- /dev/null +++ b/erpnext/patches/v6_12/set_overdue_tasks.py @@ -0,0 +1,7 @@ +import frappe + +def execute(): + frappe.reload_doctype("Task") + + from erpnext.projects.doctype.task.task import set_tasks_as_overdue + set_tasks_as_overdue() diff --git a/erpnext/projects/doctype/activity_type/activity_type.js b/erpnext/projects/doctype/activity_type/activity_type.js index f7bb9a52226..7eb3571af10 100644 --- a/erpnext/projects/doctype/activity_type/activity_type.js +++ b/erpnext/projects/doctype/activity_type/activity_type.js @@ -1,6 +1,6 @@ frappe.ui.form.on("Activity Type", { refresh: function(frm) { - frm.add_custom_button("Activity Cost per Employee", function() { + frm.add_custom_button(__("Activity Cost per Employee"), function() { frappe.route_options = {"activity_type": frm.doc.name}; frappe.set_route("List", "Activity Cost"); }); diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js index 4e870fa59bf..755147c79fc 100644 --- a/erpnext/projects/doctype/task/task.js +++ b/erpnext/projects/doctype/task/task.js @@ -8,6 +8,13 @@ cur_frm.add_fetch("project", "company", "company"); frappe.ui.form.on("Task", { refresh: function(frm) { var doc = frm.doc; + if(doc.__islocal) { + if(!frm.doc.exp_end_date) { + frm.set_value("exp_end_date", frappe.datetime.add_days(new Date(), 7)); + } + } + + if(!doc.__islocal) { if(frappe.model.can_read("Time Log")) { frm.add_custom_button(__("Time Logs"), function() { diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json index 1dd2a5c4e49..0e7f4fcd358 100644 --- a/erpnext/projects/doctype/task/task.json +++ b/erpnext/projects/doctype/task/task.json @@ -26,6 +26,7 @@ "oldfieldtype": "Data", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 1, @@ -51,6 +52,7 @@ "options": "Project", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -73,6 +75,7 @@ "oldfieldtype": "Column Break", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "print_width": "50%", "read_only": 0, "report_hide": 0, @@ -84,7 +87,7 @@ }, { "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "fieldname": "status", "fieldtype": "Select", @@ -97,9 +100,10 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "Open\nWorking\nPending Review\nClosed\nCancelled", + "options": "Open\nWorking\nPending Review\nOverdue\nClosed\nCancelled", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -125,6 +129,7 @@ "options": "Low\nMedium\nHigh\nUrgent", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -132,102 +137,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "section_break0", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "Simple", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "description", - "fieldtype": "Text Editor", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Details", - "length": 0, - "no_copy": 0, - "oldfieldname": "description", - "oldfieldtype": "Text Editor", - "permlevel": 0, - "print_hide": 0, - "print_width": "300px", - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "300px" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "section_break", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Depends On", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "fieldname": "depends_on", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "depends_on", - "length": 0, - "no_copy": 0, - "options": "Task Depends On", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_on_submit": 0, "bold": 0, @@ -243,6 +152,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -267,6 +177,7 @@ "oldfieldtype": "Date", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -293,6 +204,7 @@ "oldfieldtype": "Data", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -315,6 +227,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -324,7 +237,7 @@ }, { "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "fieldname": "exp_end_date", "fieldtype": "Date", @@ -339,6 +252,7 @@ "oldfieldtype": "Date", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -346,6 +260,106 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "section_break0", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "Simple", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Details", + "length": 0, + "no_copy": 0, + "oldfieldname": "description", + "oldfieldtype": "Text Editor", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "print_width": "300px", + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0, + "width": "300px" + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "section_break", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Depends On", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "permlevel": 0, + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "depends_on", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "depends_on", + "length": 0, + "no_copy": 0, + "options": "Task Depends On", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -363,6 +377,7 @@ "oldfieldtype": "Column Break", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "print_width": "50%", "read_only": 0, "report_hide": 0, @@ -389,6 +404,7 @@ "oldfieldtype": "Date", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 1, "report_hide": 0, "reqd": 0, @@ -415,6 +431,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 1, "report_hide": 0, "reqd": 0, @@ -437,6 +454,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -461,6 +479,7 @@ "oldfieldtype": "Date", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 1, "report_hide": 0, "reqd": 0, @@ -483,6 +502,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -508,6 +528,7 @@ "options": "Company:company:default_currency", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 1, "report_hide": 0, "reqd": 0, @@ -532,6 +553,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 1, "report_hide": 0, "reqd": 0, @@ -554,6 +576,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -577,6 +600,7 @@ "permlevel": 0, "precision": "", "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 1, "report_hide": 0, "reqd": 0, @@ -599,6 +623,7 @@ "no_copy": 0, "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -624,6 +649,7 @@ "oldfieldtype": "Date", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -649,6 +675,7 @@ "oldfieldtype": "Date", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -670,6 +697,7 @@ "no_copy": 0, "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -693,6 +721,7 @@ "options": "Company", "permlevel": 0, "print_hide": 0, + "print_hide_if_no_value": 0, "read_only": 0, "report_hide": 0, "reqd": 0, @@ -711,7 +740,8 @@ "issingle": 0, "istable": 0, "max_attachments": 5, - "modified": "2015-11-16 06:29:59.063379", + "menu_index": 0, + "modified": "2015-12-10 01:43:16.137084", "modified_by": "Administrator", "module": "Projects", "name": "Task", diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index cd0aabec94e..15c98f4c401 100644 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -144,3 +144,9 @@ def set_multiple_status(names, status): task = frappe.get_doc("Task", name) task.status = status task.save() + +def set_tasks_as_overdue(): + frappe.db.sql("""update tabTask set `status`='Overdue' + where exp_end_date is not null + and exp_end_date < CURDATE() + and `status` not in ('Closed', 'Cancelled')""") diff --git a/erpnext/projects/doctype/task/task_list.js b/erpnext/projects/doctype/task/task_list.js index 2a02fbb7453..48a46555e54 100644 --- a/erpnext/projects/doctype/task/task_list.js +++ b/erpnext/projects/doctype/task/task_list.js @@ -1,10 +1,6 @@ frappe.listview_settings['Task'] = { add_fields: ["project", "status", "priority", "exp_end_date"], onload: function(listview) { - frappe.route_options = { - "status": "Open" - }; - var method = "erpnext.projects.doctype.task.task.set_multiple_status"; listview.page.add_menu_item(__("Set as Open"), function() { @@ -14,6 +10,17 @@ frappe.listview_settings['Task'] = { listview.page.add_menu_item(__("Set as Closed"), function() { listview.call_for_selected_items(method, {"status": "Closed"}); }); + }, + get_indicator: function(doc) { + var colors = { + "Open": "orange", + "Overdue": "red", + "Pending Review": "orange", + "Working": "orange", + "Closed": "green", + "Cancelled": "dark grey" + } + return [__(doc.status), colors[doc.status], "status,=," + doc.status]; } }; diff --git a/erpnext/projects/doctype/task/test_task.py b/erpnext/projects/doctype/task/test_task.py index fced0a45ed2..7007269e4e8 100644 --- a/erpnext/projects/doctype/task/test_task.py +++ b/erpnext/projects/doctype/task/test_task.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import frappe import unittest -from frappe.utils import getdate +from frappe.utils import getdate, nowdate, add_days # test_records = frappe.get_test_records('Task') @@ -177,3 +177,18 @@ class TestTask(unittest.TestCase): todo = get_owner_and_status() self.assertEquals(todo.owner, "test@example.com") self.assertEquals(todo.status, "Closed") + + def test_overdue(self): + task = frappe.get_doc({ + "doctype":"Task", + "subject": "Testing Overdue", + "status": "Open", + "exp_end_date": add_days(nowdate(), -1) + }) + + task.insert() + + from erpnext.projects.doctype.task.task import set_tasks_as_overdue + set_tasks_as_overdue() + + self.assertEquals(frappe.db.get_value("Task", task.name, "status"), "Overdue") diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js index c139f8a7178..ec70bbb62b4 100644 --- a/erpnext/public/js/setup_wizard.js +++ b/erpnext/public/js/setup_wizard.js @@ -109,7 +109,7 @@ function load_erpnext_slides() { {"fieldname": "password", "label": __("Password"), "fieldtype": "Password", reqd:1}, {fieldtype:"Attach Image", fieldname:"attach_user", - label: __("Attach Your Picture")}, + label: __("Attach Your Picture"), is_private: 0}, ], help: __('The first user will become the System Manager (you can change this later).'), onload: function(slide) { @@ -254,12 +254,15 @@ function load_erpnext_slides() { fields: [ {fieldtype:"Attach Image", fieldname:"attach_letterhead", label: __("Attach Letterhead"), - description: __("Keep it web friendly 900px (w) by 100px (h)") + description: __("Keep it web friendly 900px (w) by 100px (h)"), + is_private: 0 }, {fieldtype: "Column Break"}, {fieldtype:"Attach Image", fieldname:"attach_logo", label:__("Attach Logo"), - description: __("100px by 100px")}, + description: __("100px by 100px"), + is_private: 0 + }, ], css_class: "two-column" @@ -381,7 +384,7 @@ function load_erpnext_slides() { {fieldtype: "Check", fieldname: "is_purchase_item_" + i, label:__("We buy this Item")}, {fieldtype:"Column Break"}, {fieldtype:"Currency", fieldname:"item_price_" + i, label:__("Rate")}, - {fieldtype:"Attach Image", fieldname:"item_img_" + i, label:__("Attach Image")}, + {fieldtype:"Attach Image", fieldname:"item_img_" + i, label:__("Attach Image"), is_private: 0}, ]) } slide.fields[1].reqd = 1; diff --git a/erpnext/setup/doctype/email_digest/templates/default.html b/erpnext/setup/doctype/email_digest/templates/default.html index 44c0490eca1..7ed9d1faaf2 100644 --- a/erpnext/setup/doctype/email_digest/templates/default.html +++ b/erpnext/setup/doctype/email_digest/templates/default.html @@ -76,7 +76,7 @@
| - {{ t.description }} + {{ _(t.description) }} |
@@ -99,7 +99,7 @@
|