本文整理汇总了Python中webnotes.model.doc.Document.phone方法的典型用法代码示例。如果您正苦于以下问题:Python Document.phone方法的具体用法?Python Document.phone怎么用?Python Document.phone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webnotes.model.doc.Document
的用法示例。
在下文中一共展示了Document.phone方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_lead_address_contact
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import phone [as 别名]
def create_lead_address_contact(self):
if self.doc.lead_name:
details = sql("select name, lead_name, address_line1, address_line2, city, country, state, pincode, phone, mobile_no, fax, email_id from `tabLead` where name = '%s'" %(self.doc.lead_name), as_dict = 1)
d = Document('Address')
d.address_line1 = details[0]['address_line1']
d.address_line2 = details[0]['address_line2']
d.city = details[0]['city']
d.country = details[0]['country']
d.pincode = details[0]['pincode']
d.state = details[0]['state']
d.fax = details[0]['fax']
d.email_id = details[0]['email_id']
d.phone = details[0]['phone']
d.customer = self.doc.name
d.customer_name = self.doc.customer_name
d.is_primary_address = 1
d.address_type = 'Office'
try:
d.save(1)
except NameError, e:
pass
c = Document('Contact')
c.first_name = details[0]['lead_name']
c.email_id = details[0]['email_id']
c.phone = details[0]['phone']
c.mobile_no = details[0]['mobile_no']
c.customer = self.doc.name
c.customer_name = self.doc.customer_name
c.is_primary_contact = 1
try:
c.save(1)
except NameError, e:
pass
示例2: create_contact
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import phone [as 别名]
def create_contact(self,name,args):
c=Document('Contact')
c.customer_name=args['Customer Name']
c.first_name=name
c.customer=name
c.email_id=args['Email Id']
c.phone=args['Phone Number']
c.is_primary_contact=1
c.save()
示例3: create_lead_address_contact
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import phone [as 别名]
def create_lead_address_contact(self):
if self.doc.lead_name:
details = sql(
"select name, lead_name, address_line1, address_line2, city, country, state, pincode, phone, mobile_no, fax, email_id from `tabLead` where name = '%s'"
% (self.doc.lead_name),
as_dict=1,
)
d = Document("Address")
d.address_line1 = details[0]["address_line1"]
d.address_line2 = details[0]["address_line2"]
d.city = details[0]["city"]
d.country = details[0]["country"]
d.pincode = details[0]["pincode"]
d.state = details[0]["state"]
d.fax = details[0]["fax"]
d.email_id = details[0]["email_id"]
d.phone = details[0]["phone"]
d.customer = self.doc.name
d.customer_name = self.doc.customer_name
d.is_primary_address = 1
d.address_type = "Office"
try:
d.save(1)
except NameError, e:
pass
c = Document("Contact")
c.first_name = details[0]["lead_name"]
c.email_id = details[0]["email_id"]
c.phone = details[0]["phone"]
c.mobile_no = details[0]["mobile_no"]
c.customer = self.doc.name
c.customer_name = self.doc.customer_name
c.is_primary_contact = 1
try:
c.save(1)
except NameError, e:
pass
示例4: create_address
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import phone [as 别名]
def create_address(self,name,args):
c=Document('Address')
c.address_line1=args['Address']
c.address_type='Shipping'
c.customer=name
c.customer_name=args['Customer Name']
c.address_title=name
c.city=args['City']
c.phone=args['Phone Number']
c.state=args['State']
c.country=args['Country']
c.pincode=args['Pincode']
c.is_primary_address=1
c.save()
示例5: create_lead
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import phone [as 别名]
def create_lead(self):
from webnotes.model.bean import getlist
for attendee in getlist(self.doclist, "campaign_attendees"):
lead = Document("Lead")
lead.salutation = attendee.salutation
lead.lead_name = attendee.attendee_name
lead.specialty = attendee.speciality
lead.company_name = attendee.organization_name
lead.email_id = attendee.email_id
lead.phone = attendee.phone
lead.mobile_no = attendee.mobile_no
lead.campaign_name = self.doc.name
lead.save()
self.create_new_contact(attendee, lead.name)
self.create_account_head(lead.name)
示例6: create_lead_address_contact
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import phone [as 别名]
def create_lead_address_contact(self):
if self.doc.lead_name:
if not webnotes.conn.get_value("Address", {"lead": self.doc.lead_name, "customer": self.doc.customer}):
webnotes.conn.sql("""update `tabAddress` set customer=%s, customer_name=%s where lead=%s""",
(self.doc.name, self.doc.customer_name, self.doc.lead_name))
lead = webnotes.conn.get_value("Lead", self.doc.lead_name, ["lead_name", "email_id", "phone", "mobile_no"], as_dict=True)
c = Document('Contact')
c.first_name = lead.lead_name
c.email_id = lead.email_id
c.phone = lead.phone
c.mobile_no = lead.mobile_no
c.customer = self.doc.name
c.customer_name = self.doc.customer_name
c.is_primary_contact = 1
try:
c.save(1)
except NameError, e:
pass
示例7: make_address_from_customer
# 需要导入模块: from webnotes.model.doc import Document [as 别名]
# 或者: from webnotes.model.doc.Document import phone [as 别名]
def make_address_from_customer():
for c in webnotes.conn.sql("select * from tabCustomer", as_dict=1):
d = Document('Address')
d.address_line1 = c['address_line1']
d.address_line2 = c['address_line2']
d.city = c['city']
d.country = c['country']
d.pincode = c['pincode']
d.state = c['state']
d.fax = c['fax_1']
d.email_id = c['email_id']
d.phone = c['phone_1']
d.customer = c['name']
d.customer_name = c['customer_name']
d.is_primary_address = 1
d.address_type = 'Office'
try:
d.save(1)
except NameError, e:
pass