当前位置: 首页>>代码示例>>Python>>正文


Python Document.phone方法代码示例

本文整理汇总了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
开发者ID:antoxin,项目名称:erpnext,代码行数:36,代码来源:customer.py

示例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()
开发者ID:rohitw1991,项目名称:innoworth-app,代码行数:11,代码来源:cgi.py

示例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
开发者ID:nijil,项目名称:erpnext,代码行数:40,代码来源:customer.py

示例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()
开发者ID:rohitw1991,项目名称:innoworth-app,代码行数:16,代码来源:cgi.py

示例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)
开发者ID:saurabh6790,项目名称:alert-med-app,代码行数:18,代码来源:campaign.py

示例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
开发者ID:abordin,项目名称:erpnext,代码行数:21,代码来源:customer.py

示例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
开发者ID:ravidey,项目名称:erpnext,代码行数:22,代码来源:customer_address.py


注:本文中的webnotes.model.doc.Document.phone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。