
Search In
Hello Friends,
If you are looking to use conditions in mysql query with query builder in Symfony2. Please review the below code and make the changes accordingly:
$qb = $this->getConn()->createQueryBuilder();
$qb->select("SUM( IF(`pm_stat
Drush stands for Drupal shell, which provide shell interface for managing Drupal sites. It is a useful command line tool to perform various admin tasks using just one or two commands in the terminal. It seems very complex for newbie but when you will
This blog will let you upgrade your system to Ubuntu 16.04. Follow the steps given below in order to upgrade your system:
Step 1: Backup your system
Before attempting any upgrade to your system, firstly backup your system
Step 2: Upgrade i
If you want to make write()method in OpenERP use below code -
self.write({'test': 'demo'})
This method is used to explore the class and object of the module/code.
Here, 'test': is a class and 'demo' is name of class.
Hello Reader's, If want to make alert when the upper/lower case letter key is pressed. Then by using Javascript you can see it in the code below:-
$('#cap').keypress(function(e) {
var s = String.fromCharCode( e.which );
if ( s.toUpperCase
In the search_count function returns the count of results matching search domain:
In below code i have explain search_read
self.search_count([('is_company', '=', True)])
Note -with the help of this code we retrieve all adress.
Api.model will convert old API calls to decorated function to new API signature. It allows to be polite when
migrating code.
The below code you can use in your .py file .
@api.model
def afun(self):
pass
Note- Model.api will automatically convert it
Records can be deleted in bulk by providing their ids to unlink().
For example code like below.
models.execute_kw(db, uid, password, 'res.partner', 'unlink', [[id]])
check if the deleted record is still in the database
models.execute_kw(db, uid, pas
Sometimes we need to generate random numbers to identify an entity uniquely.
We can generate random number very easily by the below code:
/**
*
* @return a random confirmation code.
*/
public int generateIntRandomNumber()
{
Random generato
To resolve a conflict between jQuery and prototype, use below method
jQuery.noConflict
and using jQuery instead of
$('code').code;
jQuery.noConflict();
jQuery(function($)
// $ is the jQuery object in here
// and doesn't conflict with Prototype
