Currently, when downloaded report, file name is always default as report_name.
This module help you get report_file as downloaded file name.
Please refer:
https://github.com/tranchiendang/odoo_report_change_downloaded_file_name
tips
Thursday, July 23, 2015
Wednesday, July 15, 2015
create user or role
Confuse with create database user, just run this command:
createuser --createdb --username postgres --no-createrole --pwprompt test
createuser --createdb --username postgres --no-createrole --pwprompt test
Thursday, July 9, 2015
how to run a function at the time installation module
If you want to run a specific function, before install the module, example, re-update current data,
so add a line to define action pre_init_hook to file __openerp__.py like this:
'pre_init_hook': 'function_A'
so add a line to define action pre_init_hook to file __openerp__.py like this:
'pre_init_hook': 'function_A'
Tuesday, July 7, 2015
qweb report not changing after modification xml
If you meet this case, to resolve it, move to Setting / Technical / Actions / Reports
Edit report, and then uncheck on field: Reload from Attachment
Edit report, and then uncheck on field: Reload from Attachment
Sunday, July 5, 2015
span: align text
when I need to align text in span tag, I usually use as below:
<span style="float: right; text-align: right;" />
<span style="float: right; text-align: right;" />
How to know the postgresql data directory
If you want to know, the path of postgresql's data, just login to psql cli, and run this command:
SHOW data_directory;
and then you can get the path.
SHOW data_directory;
and then you can get the path.
qweb report - embedded your image to report
Sometimes, when you need to custom your report header, add another image as logo, as usual, if you add image with path as
<img src="/addons/module/script/src/images/a.jpg" />
It does not render as you want when printing as pdf. (image missing).
Just base64 image, and change your tag as below:
<img src="data:image/jpg;base64, base64-encode"/>
It will render image successfully.
<img src="/addons/module/script/src/images/a.jpg" />
It does not render as you want when printing as pdf. (image missing).
Just base64 image, and change your tag as below:
<img src="data:image/jpg;base64, base64-encode"/>
It will render image successfully.
Subscribe to:
Posts (Atom)