We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
http://www.kyholdings.com/cms/allquotation/9010d61237be4bae86f3f38db9eb8543 http://www.kyholdings.com/cms/9010d61237be4bae86f3f38db9eb8543/OpenBareDocument?openwithform=quotation_printing
Here is the details I setting now:
field id: Images Title: Images Field Type: Rich text Field moud: computed for display
formula:
db = context.getParentDatabase() item_doc_id = context.getItem('ItemNo') if not item_doc_id: return 0 item_doc = db.getDocument(item_doc_id) images = asList(item_doc.getItem('image', [])) html ="" for image in images: path_to_image = "http://www.kyholdings.com/image/plomino/"+image+".jpg" html += """<a href="%(full)s"><img width="400" src="%(path)s" /></a>""" % {'path': path_to_image+"/image_preview", 'full': path_to_image+"/image_view_fullscreen"} return html
field id: Item_List Title: Item List Field Type: Rich text Field moud: computed for display
db = context.getParentDatabase() html="""<table border="0" width="100%"> <colgroup> <col width="15%" /> <col width="15%" /> <col width="40%" /> <col width="15%" /> <col width="15%" /> </colgroup> <tbody> """ item_list = context.getItem('Item_List', []) for row in item_list: item_doc = db.getDocument(row[0]) if not item_doc: html += "<tr><td>ERROR</td></tr>" continue html += """<tr><td><span style="font-family: verdana; font-size: 3px; ">%s</span></td><td><span style="font-family: verdana; font-size: 3px; ">%s</span></td><td><span style="font-family: verdana; font-size: 3px; ">%s</span></td><td><span style="font-family: verdana; font-size: 3px; ">%s</span></td><td style="text-align: center; "><span style="font-family: verdana; font-size: 3px; ">%s</span></td></tr>""" % (item_doc.getItem('ItemNo'), item_doc.getItem('NameEN')+item_doc.getItem('Packing')+str(item_doc.getItem('OPQTY'))+item_doc.getItem('QTYunitEN')+"/"+str(item_doc.getItem('Length'))+"x"+str(item_doc.getItem('Width'))+"x"+str(item_doc.getItem('High'))+"cm/"+str(item_doc.getItem('NW'))+"kgs/"+str(item_doc.getItem('GW'))+"kgs", item_doc.getItem('Images'), str(row[3]), str(row[4])) html += "</table>" return html
It could work but could not show image. Please help me to found solution with thanks.
Here is the link of the full setting and documents:
http://www.kyholdings.com/news/quotation-document/view http://www.kyholdings.com/news/quotation-form-formula/view
Alex
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi
Here is the details I setting now:
the Images is a special field which I want to show image
field id: Images
Title: Images
Field Type: Rich text
Field moud: computed for display
formula:
Item list which I want to show the images(not text)
field id: Item_List
Title: Item List
Field Type: Rich text
Field moud: computed for display
formula:
It could work but could not show image.
Please help me to found solution with thanks.
Here is the link of the full setting and documents:
Alex
The text was updated successfully, but these errors were encountered: