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)
|
||||
|
||||
def get_sender(self, comm):
|
||||
if frappe.db.get_value('Sales Email Settings', None, 'extract_emails'):
|
||||
return frappe.db.get_value('Sales Email Settings', None, 'email_id')
|
||||
else:
|
||||
return comm.sender or frappe.session.user
|
||||
sender = None
|
||||
if cint(frappe.db.get_value('Sales Email Settings', None, 'extract_emails')):
|
||||
sender = frappe.db.get_value('Sales Email Settings', None, 'email_id')
|
||||
|
||||
return sender or comm.sender or frappe.session.user
|
||||
|
||||
def set_missing_values(self, for_validate=False):
|
||||
super(SellingController, self).set_missing_values(for_validate)
|
||||
|
@ -9,9 +9,9 @@ from erpnext.utilities.transaction_base import TransactionBase
|
||||
from frappe.utils import extract_email_id
|
||||
|
||||
class JobApplicant(TransactionBase):
|
||||
|
||||
|
||||
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):
|
||||
self.set_status()
|
||||
self.set_status()
|
||||
|
Loading…
Reference in New Issue
Block a user