From 5d39a9594dd7fe262049582834e7d8deb2ce55b6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 9 Dec 2015 17:06:09 +0530 Subject: [PATCH 1/9] [fix] Reload SO Item in patch --- erpnext/patches/v6_10/fix_delivery_status_of_drop_ship_item.py | 1 + 1 file changed, 1 insertion(+) 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]) From 2af44ffd06d65fee8e8b853db419f1b6987bd961 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 9 Dec 2015 17:28:51 +0530 Subject: [PATCH 2/9] [fix] setup wizard is_private --- .../erpnext.controllers.status_updater.html | 2 +- .../erpnext.shopping_cart.cart.html | 16 ++ erpnext/docs/current/index.html | 2 +- .../accounts/bank_reconciliation_detail.html | 12 ++ .../models/accounts/purchase_invoice.html | 156 ++++++++---------- .../purchase_taxes_and_charges_template.html | 9 - .../sales_taxes_and_charges_template.html | 9 - .../current/models/buying/purchase_order.html | 150 +++++++---------- .../docs/current/models/buying/supplier.html | 53 ++---- .../models/buying/supplier_quotation.html | 100 +++++------ .../docs/current/models/selling/customer.html | 71 +++----- .../current/models/selling/sales_order.html | 2 +- .../models/stock/material_request.html | 36 ++-- .../models/stock/purchase_receipt.html | 136 +++++++-------- .../current/models/utilities/address.html | 28 ++++ erpnext/public/js/setup_wizard.js | 11 +- 16 files changed, 348 insertions(+), 445 deletions(-) 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

diff --git a/erpnext/docs/current/api/shopping_cart/erpnext.shopping_cart.cart.html b/erpnext/docs/current/api/shopping_cart/erpnext.shopping_cart.cart.html index cc9dcd6f7f5..6de26bb4629 100644 --- a/erpnext/docs/current/api/shopping_cart/erpnext.shopping_cart.cart.html +++ b/erpnext/docs/current/api/shopping_cart/erpnext.shopping_cart.cart.html @@ -278,6 +278,22 @@ +

