Merge pull request #1866 from anandpdoshi/anand-wip
Fixed get_sender for Sales and Jobs
This commit is contained in:
commit
578a6db659
@ -16,10 +16,11 @@ class SellingController(StockController):
|
|||||||
check_active_sales_items(self)
|
check_active_sales_items(self)
|
||||||
|
|
||||||
def get_sender(self, comm):
|
def get_sender(self, comm):
|
||||||
if frappe.db.get_value('Sales Email Settings', None, 'extract_emails'):
|
sender = None
|
||||||
return frappe.db.get_value('Sales Email Settings', None, 'email_id')
|
if cint(frappe.db.get_value('Sales Email Settings', None, 'extract_emails')):
|
||||||
else:
|
sender = frappe.db.get_value('Sales Email Settings', None, 'email_id')
|
||||||
return comm.sender or frappe.session.user
|
|
||||||
|
return sender or comm.sender or frappe.session.user
|
||||||
|
|
||||||
def set_missing_values(self, for_validate=False):
|
def set_missing_values(self, for_validate=False):
|
||||||
super(SellingController, self).set_missing_values(for_validate)
|
super(SellingController, self).set_missing_values(for_validate)
|
||||||
|
@ -11,7 +11,7 @@ from frappe.utils import extract_email_id
|
|||||||
class JobApplicant(TransactionBase):
|
class JobApplicant(TransactionBase):
|
||||||
|
|
||||||
def get_sender(self, comm):
|
def get_sender(self, comm):
|
||||||
return frappe.db.get_value('Jobs Email Settings',None,'email_id')
|
return frappe.db.get_value('Jobs Email Settings',None,'email_id') or comm.sender or frappe.session.user
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.set_status()
|
self.set_status()
|
Loading…
Reference in New Issue
Block a user