
Search In
Hello Reader's if you want to give output as an image then you can use the code below:-
You can use finfo (PHP 5.3+) to get the right MIME type.
$filePath = 'yourfile.ext';
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$contentType = finfo_file($finfo,
In profile module we have to create a profile, we only have to create a new directory in server/addons and we should call this folder.
profile_module name, in which we put an empty __init__.py file (as every directory Python imports must contain .py
The __openerp__.py file has containing list of dependencies,conditioning startup order,data files to load at module install,always load groups first and load access rights after groups.
For example code below.
{'name' : 'SHIVA',
'version' : '1.0',
In readonly field first we have to go in .py file (python file)
After that we have to decide where we want readonly field and then give attribute readonly to that field.
See below python code in py file for reference : -
class spartner(osv.osv):
In X-Path first we have to go in View_XML file (XML file)
After that we have to decide where we want X-Path and then give Initial to last Path to that field.
See below View_Xml code in Xml file .
<?xml version="1.0" encoding="utf-8"?>
<op
In provisions fields first we have to go in .py file (Python file) After that we have to decide where we want delete fields and then write the python code of that field. use below code in .py(python file):
cr.execute('SELECT id FROM account_cashfl
To update sequence to number and checks from the value encoded in the wizard, first we have to go in .py file (Python file) After that we have to decide where we want to update the sequence to number and then write python code to that field from star
I am trying to make a server and client which sends a file from client to server and the server saves it to hard then the server asks for another file and if the answer of the client is yes then the client sends the second file then the server again
Hi Friends,
Sometimes we need to compress some files programmatically in our code particularly in the case when you are developing any multiple download scenario. We compress the files for following reasons:
1-Compressed files are smaller in size,
If you want to setup editing in the Odoo administration in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file -
model.py
'data': [
'security/ir.model.access.csv',
'templates.xml',
'views.xml