fix: change opportunity to 'Converted' when items not selected in opportunity itself for making quotation and sales order
This commit is contained in:
parent
372abaa420
commit
c992616d35
@ -119,6 +119,14 @@ class Opportunity(TransactionBase):
|
|||||||
and q.status not in ('Lost', 'Closed')""", self.name)
|
and q.status not in ('Lost', 'Closed')""", self.name)
|
||||||
|
|
||||||
def has_ordered_quotation(self):
|
def has_ordered_quotation(self):
|
||||||
|
if not self.with_items:
|
||||||
|
return frappe.get_all('Quotation',
|
||||||
|
{
|
||||||
|
'opportunity': self.name,
|
||||||
|
'status': 'Ordered',
|
||||||
|
'docstatus': 1
|
||||||
|
}, 'name')
|
||||||
|
else:
|
||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
select q.name
|
select q.name
|
||||||
from `tabQuotation` q, `tabQuotation Item` qi
|
from `tabQuotation` q, `tabQuotation Item` qi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user