Browse Source

fix: Test case fixes and linting issues

develop
Deepesh Garg 3 years ago
parent
commit
cd4b20313e
  1. 1
      erpnext/patches/v13_0/create_pan_field_for_india.py
  2. 2
      erpnext/regional/india/utils.py
  3. 3
      erpnext/selling/doctype/customer/customer.json

1
erpnext/patches/v13_0/create_pan_field_for_india.py

@ -1,4 +1,3 @@
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields

2
erpnext/regional/india/utils.py

@ -62,7 +62,7 @@ def validate_gstin_for_india(doc, method):
.format(doc.gst_state_number), title=_("Invalid GSTIN"))
def validate_pan_for_india(doc, method):
if doc.get('country') != 'India' or not doc.pan:
if doc.get('country') != 'India' or not doc.get('pan'):
return
if not PAN_NUMBER_FORMAT.match(doc.pan):

3
erpnext/selling/doctype/customer/customer.json

@ -212,7 +212,8 @@
"fieldtype": "Link",
"ignore_user_permissions": 1,
"label": "Represents Company",
"options": "Company"
"options": "Company",
"unique": 1
},
{
"depends_on": "represents_company",

Loading…
Cancel
Save