+ + + 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 diff --git a/erpnext/docs/current/models/accounts/bank_reconciliation_detail.html b/erpnext/docs/current/models/accounts/bank_reconciliation_detail.html index e5cf53932c3..ee40e68ba31 100644 --- a/erpnext/docs/current/models/accounts/bank_reconciliation_detail.html +++ b/erpnext/docs/current/models/accounts/bank_reconciliation_detail.html @@ -159,6 +159,18 @@ + + 10 + data_10 + + Data + + + + + + + diff --git a/erpnext/docs/current/models/accounts/purchase_invoice.html b/erpnext/docs/current/models/accounts/purchase_invoice.html index 912bed91994..5f8c3e1064d 100644 --- a/erpnext/docs/current/models/accounts/purchase_invoice.html +++ b/erpnext/docs/current/models/accounts/purchase_invoice.html @@ -429,20 +429,8 @@ PINV-RET- - - 27 - get_items_from_product_bundle - - Button - - Get Items from Product Bundle - - - - - - 28 + 27 section_break_26 Section Break @@ -454,7 +442,7 @@ PINV-RET- - 29 + 28 base_total Currency @@ -468,7 +456,7 @@ PINV-RET- - 30 + 29 base_net_total Currency @@ -482,7 +470,7 @@ PINV-RET- - 31 + 30 column_break_28 Column Break @@ -494,7 +482,7 @@ PINV-RET- - 32 + 31 total Currency @@ -508,7 +496,7 @@ PINV-RET- - 33 + 32 net_total Currency @@ -522,7 +510,7 @@ PINV-RET- - 34 + 33 taxes_section Section Break @@ -536,7 +524,7 @@ PINV-RET- - 35 + 34 taxes_and_charges Link @@ -557,7 +545,7 @@ PINV-RET- - 36 + 35 taxes Table @@ -578,7 +566,7 @@ PINV-RET- - 37 + 36 other_charges_calculation HTML @@ -590,7 +578,7 @@ PINV-RET- - 38 + 37 totals Section Break @@ -604,7 +592,7 @@ PINV-RET- - 39 + 38 base_taxes_and_charges_added Currency @@ -618,7 +606,7 @@ PINV-RET- - 40 + 39 base_taxes_and_charges_deducted Currency @@ -632,7 +620,7 @@ PINV-RET- - 41 + 40 base_total_taxes_and_charges Currency @@ -646,7 +634,7 @@ PINV-RET- - 42 + 41 column_break_40 Column Break @@ -658,7 +646,7 @@ PINV-RET- - 43 + 42 taxes_and_charges_added Currency @@ -672,7 +660,7 @@ PINV-RET- - 44 + 43 taxes_and_charges_deducted Currency @@ -686,7 +674,7 @@ PINV-RET- - 45 + 44 total_taxes_and_charges Currency @@ -700,7 +688,7 @@ PINV-RET- - 46 + 45 section_break_44 Section Break @@ -712,7 +700,7 @@ PINV-RET- - 47 + 46 apply_discount_on Select @@ -728,7 +716,7 @@ Net Total - 48 + 47 column_break_46 Column Break @@ -740,7 +728,7 @@ Net Total - 49 + 48 discount_amount Currency @@ -754,7 +742,7 @@ Net Total - 50 + 49 base_discount_amount Currency @@ -768,7 +756,7 @@ Net Total - 51 + 50 section_break_49 Section Break @@ -780,7 +768,7 @@ Net Total - 52 + 51 base_grand_total Currency @@ -794,7 +782,7 @@ Net Total - 53 + 52 base_in_words Data @@ -806,7 +794,7 @@ Net Total - 54 + 53 column_break8 Column Break @@ -818,7 +806,7 @@ Net Total - 55 + 54 grand_total Currency @@ -832,7 +820,7 @@ Net Total - 56 + 55 in_words Data @@ -844,7 +832,7 @@ Net Total - 57 + 56 total_advance Currency @@ -858,7 +846,7 @@ Net Total - 58 + 57 outstanding_amount Currency @@ -872,7 +860,7 @@ Net Total - 59 + 58 write_off Section Break @@ -884,7 +872,7 @@ Net Total - 60 + 59 write_off_amount Currency @@ -898,7 +886,7 @@ Net Total - 61 + 60 base_write_off_amount Currency @@ -912,7 +900,7 @@ Net Total - 62 + 61 column_break_61 Column Break @@ -924,7 +912,7 @@ Net Total - 63 + 62 write_off_account Link @@ -945,7 +933,7 @@ Net Total - 64 + 63 write_off_cost_center Link @@ -966,7 +954,7 @@ Net Total - 65 + 64 advances_section Section Break @@ -980,7 +968,7 @@ Net Total - 66 + 65 get_advances_paid Button @@ -994,7 +982,7 @@ Net Total - 67 + 66 advances Table @@ -1015,7 +1003,7 @@ Net Total - 68 + 67 terms_section_break Section Break @@ -1029,7 +1017,7 @@ Net Total - 69 + 68 tc_name Link @@ -1050,7 +1038,7 @@ Net Total - 70 + 69 terms Text Editor @@ -1062,7 +1050,7 @@ Net Total - 71 + 70 contact_section Section Break @@ -1076,7 +1064,7 @@ Net Total - 72 + 71 supplier_address Link @@ -1097,7 +1085,7 @@ Net Total - 73 + 72 col_break23 Column Break @@ -1109,7 +1097,7 @@ Net Total - 74 + 73 contact_person Link @@ -1130,7 +1118,7 @@ Net Total - 75 + 74 printing_settings Section Break @@ -1142,7 +1130,7 @@ Net Total - 76 + 75 letter_head Link @@ -1163,7 +1151,7 @@ Net Total - 77 + 76 select_print_heading Link @@ -1184,7 +1172,7 @@ Net Total - 78 + 77 more_info Section Break @@ -1198,7 +1186,7 @@ Net Total - 79 + 78 credit_to Link @@ -1219,7 +1207,7 @@ Net Total - 80 + 79 party_account_currency Link @@ -1240,7 +1228,7 @@ Net Total - 81 + 80 is_opening Select @@ -1255,7 +1243,7 @@ Yes - 82 + 81 due_date Date @@ -1267,7 +1255,7 @@ Yes - 83 + 82 against_expense_account Small Text @@ -1279,7 +1267,7 @@ Yes - 84 + 83 column_break_63 Column Break @@ -1291,7 +1279,7 @@ Yes - 85 + 84 mode_of_payment Link @@ -1312,7 +1300,7 @@ Yes - 86 + 85 fiscal_year Link @@ -1333,7 +1321,7 @@ Yes - 87 + 86 remarks Small Text @@ -1345,7 +1333,7 @@ Yes - 88 + 87 recurring_invoice Section Break @@ -1359,7 +1347,7 @@ Yes - 89 + 88 is_recurring Check @@ -1371,7 +1359,7 @@ Yes - 90 + 89 recurring_type Select @@ -1389,7 +1377,7 @@ Yearly - 91 + 90 from_date Date @@ -1402,7 +1390,7 @@ Yearly - 92 + 91 to_date Date @@ -1415,7 +1403,7 @@ Yearly - 93 + 92 repeat_on_day_of_month Int @@ -1428,7 +1416,7 @@ Yearly - 94 + 93 end_date Date @@ -1441,7 +1429,7 @@ Yearly - 95 + 94 column_break_82 Column Break @@ -1453,7 +1441,7 @@ Yearly - 96 + 95 next_date Date @@ -1466,7 +1454,7 @@ Yearly - 97 + 96 recurring_id Data @@ -1479,7 +1467,7 @@ Yearly - 98 + 97 notification_email_address Small Text @@ -1492,7 +1480,7 @@ Yearly - 99 + 98 recurring_print_format Link diff --git a/erpnext/docs/current/models/accounts/purchase_taxes_and_charges_template.html b/erpnext/docs/current/models/accounts/purchase_taxes_and_charges_template.html index 3ab1d49b449..d82047e3531 100644 --- a/erpnext/docs/current/models/accounts/purchase_taxes_and_charges_template.html +++ b/erpnext/docs/current/models/accounts/purchase_taxes_and_charges_template.html @@ -235,15 +235,6 @@ The tax rate you define here will be the standard tax rate for all **Items**. If -

  • - - -Supplier - -
  • - - -
  • diff --git a/erpnext/docs/current/models/accounts/sales_taxes_and_charges_template.html b/erpnext/docs/current/models/accounts/sales_taxes_and_charges_template.html index 21e82f26eb4..828f795c3dd 100644 --- a/erpnext/docs/current/models/accounts/sales_taxes_and_charges_template.html +++ b/erpnext/docs/current/models/accounts/sales_taxes_and_charges_template.html @@ -227,15 +227,6 @@ The tax rate you define here will be the standard tax rate for all **Items**. If
  • -Customer - -
  • - - - -
  • - - Delivery Note
  • diff --git a/erpnext/docs/current/models/buying/purchase_order.html b/erpnext/docs/current/models/buying/purchase_order.html index 87a0773d247..2c0e072f611 100644 --- a/erpnext/docs/current/models/buying/purchase_order.html +++ b/erpnext/docs/current/models/buying/purchase_order.html @@ -547,32 +547,8 @@ Yes - - 35 - get_last_purchase_rate - - Button - - Get Last Purchase Rate - - - - - - - 36 - get_items_from_product_bundle - - Button - - Get Items from Product Bundle - - - - - - 37 + 35 sb_last_purchase Section Break @@ -584,7 +560,7 @@ Yes - 38 + 36 base_total Currency @@ -598,7 +574,7 @@ Yes - 39 + 37 base_net_total Currency @@ -612,7 +588,7 @@ Yes - 40 + 38 column_break_26 Column Break @@ -624,7 +600,7 @@ Yes - 41 + 39 total Currency @@ -638,7 +614,7 @@ Yes - 42 + 40 net_total Currency @@ -652,7 +628,7 @@ Yes - 43 + 41 taxes_section Section Break @@ -666,7 +642,7 @@ Yes - 44 + 42 taxes_and_charges Link @@ -687,7 +663,7 @@ Yes - 45 + 43 taxes Table @@ -708,7 +684,7 @@ Yes - 46 + 44 other_charges_calculation HTML @@ -720,7 +696,7 @@ Yes - 47 + 45 totals Section Break @@ -734,7 +710,7 @@ Yes - 48 + 46 base_taxes_and_charges_added Currency @@ -748,7 +724,7 @@ Yes - 49 + 47 base_taxes_and_charges_deducted Currency @@ -762,7 +738,7 @@ Yes - 50 + 48 base_total_taxes_and_charges Currency @@ -776,7 +752,7 @@ Yes - 51 + 49 column_break_39 Column Break @@ -788,7 +764,7 @@ Yes - 52 + 50 taxes_and_charges_added Currency @@ -802,7 +778,7 @@ Yes - 53 + 51 taxes_and_charges_deducted Currency @@ -816,7 +792,7 @@ Yes - 54 + 52 total_taxes_and_charges Currency @@ -830,7 +806,7 @@ Yes - 55 + 53 discount_section Section Break @@ -842,7 +818,7 @@ Yes - 56 + 54 apply_discount_on Select @@ -858,7 +834,7 @@ Net Total - 57 + 55 column_break_45 Column Break @@ -870,7 +846,7 @@ Net Total - 58 + 56 discount_amount Currency @@ -884,7 +860,7 @@ Net Total - 59 + 57 base_discount_amount Currency @@ -898,7 +874,7 @@ Net Total - 60 + 58 totals_section Section Break @@ -910,7 +886,7 @@ Net Total - 61 + 59 base_grand_total Currency @@ -924,7 +900,7 @@ Net Total - 62 + 60 base_in_words Data @@ -937,7 +913,7 @@ Net Total - 63 + 61 base_rounded_total Currency @@ -951,7 +927,7 @@ Net Total - 64 + 62 advance_paid Currency @@ -963,7 +939,7 @@ Net Total - 65 + 63 column_break4 Column Break @@ -975,7 +951,7 @@ Net Total - 66 + 64 grand_total Currency @@ -989,7 +965,7 @@ Net Total - 67 + 65 in_words Data @@ -1001,7 +977,7 @@ Net Total - 68 + 66 terms_section_break Section Break @@ -1015,7 +991,7 @@ Net Total - 69 + 67 tc_name Link @@ -1036,7 +1012,7 @@ Net Total - 70 + 68 terms Text Editor @@ -1048,7 +1024,7 @@ Net Total - 71 + 69 contact_section Section Break @@ -1062,7 +1038,7 @@ Net Total - 72 + 70 supplier_address Link @@ -1083,7 +1059,7 @@ Net Total - 73 + 71 cb_contact Column Break @@ -1095,7 +1071,7 @@ Net Total - 74 + 72 contact_person Link @@ -1116,7 +1092,7 @@ Net Total - 75 + 73 more_info Section Break @@ -1128,7 +1104,7 @@ Net Total - 76 + 74 status Select @@ -1151,7 +1127,7 @@ Delivered - 77 + 75 fiscal_year Link @@ -1172,7 +1148,7 @@ Delivered - 78 + 76 ref_sq Data @@ -1184,7 +1160,7 @@ Delivered - 79 + 77 column_break_74 Column Break @@ -1196,7 +1172,7 @@ Delivered - 80 + 78 per_received Percent @@ -1208,7 +1184,7 @@ Delivered - 81 + 79 per_billed Percent @@ -1220,7 +1196,7 @@ Delivered - 82 + 80 column_break5 Section Break @@ -1232,7 +1208,7 @@ Delivered - 83 + 81 letter_head Link @@ -1253,7 +1229,7 @@ Delivered - 84 + 82 select_print_heading Link @@ -1274,7 +1250,7 @@ Delivered - 85 + 83 raw_material_details Section Break @@ -1288,7 +1264,7 @@ Delivered - 86 + 84 supplied_items Table @@ -1309,7 +1285,7 @@ Delivered - 87 + 85 recurring_order Section Break @@ -1323,7 +1299,7 @@ Delivered - 88 + 86 column_break Column Break @@ -1335,7 +1311,7 @@ Delivered - 89 + 87 is_recurring Check @@ -1347,7 +1323,7 @@ Delivered - 90 + 88 recurring_type Select @@ -1364,7 +1340,7 @@ Yearly - 91 + 89 from_date Date @@ -1377,7 +1353,7 @@ Yearly - 92 + 90 to_date Date @@ -1390,7 +1366,7 @@ Yearly - 93 + 91 repeat_on_day_of_month Int @@ -1403,7 +1379,7 @@ Yearly - 94 + 92 end_date Date @@ -1416,7 +1392,7 @@ Yearly - 95 + 93 column_break83 Column Break @@ -1428,7 +1404,7 @@ Yearly - 96 + 94 next_date Date @@ -1441,7 +1417,7 @@ Yearly - 97 + 95 recurring_id Data @@ -1453,7 +1429,7 @@ Yearly - 98 + 96 notification_email_address Small Text @@ -1466,7 +1442,7 @@ Yearly - 99 + 97 recurring_print_format Link diff --git a/erpnext/docs/current/models/buying/supplier.html b/erpnext/docs/current/models/buying/supplier.html index 5bf98b34512..444623d5a2a 100644 --- a/erpnext/docs/current/models/buying/supplier.html +++ b/erpnext/docs/current/models/buying/supplier.html @@ -179,39 +179,6 @@ Supplier of Goods or Services. 10 - column_break_10 - - Column Break - - - - - - - - - 11 - default_taxes_and_charges - - Link - - Taxes and Charges - - - - - - - -Purchase Taxes and Charges Template - - - - - - - - 12 credit_days Int @@ -223,7 +190,7 @@ Supplier of Goods or Services. - 13 + 11 address_contacts Section Break @@ -237,7 +204,7 @@ Supplier of Goods or Services. - 14 + 12 address_html HTML @@ -249,7 +216,7 @@ Supplier of Goods or Services. - 15 + 13 column_break1 Column Break @@ -261,7 +228,7 @@ Supplier of Goods or Services. - 16 + 14 contact_html HTML @@ -273,7 +240,7 @@ Supplier of Goods or Services. - 17 + 15 default_payable_accounts Section Break @@ -285,7 +252,7 @@ Supplier of Goods or Services. - 18 + 16 accounts Table @@ -307,7 +274,7 @@ Supplier of Goods or Services. - 19 + 17 column_break2 Section Break @@ -319,7 +286,7 @@ Supplier of Goods or Services. - 20 + 18 website Data @@ -331,7 +298,7 @@ Supplier of Goods or Services. - 21 + 19 supplier_details Text @@ -344,7 +311,7 @@ Supplier of Goods or Services. - 22 + 20 communications Table diff --git a/erpnext/docs/current/models/buying/supplier_quotation.html b/erpnext/docs/current/models/buying/supplier_quotation.html index 1bb1c2f3fc3..8f4e2c7154a 100644 --- a/erpnext/docs/current/models/buying/supplier_quotation.html +++ b/erpnext/docs/current/models/buying/supplier_quotation.html @@ -385,20 +385,8 @@ - - 24 - get_items_from_product_bundle - - Button - - Get Items from Product Bundle - - - - - - 25 + 24 section_break_22 Section Break @@ -410,7 +398,7 @@ - 26 + 25 base_total Currency @@ -424,7 +412,7 @@ - 27 + 26 base_net_total Currency @@ -438,7 +426,7 @@ - 28 + 27 column_break_24 Column Break @@ -450,7 +438,7 @@ - 29 + 28 total Currency @@ -464,7 +452,7 @@ - 30 + 29 net_total Currency @@ -478,7 +466,7 @@ - 31 + 30 taxes_section Section Break @@ -492,7 +480,7 @@ - 32 + 31 taxes_and_charges Link @@ -513,7 +501,7 @@ - 33 + 32 taxes Table @@ -534,7 +522,7 @@ - 34 + 33 other_charges_calculation HTML @@ -546,7 +534,7 @@ - 35 + 34 totals Section Break @@ -560,7 +548,7 @@ - 36 + 35 base_taxes_and_charges_added Currency @@ -574,7 +562,7 @@ - 37 + 36 base_taxes_and_charges_deducted Currency @@ -588,7 +576,7 @@ - 38 + 37 base_total_taxes_and_charges Currency @@ -602,7 +590,7 @@ - 39 + 38 column_break_37 Column Break @@ -614,7 +602,7 @@ - 40 + 39 taxes_and_charges_added Currency @@ -628,7 +616,7 @@ - 41 + 40 taxes_and_charges_deducted Currency @@ -642,7 +630,7 @@ - 42 + 41 total_taxes_and_charges Currency @@ -656,7 +644,7 @@ - 43 + 42 section_break_41 Section Break @@ -668,7 +656,7 @@ - 44 + 43 apply_discount_on Select @@ -684,7 +672,7 @@ Net Total - 45 + 44 column_break_43 Column Break @@ -696,7 +684,7 @@ Net Total - 46 + 45 discount_amount Currency @@ -710,7 +698,7 @@ Net Total - 47 + 46 base_discount_amount Currency @@ -724,7 +712,7 @@ Net Total - 48 + 47 section_break_46 Section Break @@ -736,7 +724,7 @@ Net Total - 49 + 48 base_grand_total Currency @@ -750,7 +738,7 @@ Net Total - 50 + 49 base_in_words Data @@ -762,7 +750,7 @@ Net Total - 51 + 50 base_rounded_total Currency @@ -776,7 +764,7 @@ Net Total - 52 + 51 column_break4 Column Break @@ -788,7 +776,7 @@ Net Total - 53 + 52 grand_total Currency @@ -802,7 +790,7 @@ Net Total - 54 + 53 in_words Data @@ -814,7 +802,7 @@ Net Total - 55 + 54 terms_section_break Section Break @@ -828,7 +816,7 @@ Net Total - 56 + 55 tc_name Link @@ -849,7 +837,7 @@ Net Total - 57 + 56 terms Text Editor @@ -861,7 +849,7 @@ Net Total - 58 + 57 contact_section Section Break @@ -875,7 +863,7 @@ Net Total - 59 + 58 supplier_address Link @@ -896,7 +884,7 @@ Net Total - 60 + 59 contact_person Link @@ -917,7 +905,7 @@ Net Total - 61 + 60 printing_settings Section Break @@ -929,7 +917,7 @@ Net Total - 62 + 61 select_print_heading Link @@ -950,7 +938,7 @@ Net Total - 63 + 62 letter_head Link @@ -971,7 +959,7 @@ Net Total - 64 + 63 more_info Section Break @@ -985,7 +973,7 @@ Net Total - 65 + 64 status Select @@ -1003,7 +991,7 @@ Cancelled - 66 + 65 is_subcontracted Select @@ -1019,7 +1007,7 @@ No - 67 + 66 column_break_57 Column Break @@ -1031,7 +1019,7 @@ No - 68 + 67 fiscal_year Link diff --git a/erpnext/docs/current/models/selling/customer.html b/erpnext/docs/current/models/selling/customer.html index 50587a74f3c..5e1326e7e25 100644 --- a/erpnext/docs/current/models/selling/customer.html +++ b/erpnext/docs/current/models/selling/customer.html @@ -244,44 +244,11 @@ Individual - - - - - 14 - column_break_14 - - Column Break - - - - - - - - - 15 - default_taxes_and_charges - - Link - - Default Taxes and Charges - - - - - - - -Sales Taxes and Charges Template - - - - 16 + 14 address_contacts Section Break @@ -295,7 +262,7 @@ Individual - 17 + 15 address_html HTML @@ -307,7 +274,7 @@ Individual - 18 + 16 column_break1 Column Break @@ -319,7 +286,7 @@ Individual - 19 + 17 contact_html HTML @@ -331,7 +298,7 @@ Individual - 20 + 18 default_receivable_accounts Section Break @@ -343,7 +310,7 @@ Individual - 21 + 19 accounts Table @@ -365,7 +332,7 @@ Individual - 22 + 20 column_break2 Section Break @@ -377,7 +344,7 @@ Individual - 23 + 21 credit_days_based_on Select @@ -393,7 +360,7 @@ Last Day of the Next Month - 24 + 22 credit_days Int @@ -405,7 +372,7 @@ Last Day of the Next Month - 25 + 23 credit_limit Currency @@ -417,7 +384,7 @@ Last Day of the Next Month - 26 + 24 more_info Section Break @@ -431,7 +398,7 @@ Last Day of the Next Month - 27 + 25 customer_details Text @@ -444,7 +411,7 @@ Last Day of the Next Month - 28 + 26 website Data @@ -456,7 +423,7 @@ Last Day of the Next Month - 29 + 27 sales_team_section_break Section Break @@ -470,7 +437,7 @@ Last Day of the Next Month - 30 + 28 default_sales_partner Link @@ -491,7 +458,7 @@ Last Day of the Next Month - 31 + 29 default_commission_rate Float @@ -503,7 +470,7 @@ Last Day of the Next Month - 32 + 30 sales_team_section Section Break @@ -515,7 +482,7 @@ Last Day of the Next Month - 33 + 31 sales_team Table @@ -536,7 +503,7 @@ Last Day of the Next Month - 34 + 32 communications Table diff --git a/erpnext/docs/current/models/selling/sales_order.html b/erpnext/docs/current/models/selling/sales_order.html index 708b37ad117..2c97687ffdb 100644 --- a/erpnext/docs/current/models/selling/sales_order.html +++ b/erpnext/docs/current/models/selling/sales_order.html @@ -1837,7 +1837,7 @@ Yearly update_delivery_status - (self, po_name) + (self)

    Update delivery status from Purchase Order for drop shipping

    diff --git a/erpnext/docs/current/models/stock/material_request.html b/erpnext/docs/current/models/stock/material_request.html index 2751fe81da3..c87b5c15a79 100644 --- a/erpnext/docs/current/models/stock/material_request.html +++ b/erpnext/docs/current/models/stock/material_request.html @@ -183,20 +183,8 @@ Material Issue - - 10 - get_items_from_product_bundle - - Button - - Get Items from Product Bundle - - - - - - 11 + 10 more_info Section Break @@ -210,7 +198,7 @@ Material Issue - 12 + 11 requested_by Data @@ -222,7 +210,7 @@ Material Issue - 13 + 12 transaction_date Date @@ -234,7 +222,7 @@ Material Issue - 14 + 13 column_break2 Column Break @@ -246,7 +234,7 @@ Material Issue - 15 + 14 status Select @@ -264,7 +252,7 @@ Cancelled - 16 + 15 per_ordered Percent @@ -276,7 +264,7 @@ Cancelled - 17 + 16 printing_details Section Break @@ -288,7 +276,7 @@ Cancelled - 18 + 17 letter_head Link @@ -309,7 +297,7 @@ Cancelled - 19 + 18 select_print_heading Link @@ -330,7 +318,7 @@ Cancelled - 20 + 19 terms_section_break Section Break @@ -344,7 +332,7 @@ Cancelled - 21 + 20 tc_name Link @@ -365,7 +353,7 @@ Cancelled - 22 + 21 terms Text Editor diff --git a/erpnext/docs/current/models/stock/purchase_receipt.html b/erpnext/docs/current/models/stock/purchase_receipt.html index 4dac156d89b..74816411cb7 100644 --- a/erpnext/docs/current/models/stock/purchase_receipt.html +++ b/erpnext/docs/current/models/stock/purchase_receipt.html @@ -417,20 +417,8 @@ PREC-RET- - - 27 - get_items_from_product_bundle - - Button - - Get Items from Product Bundle - - - - - - 28 + 27 section_break0 Section Break @@ -442,7 +430,7 @@ PREC-RET- - 29 + 28 base_total Currency @@ -456,7 +444,7 @@ PREC-RET- - 30 + 29 base_net_total Currency @@ -470,7 +458,7 @@ PREC-RET- - 31 + 30 column_break_27 Column Break @@ -482,7 +470,7 @@ PREC-RET- - 32 + 31 total Currency @@ -496,7 +484,7 @@ PREC-RET- - 33 + 32 net_total Currency @@ -510,7 +498,7 @@ PREC-RET- - 34 + 33 taxes_section Section Break @@ -525,7 +513,7 @@ PREC-RET- - 35 + 34 taxes_and_charges Link @@ -546,7 +534,7 @@ PREC-RET- - 36 + 35 taxes Table @@ -567,7 +555,7 @@ PREC-RET- - 37 + 36 other_charges_calculation HTML @@ -579,7 +567,7 @@ PREC-RET- - 38 + 37 totals Section Break @@ -593,7 +581,7 @@ PREC-RET- - 39 + 38 base_taxes_and_charges_added Currency @@ -607,7 +595,7 @@ PREC-RET- - 40 + 39 base_taxes_and_charges_deducted Currency @@ -621,7 +609,7 @@ PREC-RET- - 41 + 40 base_total_taxes_and_charges Currency @@ -635,7 +623,7 @@ PREC-RET- - 42 + 41 column_break3 Column Break @@ -647,7 +635,7 @@ PREC-RET- - 43 + 42 taxes_and_charges_added Currency @@ -661,7 +649,7 @@ PREC-RET- - 44 + 43 taxes_and_charges_deducted Currency @@ -675,7 +663,7 @@ PREC-RET- - 45 + 44 total_taxes_and_charges Currency @@ -689,7 +677,7 @@ PREC-RET- - 46 + 45 section_break_42 Section Break @@ -701,7 +689,7 @@ PREC-RET- - 47 + 46 apply_discount_on Select @@ -717,7 +705,7 @@ Net Total - 48 + 47 column_break_44 Column Break @@ -729,7 +717,7 @@ Net Total - 49 + 48 discount_amount Currency @@ -743,7 +731,7 @@ Net Total - 50 + 49 base_discount_amount Currency @@ -757,7 +745,7 @@ Net Total - 51 + 50 section_break_46 Section Break @@ -769,7 +757,7 @@ Net Total - 52 + 51 base_grand_total Currency @@ -783,7 +771,7 @@ Net Total - 53 + 52 base_in_words Data @@ -795,7 +783,7 @@ Net Total - 54 + 53 base_rounded_total Currency @@ -809,7 +797,7 @@ Net Total - 55 + 54 column_break_50 Column Break @@ -821,7 +809,7 @@ Net Total - 56 + 55 grand_total Currency @@ -835,7 +823,7 @@ Net Total - 57 + 56 in_words Data @@ -847,7 +835,7 @@ Net Total - 58 + 57 terms_section_break Section Break @@ -861,7 +849,7 @@ Net Total - 59 + 58 tc_name Link @@ -882,7 +870,7 @@ Net Total - 60 + 59 terms Text Editor @@ -894,7 +882,7 @@ Net Total - 61 + 60 contact_section Section Break @@ -908,7 +896,7 @@ Net Total - 62 + 61 supplier_address Link @@ -929,7 +917,7 @@ Net Total - 63 + 62 column_break_57 Column Break @@ -941,7 +929,7 @@ Net Total - 64 + 63 contact_person Link @@ -962,7 +950,7 @@ Net Total - 65 + 64 raw_material_details Section Break @@ -976,7 +964,7 @@ Net Total - 66 + 65 is_subcontracted Select @@ -991,7 +979,7 @@ Yes - 67 + 66 supplier_warehouse Link @@ -1012,7 +1000,7 @@ Yes - 68 + 67 supplied_items Table @@ -1033,7 +1021,7 @@ Yes - 69 + 68 bill_no Data @@ -1045,7 +1033,7 @@ Yes - 70 + 69 bill_date Date @@ -1057,7 +1045,7 @@ Yes - 71 + 70 more_info Section Break @@ -1071,7 +1059,7 @@ Yes - 72 + 71 status Select @@ -1089,7 +1077,7 @@ Closed - 73 + 72 rejected_warehouse Link @@ -1111,7 +1099,7 @@ Closed - 74 + 73 amended_from Link @@ -1132,7 +1120,7 @@ Closed - 75 + 74 range Data @@ -1144,7 +1132,7 @@ Closed - 76 + 75 column_break4 Column Break @@ -1156,7 +1144,7 @@ Closed - 77 + 76 company Link @@ -1177,7 +1165,7 @@ Closed - 78 + 77 fiscal_year Link @@ -1198,7 +1186,7 @@ Closed - 79 + 78 printing_settings Section Break @@ -1210,7 +1198,7 @@ Closed - 80 + 79 letter_head Link @@ -1231,7 +1219,7 @@ Closed - 81 + 80 select_print_heading Link @@ -1252,7 +1240,7 @@ Closed - 82 + 81 other_details HTML @@ -1264,7 +1252,7 @@ Closed - 83 + 82 instructions Small Text @@ -1276,7 +1264,7 @@ Closed - 84 + 83 remarks Small Text @@ -1288,7 +1276,7 @@ Closed - 85 + 84 transporter_info Section Break @@ -1302,7 +1290,7 @@ Closed - 86 + 85 transporter_name Data @@ -1314,7 +1302,7 @@ Closed - 87 + 86 column_break5 Column Break @@ -1326,7 +1314,7 @@ Closed - 88 + 87 lr_no Data @@ -1338,7 +1326,7 @@ Closed - 89 + 88 lr_date Date diff --git a/erpnext/docs/current/models/utilities/address.html b/erpnext/docs/current/models/utilities/address.html index 22c349e87be..d02b36a8049 100644 --- a/erpnext/docs/current/models/utilities/address.html +++ b/erpnext/docs/current/models/utilities/address.html @@ -412,6 +412,20 @@ Other +

    + + + __setup__ + (self) +

    +

    No docs

    +
    +
    + + + + +

    @@ -440,6 +454,20 @@ Other +

    + + + check_if_linked + (self) +

    +

    No docs

    +
    +
    + + + + +

    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; From c819fd4ee8981f438470b6b91026e08cac41c709 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Dec 2015 10:34:32 +0530 Subject: [PATCH 3/9] [translations] for #4461 --- .../manufacturing_settings.json | 33 +++++++++++++++++-- .../doctype/activity_type/activity_type.js | 2 +- 2 files changed, 32 insertions(+), 3 deletions(-) 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/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"); }); From a5cf8a86c15a64643cd63cc5007e4da597541ae2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Dec 2015 10:38:46 +0530 Subject: [PATCH 4/9] [minor] lang fixes for email digest --- erpnext/setup/doctype/email_digest/templates/default.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@
    - {{ n.key }} + {{ _(n.key) }} From 533aba02c5fddb754020fad8514cdcc3ae688cd1 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 10 Dec 2015 10:50:35 +0530 Subject: [PATCH 5/9] [fix] Payment days calculation in salary slip --- erpnext/hr/doctype/salary_slip/salary_slip.js | 2 +- erpnext/hr/doctype/salary_slip/salary_slip.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 From b3051ab84d919e424de8b1831436ce00ecf2c09b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 Dec 2015 11:46:20 +0530 Subject: [PATCH 6/9] [fix] validate that Item's website image is public --- erpnext/stock/doctype/item/item.js | 3 +++ erpnext/stock/doctype/item/item.py | 28 +++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index d712cc91a3b..55295f4c028 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -10,6 +10,9 @@ frappe.ui.form.on("Item", { frm.fields_dict["attributes"].grid.set_column_disp("attribute_value", true); } + // should never check Private + frm.fields_dict["website_image"].df.is_private = 0; + }, refresh: function(frm) { diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index dfd281a9aa9..6bdafcf3852 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -47,8 +47,6 @@ class Item(WebsiteGenerator): if not self.stock_uom: msgprint(_("Please enter default Unit of Measure"), raise_exception=1) - if self.image and not self.website_image: - self.website_image = self.image self.check_warehouse_is_set_for_stock_item() self.validate_uom() @@ -68,6 +66,7 @@ class Item(WebsiteGenerator): self.validate_has_variants() self.validate_attributes() self.validate_variant_attributes() + self.validate_website_image() self.make_thumbnail() if not self.get("__islocal"): @@ -83,6 +82,29 @@ class Item(WebsiteGenerator): self.update_variants() self.update_template_item() + def validate_website_image(self): + """Validate if the website image is a public file""" + auto_set_website_image = False + if not self.website_image and self.image: + auto_set_website_image = True + self.website_image = self.image + + file = frappe.db.get_value("File", filters={ + "file_url": self.website_image, + "attached_to_doctype": self.doctype, + "attached_to_name": self.name + }, fieldname=["name", "is_private"], as_dict=True) + + if not file: + self.website_image = None + if not auto_set_website_image: + frappe.msgprint(_("Website Image {0} attached to Item {1} cannot be found").format(self.website_image, self.name)) + + elif file.is_private: + self.website_image = None + if not auto_set_website_image: + frappe.msgprint(_("Website Image should be a public file or website URL")) + def make_thumbnail(self): """Make a thumbnail of `website_image`""" import requests.exceptions @@ -383,7 +405,7 @@ class Item(WebsiteGenerator): for d in self.get("reorder_levels"): if d.warehouse_reorder_level and not d.warehouse_reorder_qty: frappe.throw(_("Row #{0}: Please set reorder quantity").format(d.idx)) - + def validate_warehouse_for_reorder(self): warehouse = [] From 13ec41abb27ce77e66c9c5d938de9d48ea1b3e44 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Dec 2015 12:31:36 +0530 Subject: [PATCH 7/9] [enhancement] task status will be set to overdue when it crosses expected end date --- .../current/task_notification_change.md | 2 + erpnext/hooks.py | 3 +- erpnext/patches.txt | 1 + erpnext/patches/v6_12/__init__.py | 0 erpnext/patches/v6_12/set_overdue_tasks.py | 7 + erpnext/projects/doctype/task/task.js | 7 + erpnext/projects/doctype/task/task.json | 230 ++++++++++-------- erpnext/projects/doctype/task/task.py | 6 + erpnext/projects/doctype/task/task_list.js | 15 +- erpnext/projects/doctype/task/test_task.py | 17 +- erpnext/startup/notifications.py | 2 +- 11 files changed, 183 insertions(+), 107 deletions(-) create mode 100644 erpnext/change_log/current/task_notification_change.md create mode 100644 erpnext/patches/v6_12/__init__.py create mode 100644 erpnext/patches/v6_12/set_overdue_tasks.py diff --git a/erpnext/change_log/current/task_notification_change.md b/erpnext/change_log/current/task_notification_change.md new file mode 100644 index 00000000000..b6060f0aea9 --- /dev/null +++ b/erpnext/change_log/current/task_notification_change.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/hooks.py b/erpnext/hooks.py index bed3a914c73..4d7eda5ab2c 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -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/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_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/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/startup/notifications.py b/erpnext/startup/notifications.py index 4b5de233e5c..3acf63c5f07 100644 --- a/erpnext/startup/notifications.py +++ b/erpnext/startup/notifications.py @@ -8,7 +8,7 @@ def get_notification_config(): { "Issue": {"status": "Open"}, "Warranty Claim": {"status": "Open"}, - "Task": {"status": "Open"}, + "Task": {"status": "Overdue"}, "Project": {"status": "Open"}, "Lead": {"status": "Open"}, "Contact": {"status": "Open"}, From 360b057b0a34daa7e5cb1b5960161c8444bc17b4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 10 Dec 2015 14:37:28 +0530 Subject: [PATCH 8/9] [chnage-log] --- .../{current/task_notification_change.md => v6/v6_12_9.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename erpnext/change_log/{current/task_notification_change.md => v6/v6_12_9.md} (100%) diff --git a/erpnext/change_log/current/task_notification_change.md b/erpnext/change_log/v6/v6_12_9.md similarity index 100% rename from erpnext/change_log/current/task_notification_change.md rename to erpnext/change_log/v6/v6_12_9.md From 9cca3494c0a2430f9f28c3080ab09d017c96f0da Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 10 Dec 2015 15:11:02 +0600 Subject: [PATCH 9/9] bumped to version 6.12.9 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/hooks.py b/erpnext/hooks.py index 4d7eda5ab2c..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" diff --git a/setup.py b/setup.py index ddc29f8ca6b..d654a2f7a5e 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages from pip.req import parse_requirements -version = "6.12.8" +version = "6.12.9" requirements = parse_requirements("requirements.txt", session="") setup(