Quotation Item Table can be empty
This commit is contained in:
parent
a6628eee56
commit
201dbbd977
@ -13,11 +13,16 @@ from erpnext.utilities.doctype.contact.contact import get_contact_details
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_party_details(party=None, account=None, party_type="Customer", company=None,
|
def get_party_details(party=None, account=None, party_type="Customer", company=None,
|
||||||
posting_date=None, price_list=None, currency=None):
|
posting_date=None, price_list=None, currency=None):
|
||||||
|
|
||||||
|
return _get_party_details(party, account, party_type, company, posting_date, price_list, currency)
|
||||||
|
|
||||||
|
def _get_party_details(party=None, account=None, party_type="Customer", company=None,
|
||||||
|
posting_date=None, price_list=None, currency=None, ignore_permissions=False):
|
||||||
out = frappe._dict(set_account_and_due_date(party, account, party_type, company, posting_date))
|
out = frappe._dict(set_account_and_due_date(party, account, party_type, company, posting_date))
|
||||||
|
|
||||||
party = out[party_type.lower()]
|
party = out[party_type.lower()]
|
||||||
|
|
||||||
if not frappe.has_permission(party_type, "read", party):
|
if not ignore_permissions and not frappe.has_permission(party_type, "read", party):
|
||||||
frappe.throw("Not Permitted", frappe.PermissionError)
|
frappe.throw("Not Permitted", frappe.PermissionError)
|
||||||
|
|
||||||
party_bean = frappe.bean(party_type, party)
|
party_bean = frappe.bean(party_type, party)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-05-24 19:29:08",
|
"creation": "2013-05-24 19:29:08",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2014-01-31 19:42:32",
|
"modified": "2014-01-31 19:43:00",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -333,7 +333,7 @@
|
|||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"options": "Quotation Item",
|
"options": "Quotation Item",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"width": "40px"
|
"width": "40px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user