From d48b2ac1265e816661bb2b3ee04e81b876154689 Mon Sep 17 00:00:00 2001 From: Himanshu Warekar Date: Wed, 26 Jun 2019 11:37:49 +0530 Subject: [PATCH 1/6] fix: attendance gantt fix --- erpnext/hr/doctype/attendance/attendance_calendar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/attendance/attendance_calendar.js b/erpnext/hr/doctype/attendance/attendance_calendar.js index b21afe5eaee..104f09d69ff 100644 --- a/erpnext/hr/doctype/attendance/attendance_calendar.js +++ b/erpnext/hr/doctype/attendance/attendance_calendar.js @@ -2,8 +2,8 @@ // For license information, please see license.txt frappe.views.calendar["Attendance"] = { field_map: { - "start": "date", - "end": "date", + "start": "attendance_date", + "end": "attendance_date", "id": "name", "docstatus": 1 }, From fbc861320fa3f5f248aa34728b6f09f57ffa395f Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 26 Jun 2019 13:31:31 +0530 Subject: [PATCH 2/6] fix: Don't append None values in against_account (#18031) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 503f4f4dbc4..e166fa22e8b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -485,7 +485,7 @@ class SalesInvoice(SellingController): """Set against account for debit to account""" against_acc = [] for d in self.get('items'): - if d.income_account not in against_acc: + if d.income_account and d.income_account not in against_acc: against_acc.append(d.income_account) self.against_income_account = ','.join(against_acc) From 2ab8d3ebcc95d5579dcfd5e8280ef2c72ad04a83 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 26 Jun 2019 13:32:41 +0530 Subject: [PATCH 3/6] fix: Move links to appropriate section (#17999) * fix: Move links to appropriate section * fix: New section Accounting Entries --- erpnext/config/accounting.py | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/erpnext/config/accounting.py b/erpnext/config/accounting.py index 0ab1f52e297..9a9ee7e963e 100644 --- a/erpnext/config/accounting.py +++ b/erpnext/config/accounting.py @@ -40,17 +40,6 @@ def get_data(): "description": _("Tree of financial accounts."), "onboard": 1, }, - { - "type": "doctype", - "name": "Journal Entry", - "description": _("Accounting journal entries."), - "onboard": 1, - }, - { - "type": "doctype", - "name": "Opening Invoice Creation Tool", - "description": _("Create Opening Sales and Purchase Invoices") - }, ] }, { @@ -73,11 +62,6 @@ def get_data(): "name": "Payment Request", "description": _("Payment Request"), }, - { - "type": "doctype", - "name": "Payment Entry", - "description": _("Bank/Cash transactions against party or for internal transfer") - }, { "type": "doctype", "name": "Payment Term", @@ -179,6 +163,26 @@ def get_data(): "name": "Accounting Dimension", "description": _("Setup custom dimensions for accounting") }, + { + "type": "doctype", + "name": "Opening Invoice Creation Tool", + "description": _("Create Opening Sales and Purchase Invoices") + }, + ] + }, + { + "label": _("Accounting Entries"), + "items": [ + { + "type": "doctype", + "name": "Payment Entry", + "description": _("Bank/Cash transactions against party or for internal transfer") + }, + { + "type": "doctype", + "name": "Journal Entry", + "description": _("Accounting journal entries.") + }, ] }, { From 387ee8f5118f77e4e497b2542e1c86737e819484 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 26 Jun 2019 13:40:27 +0530 Subject: [PATCH 4/6] fix: returned qty issue while making sales invoice from dn if same item added multiple times (#18076) --- erpnext/stock/doctype/delivery_note/delivery_note.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index f54991b9205..863a8109f8c 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -448,7 +448,12 @@ def make_sales_invoice(source_name, target_doc=None): def get_pending_qty(item_row): pending_qty = item_row.qty - invoiced_qty_map.get(item_row.name, 0) - returned_qty = flt(returned_qty_map.get(item_row.item_code, 0)) + + returned_qty = 0 + if returned_qty_map.get(item_row.item_code) > 0: + returned_qty = flt(returned_qty_map.get(item_row.item_code, 0)) + returned_qty_map[item_row.item_code] -= pending_qty + if returned_qty: if returned_qty >= pending_qty: pending_qty = 0 @@ -456,6 +461,7 @@ def make_sales_invoice(source_name, target_doc=None): else: pending_qty -= returned_qty returned_qty = 0 + return pending_qty, returned_qty doc = get_mapped_doc("Delivery Note", source_name, { From 51c600696e28d76dac6f6ec7ae64ebe3e567f516 Mon Sep 17 00:00:00 2001 From: Karthikeyan S Date: Wed, 26 Jun 2019 13:41:00 +0530 Subject: [PATCH 5/6] fix(README): broken link to 'Report Security Vulnerabilities' (#18063) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf3804f830e..64f8d67d8e8 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ The ERPNext code is licensed as GNU General Public License (v3) and the Document ## Contributing 1. [Issue Guidelines](https://github.com/frappe/erpnext/wiki/Issue-Guidelines) -1. [Report Security Vulnerabilities](https://erpnext.com/report) +1. [Report Security Vulnerabilities](https://erpnext.com/security) 1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines) 1. [Translations](https://translate.erpnext.com) 1. [Chart of Accounts](https://charts.erpnext.com) From 48535e95e675d844f0dd3dfaf155ce53fb182f21 Mon Sep 17 00:00:00 2001 From: Karthikeyan S Date: Wed, 26 Jun 2019 13:41:49 +0530 Subject: [PATCH 6/6] Fix(integrations): Adding Error Logs for Woocommerce (#18061) (cherry picked from commit ae255d6328b70b148d28d9a88a695932656bf276) --- .../connectors/woocommerce_connection.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py index 4700202213f..0b6ea8cc7ca 100644 --- a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py +++ b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py @@ -22,7 +22,16 @@ def verify_request(): frappe.set_user(woocommerce_settings.creation_user) @frappe.whitelist(allow_guest=True) -def order(): +def order(*args, **kwargs): + try: + _order(*args, **kwargs) + except Exception: + error_message = frappe.get_traceback()+"\n\n Request Data: \n"+json.loads(frappe.request.data).__str__() + frappe.log_error(error_message, "WooCommerce Error") + raise + + +def _order(*args, **kwargs): woocommerce_settings = frappe.get_doc("Woocommerce Settings") if frappe.flags.woocomm_test_order_data: fd = frappe.flags.woocomm_test_order_data