Is the way to show pictures from OpenERP database in static web pages of (Knowledge Management, module document_page)? As well as in static page refer and "directly" open attached PDF files?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
I don't think there are many user friendly ways to upload and serve arbitrary images for linking/embedding in a Document Page entry. Here are two methods that have worked for me:
WYSIWYG editor in raw HTML mode
Based on examples from the OpenERP demo data in the Document Pages module, you will need to edit the HTML code of your document page in the editor to type img
tags rather than using the WYSIWYG editor features alone.
External image service
You can specify an external URL to a photo sharing site, local HTTP file server, or Amazon S3 Bucket, etc., as in <img src="http://example.com/image.png">
Base 64 encoded data URLs
Paste a lengthy
<img src="data:image/png;base64,iVBORw0KGgoAAAAâ¦PAAAAABJRU5ErkJggg==">
tag generated by base-64 encoding your image. CSS rules can also add background images from base 64 data. There are external online tools to generate the img
tags and CSS rules.
Make your own quick OpenERP add-on
If you really get sick of embedded data URLs and external hosting, you can drop a folder of contents onto the server bundled as an "add-on" and have everything in the "/<addon name="">/static" path be served up. It's very easy and requires no programming knowledge, but does require write access to the file system and the ability to tell OpenERP where your extra add-on is located (that aspect is document well elsewhere).
Add-on folder structure:
my_files/
âââ __init__.py
âââ __openerp__.py
âââ static
âââ example.png
__init__.py is empty:
__openerp__.py contains:
{
"name": "My Static Files",
"version": "1.0",
"description": "Static file collection bundled as an add-on.",
"author": "Arnis",
"depends": ['web'],
"installable": True,
"auto_install": False
}
-
- If you want to point OpenERP at an additional addons folder, edit your server config file (and restart) or change the command-line switch,
--addons-path
to point at the extra add-ons folder where your add-on's folder is contained - If you dropped your add-on folder into an existing add-ons folder, click Settings / Update Modules List
- If you want to point OpenERP at an additional addons folder, edit your server config file (and restart) or change the command-line switch,
- Locate and install your add-on from the Settings menu
UPDATE: It seems installation is not necessary, at least in the trunk I tested with today (8.0). - Your add-on and the URLs should
activate. You should be able to
view an image in the browser with a
URL like
http(s)://openerp.example.com/my_files/static/example.png
andimg
tags should likewise work as expected.
You can replace the default editor to CKEditor (much more complete than default CLEditor) by installing the following module and changing the widget attribute to "ckeditor" instead "html" in the concerned view.
github.com/0k/web_ckeditor
Then you'll have to add the "base64images" module to the CKEditor source in static folder of web_ckeditor module (/addons/web_ckeditor/static/lib/js/ckeditor). This modules allows you to upload an image and integrate it diretly in base64 format so you don't have to host it somewhere else.
github.com/nmmf/base64image/
I like this solution, but it does not work on v8. At least I tried and after installing the module and changing the html -> ckeditor there was no more editor in the view. It was just a textbox without any buttons.
Hi Arnis,
I tried some ways and the finally decided to regist on photobucket.com to keep my images online. There you have a link html to use on your knowledge page,
Rgds
Hi Please install "Document Page" and check some sample pages inside knowledge menue
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
PrijaviRelated Posts | Odgovori | Prikazi | Aktivnost | |
---|---|---|---|---|
|
2
apr. 21
|
7132 | ||
|
0
mar. 15
|
3333 | ||
|
1
maj 23
|
4338 | ||
|
2
apr. 20
|
26919 | ||
|
1
maj 17
|
9091 |