Merge pull request #6933 from rohitwaghchaure/remove_no_copy
disable no copy for po number, po date on sales order
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 1eee360..10f6570 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-__version__ = '7.1.10'
+__version__ = '7.1.11'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
index 968ce29..437d695 100644
--- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
+++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
@@ -31,6 +31,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -58,6 +59,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -84,6 +86,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -109,6 +112,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -119,7 +123,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 0,
+ "columns": 2,
"fieldname": "total_amount",
"fieldtype": "Float",
"hidden": 0,
@@ -135,6 +139,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -145,7 +150,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 3,
+ "columns": 2,
"fieldname": "outstanding_amount",
"fieldtype": "Float",
"hidden": 0,
@@ -161,6 +166,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -171,7 +177,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 3,
+ "columns": 2,
"fieldname": "allocated_amount",
"fieldtype": "Float",
"hidden": 0,
@@ -187,6 +193,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -213,6 +220,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -230,7 +238,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-08-26 01:59:04.697274",
+ "modified": "2016-11-14 12:28:51.822341",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Reference",
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
index d4a82c5..6141db5 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
@@ -4,7 +4,6 @@
return {
'fieldname': 'purchase_invoice',
'non_standard_fieldnames': {
- 'Delivery Note': 'against_sales_invoice',
'Journal Entry': 'reference_name',
'Payment Entry': 'reference_name',
'Payment Request': 'reference_name',
@@ -12,8 +11,8 @@
'Purchase Invoice': 'return_against'
},
'internal_links': {
- 'Purchase Order': ['items', 'sales_order'],
- 'Purchase Receipt': ['items', 'delivery_note'],
+ 'Purchase Order': ['items', 'purchase_order'],
+ 'Purchase Receipt': ['items', 'purchase_receipt'],
},
'transactions': [
{
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index f6e1629..6d1e168 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -88,6 +88,9 @@
future_vouchers = self.get_entries_after(self.filters.report_date, args.get("party_type"))
+ if not self.filters.get("company"):
+ self.filters["company"] = frappe.db.get_single_value('Global Defaults', 'default_company')
+
company_currency = frappe.db.get_value("Company", self.filters.get("company"), "default_currency")
data = []
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 2f1169d..21fba7b 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -23,20 +23,19 @@
refresh: function(frm) {
var doc = frm.doc;
frm.events.enquiry_from(frm);
-
if(doc.status!=="Lost") {
if(doc.with_items){
frm.add_custom_button(__('Supplier Quotation'),
function() {
frm.trigger("make_supplier_quotation")
}, __("Make"));
-
- frm.add_custom_button(__('Quotation'),
- cur_frm.cscript.create_quotation, __("Make"));
-
- frm.page.set_inner_btn_group_as_primary(__("Make"));
}
+ frm.add_custom_button(__('Quotation'),
+ cur_frm.cscript.create_quotation, __("Make"));
+
+ frm.page.set_inner_btn_group_as_primary(__("Make"));
+
if(doc.status!=="Quotation") {
frm.add_custom_button(__('Lost'),
cur_frm.cscript['Declare Opportunity Lost']);
@@ -61,9 +60,10 @@
this.frm.doc.enquiry_from = "Lead";
if(!this.frm.doc.status)
- set_multiple(cdt, cdn, { status:'Draft' });
+ set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
- set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("Company") });
+ set_multiple(this.frm.doc.doctype, this.frm.doc.name,
+ { company:frappe.defaults.get_user_default("Company") });
this.setup_queries();
},
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index 8bd3a23..6be0768 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -39,6 +39,9 @@
if not self.title:
self.title = self.customer_name
+
+ if not self.with_items:
+ self.items = []
def make_new_lead_if_required(self):
diff --git a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json
index 3d2b251..4749800 100644
--- a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json
+++ b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.json
@@ -1,7 +1,7 @@
{
"allow_copy": 0,
"allow_import": 1,
- "allow_rename": 0,
+ "allow_rename": 1,
"autoname": "field:expense_type",
"beta": 0,
"creation": "2012-03-27 14:35:55",
@@ -10,11 +10,13 @@
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 0,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "expense_type",
"fieldtype": "Data",
"hidden": 0,
@@ -41,6 +43,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": 0,
@@ -68,6 +71,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "accounts",
"fieldtype": "Table",
"hidden": 0,
@@ -102,7 +106,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-18 12:36:10.096252",
+ "modified": "2016-11-07 11:54:10.936716",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim Type",
@@ -118,6 +122,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -138,6 +143,7 @@
"export": 0,
"if_owner": 0,
"import": 0,
+ "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
diff --git a/erpnext/patches/v7_1/set_prefered_contact_email.py b/erpnext/patches/v7_1/set_prefered_contact_email.py
index d662e0d..d083811 100644
--- a/erpnext/patches/v7_1/set_prefered_contact_email.py
+++ b/erpnext/patches/v7_1/set_prefered_contact_email.py
@@ -14,6 +14,4 @@
employee.prefered_contact_email = "User ID"
employee.prefered_email = employee.user_id
- employee.flags.ignore_mandatory = True
- employee.flags.ignore_validate = True
- employee.save()
\ No newline at end of file
+ employee.db_update()
\ No newline at end of file
diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css
index 2bfcd3e..6a1d311 100644
--- a/erpnext/public/css/website.css
+++ b/erpnext/public/css/website.css
@@ -181,7 +181,6 @@
}
.cart-dropdown-container .cart-items-dropdown {
max-height: 350px;
- overflow: auto;
}
.cart-dropdown-container .cart-items-dropdown .cart-dropdown {
display: block;
diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js
index ace7fd8..1617283 100644
--- a/erpnext/public/js/shopping_cart.js
+++ b/erpnext/public/js/shopping_cart.js
@@ -65,7 +65,7 @@
var cart_count = getCookie("cart_count");
if(cart_count) {
- $(".shopping-cart").toggleClass('hidden', true);
+ $(".shopping-cart").toggleClass('hidden', false);
}
var $cart = $('.cart-icon');
diff --git a/erpnext/public/less/website.less b/erpnext/public/less/website.less
index ce36e5f..b270b8b 100644
--- a/erpnext/public/less/website.less
+++ b/erpnext/public/less/website.less
@@ -233,7 +233,6 @@
.cart-items-dropdown {
max-height: 350px;
- overflow: auto;
}
.cart-items-dropdown .cart-dropdown {
diff --git a/erpnext/schools/doctype/student/student_dashboard.py b/erpnext/schools/doctype/student/student_dashboard.py
index 6d95168..55faffb 100644
--- a/erpnext/schools/doctype/student/student_dashboard.py
+++ b/erpnext/schools/doctype/student/student_dashboard.py
@@ -10,7 +10,7 @@
'items': ['Student Log', 'Student Group', 'Student Attendance']
},
{
- 'items': ['Program Enrollment', 'Fees', 'Assessment', 'Guardian']
+ 'items': ['Program Enrollment', 'Fees', 'Assessment']
}
]
}
\ No newline at end of file
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index 66000cd..646aef1 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -68,7 +68,7 @@
frappe.message_log.pop()
pass
-
+
def create_fiscal_year_and_company(args):
if (args.get('fy_start_date')):
curr_fiscal_year = get_fy_details(args.get('fy_start_date'), args.get('fy_end_date'))
@@ -244,12 +244,12 @@
else:
fy = cstr(start_year) + '-' + cstr(start_year + 1)
return fy
-
+
def create_sales_tax(args):
country_wise_tax = get_country_wise_tax(args.get("country"))
if country_wise_tax and len(country_wise_tax) > 0:
for sales_tax, tax_data in country_wise_tax.items():
- make_tax_account_and_template(args.get("company_name").strip(),
+ make_tax_account_and_template(args.get("company_name").strip(),
tax_data.get('account_name'), tax_data.get('tax_rate'), sales_tax)
def get_country_wise_tax(country):
@@ -267,7 +267,7 @@
account_name = args.get("tax_" + str(i))
make_tax_account_and_template(args.get("company_name").strip(), account_name, tax_rate)
-
+
def make_tax_account_and_template(company, account_name, tax_rate, template_name=None):
try:
account = make_tax_account(company, account_name, tax_rate)
@@ -280,14 +280,14 @@
raise
except RootNotEditable, e:
pass
-
+
def get_tax_account_group(company):
- tax_group = frappe.db.get_value("Account",
+ tax_group = frappe.db.get_value("Account",
{"account_name": "Duties and Taxes", "is_group": 1, "company": company})
if not tax_group:
- tax_group = frappe.db.get_value("Account", {"is_group": 1, "root_type": "Liability",
+ tax_group = frappe.db.get_value("Account", {"is_group": 1, "root_type": "Liability",
"account_type": "Tax", "company": company})
-
+
return tax_group
def make_tax_account(company, account_name, tax_rate):
@@ -308,7 +308,7 @@
def make_sales_and_purchase_tax_templates(account, template_name=None):
if not template_name:
template_name = account.name
-
+
sales_tax_template = {
"doctype": "Sales Taxes and Charges Template",
"title": template_name,
@@ -548,35 +548,50 @@
academic_term = frappe.new_doc("Academic Term")
academic_term.academic_year = y
academic_term.term_name = t
- academic_term.save()
+ try:
+ academic_term.save()
+ except frappe.DuplicateEntryError:
+ pass
def create_academic_year():
ac = ["2013-14", "2014-15", "2015-16", "2016-17", "2017-18"]
for d in ac:
academic_year = frappe.new_doc("Academic Year")
academic_year.academic_year_name = d
- academic_year.save()
+ try:
+ academic_year.save()
+ except frappe.DuplicateEntryError:
+ pass
def create_program(args):
for i in xrange(1,6):
if args.get("program_" + str(i)):
program = frappe.new_doc("Program")
program.program_name = args.get("program_" + str(i))
- program.save()
+ try:
+ program.save()
+ except frappe.DuplicateEntryError:
+ pass
def create_course(args):
for i in xrange(1,6):
if args.get("course_" + str(i)):
course = frappe.new_doc("Course")
course.course_name = args.get("course_" + str(i))
- course.save()
+ try:
+ course.save()
+ except frappe.DuplicateEntryError:
+ pass
def create_instructor(args):
for i in xrange(1,6):
if args.get("instructor_" + str(i)):
instructor = frappe.new_doc("Instructor")
instructor.instructor_name = args.get("instructor_" + str(i))
- instructor.save()
+ try:
+ instructor.save()
+ except frappe.DuplicateEntryError:
+ pass
def create_room(args):
for i in xrange(1,6):
@@ -584,6 +599,9 @@
room = frappe.new_doc("Room")
room.room_name = args.get("room_" + str(i))
room.seating_capacity = args.get("room_capacity_" + str(i))
- room.save()
+ try:
+ room.save()
+ except frappe.DuplicateEntryError:
+ pass
diff --git a/erpnext/templates/generators/item.html b/erpnext/templates/generators/item.html
index 5a8116c..c0399a7 100644
--- a/erpnext/templates/generators/item.html
+++ b/erpnext/templates/generators/item.html
@@ -3,7 +3,7 @@
{% block title %} {{ title }} {% endblock %}
{% block breadcrumbs %}
- {% include "templates/includes/breadcrumbs.html" %}
+ {% include "templates/includes/breadcrumbs.html" %}
{% endblock %}
{% block page_content %}
@@ -25,17 +25,17 @@
{{ _("Item Code") }}: <span itemprop="productID">{{ variant and variant.name or name }}</span></p>
<br>
<div class="item-attribute-selectors">
- {% if has_variants %}
- {% for d in attributes %}
+ {% if has_variants %}
+ {% for d in attributes %}
{% if attribute_values[d.attribute] -%}
- <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
- style="margin-bottom: 10px;">
- <h6 class="text-muted">{{ _(d.attribute) }}</h6>
- <select class="form-control"
- style="max-width: 140px"
- data-attribute="{{ d.attribute }}">
+ <div class="item-view-attribute {% if (attribute_values[d.attribute] | len)==1 -%} hidden {%- endif %}"
+ style="margin-bottom: 10px;">
+ <h6 class="text-muted">{{ _(d.attribute) }}</h6>
+ <select class="form-control"
+ style="max-width: 140px"
+ data-attribute="{{ d.attribute }}">
{% for value in attribute_values[d.attribute] %}
- <option value="{{ value }}"
+ <option value="{{ value }}"
{% if selected_attributes and selected_attributes[d.attribute]==value -%}
selected
{%- elif disabled_attributes and value in disabled_attributes.get(d.attribute, []) -%}
@@ -43,12 +43,12 @@
{%- endif %}>
{{ _(value) }}
</option>
- {% endfor %}
- </select>
- </div>
+ {% endfor %}
+ </select>
+ </div>
{%- endif %}
- {% endfor %}
- {% endif %}
+ {% endfor %}
+ {% endif %}
</div>
<br>
<div style="min-height: 100px; margin: 10px 0;">
@@ -56,18 +56,17 @@
<h4 class="item-price" itemprop="price"></h4>
<div class="item-stock" itemprop="availability"></div>
</div>
- <div class="item-cart hide">
- <div id="item-add-to-cart">
- <button class="btn btn-primary btn-sm">
- {{ _("Add to Cart") }}</button>
- </div>
- <div id="item-update-cart"
- style="display: none;
- padding-left: 0px; padding-right: 0px;
- padding-top: 10px;">
- <a href="/cart">{{ _("Goto Cart") }}</a>
- </div>
- </div>
+ <div class="item-cart hide">
+ <div id="item-add-to-cart">
+ <button class="btn btn-primary btn-sm">
+ {{ _("Add to Cart") }}</button>
+ </div>
+ <div id="item-update-cart" style="display: none;">
+ <a href="/cart" class='btn btn-sm btn-default'>
+ <i class='octicon octicon-check'></i>
+ {{ _("View in Cart") }}</a>
+ </div>
+ </div>
</div>
</div>
</div>
@@ -101,10 +100,10 @@
<script>
{% include "templates/includes/product_page.js" %}
- {% if variant_info %}
- window.variant_info = {{ variant_info }};
- {% else %}
- window.variant_info = null;
- {% endif %}
+ {% if variant_info %}
+ window.variant_info = {{ variant_info }};
+ {% else %}
+ window.variant_info = null;
+ {% endif %}
</script>
{% endblock %}
diff --git a/erpnext/templates/includes/cart/cart_dropdown.html b/erpnext/templates/includes/cart/cart_dropdown.html
index 071b281..de29b56 100644
--- a/erpnext/templates/includes/cart/cart_dropdown.html
+++ b/erpnext/templates/includes/cart/cart_dropdown.html
@@ -1,6 +1,6 @@
<div class="cart-dropdown-container">
<div id="cart-error" class="alert alert-danger"
- style="display: none;"></div>
+ style="display: none;"></div>
<div class="row cart-items-dropdown cart-item-header text-muted">
<div class="col-sm-6 col-xs-6 h6 text-uppercase">
{{ _("Item") }}
@@ -9,13 +9,13 @@
{{ _("Price") }}
</div>
</div>
-
+
{% if doc.items %}
<div class="cart-items-dropdown">
{% include "templates/includes/cart/cart_items_dropdown.html" %}
</div>
<div class="checkout-btn">
- <a href="/cart" class="btn btn-block btn-primary">{{ _("Checkout") }}</a>
+ <a href="/cart" class="btn btn-block btn-primary">{{ _("Checkout") }}</a>
</div>
{% else %}
<p>{{ _("Cart is Empty") }}</p>
diff --git a/erpnext/templates/includes/cart/cart_items_dropdown.html b/erpnext/templates/includes/cart/cart_items_dropdown.html
index 9a3dbf8..b2ba431 100644
--- a/erpnext/templates/includes/cart/cart_items_dropdown.html
+++ b/erpnext/templates/includes/cart/cart_items_dropdown.html
@@ -7,7 +7,6 @@
</div>
<div class="col-sm-4 col-xs-4 text-right col-amount">
{{ d.get_formatted("amount") }}
-
</div>
</div>
{% endfor %}
\ No newline at end of file
diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html
index da21748..a25f313 100644
--- a/erpnext/templates/includes/macros.html
+++ b/erpnext/templates/includes/macros.html
@@ -1,7 +1,12 @@
{% macro product_image_square(website_image, css_class="") %}
-{% if website_image -%} <meta itemprop="image" content="{{ frappe.utils.quoted(website_image) | abs_url }}"></meta>{%- endif %}
-<div class="product-image product-image-square {% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
- {% if website_image -%} style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');" {%- endif %}>
+{% if website_image -%}
+ <meta itemprop="image" content="{{ frappe.utils.quoted(website_image) | abs_url }}"></meta>
+{%- endif %}
+<div class="product-image product-image-square
+ {% if not website_image -%} missing-image {%- endif %} {{ css_class }}"
+ {% if website_image -%}
+ style="background-image: url('{{ frappe.utils.quoted(website_image) | abs_url }}');"
+ {%- endif %}>
</div>
{% endmacro %}
diff --git a/erpnext/templates/includes/navbar/navbar_items.html b/erpnext/templates/includes/navbar/navbar_items.html
index f0c780d..87dea8f 100644
--- a/erpnext/templates/includes/navbar/navbar_items.html
+++ b/erpnext/templates/includes/navbar/navbar_items.html
@@ -2,7 +2,7 @@
{% block navbar_right_extension %}
<li class="shopping-cart hidden">
- <div class="cart-icon small">
+ <div class="cart-icon">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" id="navLogin">
Cart <span class="badge-wrapper" id="cart-count"></span>
</a>
diff --git a/erpnext/templates/includes/order/order_macros.html b/erpnext/templates/includes/order/order_macros.html
index 41be449..70a1fd8 100644
--- a/erpnext/templates/includes/order/order_macros.html
+++ b/erpnext/templates/includes/order/order_macros.html
@@ -13,6 +13,7 @@
</div>
</div>
{% endmacro %}
+
{% macro item_name_and_description_cart(d) %}
<div class="row item_name_dropdown">
<div class="col-xs-4 col-sm-4 order-image-col">
@@ -21,15 +22,15 @@
</div>
</div>
<div class="col-xs-8 col-sm-8">
- {{ d.item_code|truncate(25) }}
+ {{ d.item_code|truncate(25) }}
<div class="input-group number-spinner">
<span class="input-group-btn">
<button class="btn btn-default cart-btn" data-dir="dwn">
–</button>
</span>
- <input class="form-control text-right cart-qty"
- value = "{{ d.get_formatted('qty') }}"
- data-item-code="{{ d.item_code }}">
+ <input class="form-control text-right cart-qty"
+ value = "{{ d.get_formatted('qty') }}"
+ data-item-code="{{ d.item_code }}">
<span class="input-group-btn">
<button class="btn btn-default cart-btn" data-dir="up">
+</button>
diff --git a/erpnext/utilities/doctype/contact/contact.py b/erpnext/utilities/doctype/contact/contact.py
index a687880..dd6aa10 100644
--- a/erpnext/utilities/doctype/contact/contact.py
+++ b/erpnext/utilities/doctype/contact/contact.py
@@ -103,4 +103,5 @@
for key in ("first_name", "last_name", "phone"):
if doc.get(key):
contact.set(key, doc.get(key))
+ contact.flags.ignore_mandatory = True
contact.save(ignore_permissions=True)