[fix] SMS Center

This commit is contained in:
Anand Doshi 2014-08-18 19:51:47 +05:30
parent 6ab831b387
commit f72de95a38

View File

@ -18,12 +18,10 @@ class SMSCenter(Document):
where_clause = self.customer and " and customer = '%s'" % \
self.customer.replace("'", "\'") or " and ifnull(customer, '') != ''"
if self.send_to == 'All Supplier Contact':
where_clause = self.supplier and \
" and ifnull(is_supplier, 0) = 1 and supplier = '%s'" % \
where_clause = self.supplier and " and supplier = '%s'" % \
self.supplier.replace("'", "\'") or " and ifnull(supplier, '') != ''"
if self.send_to == 'All Sales Partner Contact':
where_clause = self.sales_partner and \
" and ifnull(is_sales_partner, 0) = 1 and sales_partner = '%s'" % \
where_clause = self.sales_partner and " and sales_partner = '%s'" % \
self.sales_partner.replace("'", "\'") or " and ifnull(sales_partner, '') != ''"
if self.send_to in ['All Contact', 'All Customer Contact', 'All Supplier Contact', 'All Sales Partner Contact']: