From bab078b4f57cfed49a5bb589d906663ba9e82a3e Mon Sep 17 00:00:00 2001 From: Anupam Date: Fri, 6 Nov 2020 12:05:45 +0530 Subject: [PATCH 1/8] fix: replaced formatdate -> format_date --- .../bank_and_cash_payment_voucher.html | 2 +- .../journal_auditing_voucher/journal_auditing_voucher.html | 2 +- .../payment_receipt_voucher/payment_receipt_voucher.html | 2 +- .../purchase_auditing_voucher/purchase_auditing_voucher.html | 4 ++-- .../sales_auditing_voucher/sales_auditing_voucher.html | 4 ++-- erpnext/templates/pages/material_request_info.html | 2 +- erpnext/templates/pages/order.html | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html index 6fe6999051..e588ed6609 100644 --- a/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html +++ b/erpnext/accounts/print_format/bank_and_cash_payment_voucher/bank_and_cash_payment_voucher.html @@ -19,7 +19,7 @@
- +
Date: {{ frappe.utils.formatdate(doc.creation) }}
Date: {{ frappe.utils.format_date(doc.creation) }}
diff --git a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html index 1351517981..0ca940f8bd 100644 --- a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html +++ b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html @@ -17,7 +17,7 @@
- +
Date: {{ frappe.utils.formatdate(doc.creation) }}
Date: {{ frappe.utils.format_date(doc.creation) }}
diff --git a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html index f2e65d3334..283d505e3b 100644 --- a/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html +++ b/erpnext/accounts/print_format/payment_receipt_voucher/payment_receipt_voucher.html @@ -5,7 +5,7 @@ {{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }} {%- for label, value in ( - (_("Received On"), frappe.utils.formatdate(doc.voucher_date)), + (_("Received On"), frappe.utils.format_date(doc.voucher_date)), (_("Received From"), doc.pay_to_recd_from), (_("Amount"), "" + doc.get_formatted("total_amount") + "
" + (doc.total_amount_in_words or "") + "
"), (_("Remarks"), doc.remark) diff --git a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html index a7c3bce0b4..043ac254ed 100644 --- a/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html +++ b/erpnext/accounts/print_format/purchase_auditing_voucher/purchase_auditing_voucher.html @@ -8,7 +8,7 @@
- + @@ -17,7 +17,7 @@
Supplier Name: {{ doc.supplier }}
Due Date: {{ frappe.utils.formatdate(doc.due_date) }}
Due Date: {{ frappe.utils.format_date(doc.due_date) }}
Address: {{doc.address_display}}
Contact: {{doc.contact_display}}
Mobile no: {{doc.contact_mobile}}
- +
Voucher No: {{ doc.name }}
Date: {{ frappe.utils.formatdate(doc.creation) }}
Date: {{ frappe.utils.format_date(doc.creation) }}
diff --git a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html index ef4ada14a3..a53b593a72 100644 --- a/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html +++ b/erpnext/accounts/print_format/sales_auditing_voucher/sales_auditing_voucher.html @@ -8,7 +8,7 @@
- + @@ -17,7 +17,7 @@
Customer Name: {{ doc.customer }}
Due Date: {{ frappe.utils.formatdate(doc.due_date) }}
Due Date: {{ frappe.utils.format_date(doc.due_date) }}
Address: {{doc.address_display}}
Contact: {{doc.contact_display}}
Mobile no: {{doc.contact_mobile}}
- +
Voucher No: {{ doc.name }}
Date: {{ frappe.utils.formatdate(doc.creation) }}
Date: {{ frappe.utils.format_date(doc.creation) }}
diff --git a/erpnext/templates/pages/material_request_info.html b/erpnext/templates/pages/material_request_info.html index 9d189895b6..c7a78027b1 100644 --- a/erpnext/templates/pages/material_request_info.html +++ b/erpnext/templates/pages/material_request_info.html @@ -25,7 +25,7 @@
- {{ frappe.utils.formatdate(doc.transaction_date, 'medium') }} + {{ frappe.utils.format_date(doc.transaction_date, 'medium') }}
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 9e3c58b45b..ef82924f20 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -39,10 +39,10 @@
- {{ frappe.utils.formatdate(doc.transaction_date, 'medium') }} + {{ frappe.utils.format_date(doc.transaction_date, 'medium') }} {% if doc.valid_till %}

- {{ _("Valid Till") }}: {{ frappe.utils.formatdate(doc.valid_till, 'medium') }} + {{ _("Valid Till") }}: {{ frappe.utils.format_date(doc.valid_till, 'medium') }}

{% endif %}
From 886b680e1b050548aabeacf8aac4833ced60aa35 Mon Sep 17 00:00:00 2001 From: Anupam Date: Fri, 6 Nov 2020 16:48:39 +0530 Subject: [PATCH 2/8] revert changes --- .../controllers/website_list_for_contact.py | 2 +- erpnext/crm/doctype/parameter/__init__.py | 0 erpnext/crm/doctype/parameter/parameter.js | 8 +++ erpnext/crm/doctype/parameter/parameter.json | 56 +++++++++++++++++++ erpnext/crm/doctype/parameter/parameter.py | 10 ++++ .../crm/doctype/parameter/test_parameter.py | 10 ++++ erpnext/shopping_cart/cart.py | 4 +- .../shopping_cart_settings.json | 9 +-- .../templates/includes/transaction_row.html | 6 +- erpnext/templates/pages/order.html | 31 +++++----- 10 files changed, 104 insertions(+), 32 deletions(-) create mode 100644 erpnext/crm/doctype/parameter/__init__.py create mode 100644 erpnext/crm/doctype/parameter/parameter.js create mode 100644 erpnext/crm/doctype/parameter/parameter.json create mode 100644 erpnext/crm/doctype/parameter/parameter.py create mode 100644 erpnext/crm/doctype/parameter/test_parameter.py diff --git a/erpnext/controllers/website_list_for_contact.py b/erpnext/controllers/website_list_for_contact.py index 801c405732..ecf041efd1 100644 --- a/erpnext/controllers/website_list_for_contact.py +++ b/erpnext/controllers/website_list_for_contact.py @@ -25,7 +25,7 @@ def get_transaction_list(doctype, txt=None, filters=None, limit_start=0, limit_p if not filters: filters = [] - if doctype in ['Supplier Quotation', 'Purchase Invoice', 'Quotation']: + if doctype in ['Supplier Quotation', 'Purchase Invoice']: filters.append((doctype, 'docstatus', '<', 2)) else: filters.append((doctype, 'docstatus', '=', 1)) diff --git a/erpnext/crm/doctype/parameter/__init__.py b/erpnext/crm/doctype/parameter/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/crm/doctype/parameter/parameter.js b/erpnext/crm/doctype/parameter/parameter.js new file mode 100644 index 0000000000..0a2b13be5e --- /dev/null +++ b/erpnext/crm/doctype/parameter/parameter.js @@ -0,0 +1,8 @@ +// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Parameter', { + // refresh: function(frm) { + + // } +}); diff --git a/erpnext/crm/doctype/parameter/parameter.json b/erpnext/crm/doctype/parameter/parameter.json new file mode 100644 index 0000000000..7b2eb3edfc --- /dev/null +++ b/erpnext/crm/doctype/parameter/parameter.json @@ -0,0 +1,56 @@ +{ + "actions": [], + "creation": "2020-11-02 16:04:08.280141", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "parameter_name", + "value_based", + "uom" + ], + "fields": [ + { + "fieldname": "parameter_name", + "fieldtype": "Data", + "label": "Parameter Name" + }, + { + "default": "0", + "fieldname": "value_based", + "fieldtype": "Check", + "label": "Value Based" + }, + { + "fieldname": "uom", + "fieldtype": "Link", + "label": "UOM", + "options": "UOM" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2020-11-02 16:04:08.280141", + "modified_by": "Administrator", + "module": "CRM", + "name": "Parameter", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/crm/doctype/parameter/parameter.py b/erpnext/crm/doctype/parameter/parameter.py new file mode 100644 index 0000000000..9943bc45b9 --- /dev/null +++ b/erpnext/crm/doctype/parameter/parameter.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class Parameter(Document): + pass diff --git a/erpnext/crm/doctype/parameter/test_parameter.py b/erpnext/crm/doctype/parameter/test_parameter.py new file mode 100644 index 0000000000..80bb8652c0 --- /dev/null +++ b/erpnext/crm/doctype/parameter/test_parameter.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestParameter(unittest.TestCase): + pass diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index 0ccc0252c3..a7e8388be9 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -96,9 +96,7 @@ def place_order(): def request_for_quotation(): quotation = _get_cart_quotation() quotation.flags.ignore_permissions = True - quotation.save() - if not get_shopping_cart_settings().save_quotations_as_draft: - quotation.submit() + quotation.submit() return quotation.name @frappe.whitelist() diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json index 9d61e7d0ec..98a7eeda23 100644 --- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json +++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.json @@ -167,20 +167,13 @@ "fieldname": "enable_variants", "fieldtype": "Check", "label": "Enable Variants" - }, - { - "default": "0", - "depends_on": "eval: doc.enable_checkout == 0", - "fieldname": "save_quotations_as_draft", - "fieldtype": "Check", - "label": "Save Quotations as Draft" } ], "icon": "fa fa-shopping-cart", "idx": 1, "issingle": 1, "links": [], - "modified": "2020-09-24 16:28:07.192525", + "modified": "2020-08-02 18:21:43.873303", "modified_by": "Administrator", "module": "Shopping Cart", "name": "Shopping Cart Settings", diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index fd4835ed99..80a542f74b 100644 --- a/erpnext/templates/includes/transaction_row.html +++ b/erpnext/templates/includes/transaction_row.html @@ -14,11 +14,7 @@
- {% if doc.doctype == "Quotation" and not doc.docstatus %} - {{ _("Pending") }} - {% else %} - {{ doc.get_formatted("grand_total") }} - {% endif %} + {{ doc.get_formatted("grand_total") }}
Link diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index af7af11677..896954a287 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -12,21 +12,22 @@ {% endblock %} {% block header_actions %} - + + {% endblock %} {% block page_content %} From 14ef229b126a24b8ac9bd6c0dc74456513a2921c Mon Sep 17 00:00:00 2001 From: Anupam Date: Fri, 6 Nov 2020 16:50:15 +0530 Subject: [PATCH 3/8] Revert "Update item_add_to_cart.html" This reverts commit 5b3af82e75f60aeb9f9a9c8a4523ab8a5c1e273b. --- erpnext/templates/generators/item/item_add_to_cart.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/generators/item/item_add_to_cart.html b/erpnext/templates/generators/item/item_add_to_cart.html index dbf15de1e4..c619963a91 100644 --- a/erpnext/templates/generators/item/item_add_to_cart.html +++ b/erpnext/templates/generators/item/item_add_to_cart.html @@ -11,7 +11,7 @@ ({{ product_info.price.formatted_price }} / {{ product_info.uom }}) {% else %} - {{ _("Unit of Measurement") }} : {{ product_info.uom }} + {{ _("UOM") }} : {{ product_info.uom }} {% endif %} {% if cart_settings.show_stock_availability %} From ec7002625f35dbd177a4bd36f8c9aa030ddfcdf9 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Fri, 6 Nov 2020 17:11:33 +0530 Subject: [PATCH 4/8] Delete __init__.py --- erpnext/crm/doctype/parameter/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 erpnext/crm/doctype/parameter/__init__.py diff --git a/erpnext/crm/doctype/parameter/__init__.py b/erpnext/crm/doctype/parameter/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 From b4bad63e2594e0dd9dc1bd1c20a3e2c6e2da59a5 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Fri, 6 Nov 2020 17:11:47 +0530 Subject: [PATCH 5/8] Delete parameter.js --- erpnext/crm/doctype/parameter/parameter.js | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 erpnext/crm/doctype/parameter/parameter.js diff --git a/erpnext/crm/doctype/parameter/parameter.js b/erpnext/crm/doctype/parameter/parameter.js deleted file mode 100644 index 0a2b13be5e..0000000000 --- a/erpnext/crm/doctype/parameter/parameter.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Parameter', { - // refresh: function(frm) { - - // } -}); From c7f8204997c1050fb7a2f588b002ea1eef6660e8 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Fri, 6 Nov 2020 17:12:21 +0530 Subject: [PATCH 6/8] Delete parameter.json --- erpnext/crm/doctype/parameter/parameter.json | 56 -------------------- 1 file changed, 56 deletions(-) delete mode 100644 erpnext/crm/doctype/parameter/parameter.json diff --git a/erpnext/crm/doctype/parameter/parameter.json b/erpnext/crm/doctype/parameter/parameter.json deleted file mode 100644 index 7b2eb3edfc..0000000000 --- a/erpnext/crm/doctype/parameter/parameter.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "actions": [], - "creation": "2020-11-02 16:04:08.280141", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "parameter_name", - "value_based", - "uom" - ], - "fields": [ - { - "fieldname": "parameter_name", - "fieldtype": "Data", - "label": "Parameter Name" - }, - { - "default": "0", - "fieldname": "value_based", - "fieldtype": "Check", - "label": "Value Based" - }, - { - "fieldname": "uom", - "fieldtype": "Link", - "label": "UOM", - "options": "UOM" - } - ], - "index_web_pages_for_search": 1, - "links": [], - "modified": "2020-11-02 16:04:08.280141", - "modified_by": "Administrator", - "module": "CRM", - "name": "Parameter", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file From a739554b7da312fd015818cbcd71816d1ad00cad Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Fri, 6 Nov 2020 17:12:44 +0530 Subject: [PATCH 7/8] Delete parameter.py --- erpnext/crm/doctype/parameter/parameter.py | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 erpnext/crm/doctype/parameter/parameter.py diff --git a/erpnext/crm/doctype/parameter/parameter.py b/erpnext/crm/doctype/parameter/parameter.py deleted file mode 100644 index 9943bc45b9..0000000000 --- a/erpnext/crm/doctype/parameter/parameter.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -# import frappe -from frappe.model.document import Document - -class Parameter(Document): - pass From bdb8a4023a8e50d5a77f8e9c30e03805c4c6ba0f Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Fri, 6 Nov 2020 17:13:02 +0530 Subject: [PATCH 8/8] Delete test_parameter.py --- erpnext/crm/doctype/parameter/test_parameter.py | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 erpnext/crm/doctype/parameter/test_parameter.py diff --git a/erpnext/crm/doctype/parameter/test_parameter.py b/erpnext/crm/doctype/parameter/test_parameter.py deleted file mode 100644 index 80bb8652c0..0000000000 --- a/erpnext/crm/doctype/parameter/test_parameter.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt -from __future__ import unicode_literals - -# import frappe -import unittest - -class TestParameter(unittest.TestCase): - pass