
Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
How to Create write function in openerp
To create writer function in openerp you have to override the create and write methods, as show in example below.
Example:- use this code to write and override function in openerp
def write(self, cr, uid, ids, values, context = None):
re...
Difference between Bug Leakage & Bug Release
Difference between Bug Leakage & Bug Release:-
Bug Leakage:- Once the application is delivered for use, the problem of defect leakage may occur at the customer or end user side. After the release of the application to the client, if the e...
How to change default Character set of Schema?
Sometimes we need to change default Character set of Schema. We can do this easily by using ALTER command.
Command:
ALTER SCHEMA database-name DEFAULT CHARACTER SET utf8 ;
Example:
ALTER SCHEMA `jeeyoh` DEFAULT CHARACTER SET utf8 ;...
Spring JDBC Template for calling Stored Procedures
In Spring we can call the stored Procedures using the SimpleJdbcCall class. we have use it with IN and OUT parameters. Firstly we need to create the procedure in database.
DELIMITER //
DROP PROCEDURE IF EXISTS `TEST`.`getRecord` $$
CREATE ...
How to implement Toolbar
Using Toolbar in place of ActionBar:-
Nowadays ActionBar is getting replaced by toolbar, so it is good to use or get handy with new feature of Android i.e "ToolBar" , Here is the way to use toolbar in your Android Activity.
Step 1:- set the...
White Box Testing coverage techniques in Software Testing
White Box Testing coverage techniques in Software Testing
Coverage term is used in software testing. Testers used coverage term for measurement. They used this term (Coverage) to describe the degree to which the source code is tested. There ar...
Some useful parameters used by multiple methods in OpenERP/Odoo
Here is useful parameters used by multiple methods in OpenERP
cr: database connection (cursor)
uid: id of user performing the operation
ids: record ids to perform the operation on
context: optional dictionary of contextual parameters
For e...
How to call a method after bean initialization is complete
Hello Friends, If you Want to call the method after your bean is initialize in spring you can use the following options.
Use the afterProprtiesSet method.
class MyClass implements InitializingBean {
public void afterPropertiesSet(...
How to get Session Object in Spring MVC
Hello Friends, we need the session object to maintain the session in the web applications. we have to get the session object in Spring MVC by the following method:-
1:- Put the Session object with the method parameter. Session Object is declar...
How to set and get href attribute in jQuery?
Sometimes we need to set and get value of href attribute of <a> tag from jQuery. We can do this very easily by using element.attr() function in jQuery.
Example: for example you declare an <a> as below:
<a id="element_url" hr...
Vibrate Service in android
To make user experience better by providing good focus on some events when volume is not relevant.
Android provide vibrator class to handling all this.
Below is the implementation. It vibrates just for 500 milliseconds.
First of all we ne...
Snackbar in android
Basically snackbar use to show message like a Toast but here the advantage is we have event to interact
in it.
It shows message on the bottom of the screen. And it will remove when we swipe off.
First of all add this in your gradle file
d...
Initializing Log4J with Spring
In below Code you have to define the following log4j properties into your log.properties file:-
log4j.properties
# Global logging configuration
log4j.rootLogger = DEBUG, fileout
# Define the file appender
log4j.appender...
How to check partner balance in openerp
To check partner balance in openerp follow these step given below
Step1-First Install Account module, to install Account module in openerp
Step2- Go to Account -> Reporting -> Generic Report -> Partners -> Partners Balance and save...
How to get the invoice associate with the picking of invoice in OpenERP/Odoo ?
Step-1 Go to picking_invoice_relation module.
Step-2 invoice->invoice.py.
Step-3 After that used below code in invoice.py file.
if not isinstance(ids, types.ListType): # Ensure it is a list before proceeding.
ids = [ids] ...
How to check if audittrail rule apply in super admin mode in OpenERP/Odoo ?
Step-1 Go to audittrail module.
Step-2 audittrail->audittrail.py.
Step-3 After that used below code in audittrail.py file.
if self.check_rules(cr, SUPERUSER_ID, field_obj._obj, method):
x2m_model_ids = pool.get('ir....
How to check credential key in avalara-salestax in OpenERP/Odoo ?
Step-1 Go to avalara_salestax module.
Step-2 avalara_salestax->account_tax.py.
Step-3 After that used below code in account_tax.py file.
avalara_obj = AvaTaxService(avatax_config.account_number, avatax_config.license_key,
...
unique records creation with account_number and company_id in avalara-salestax
To use constraints on unique records creation with account_number and company_id in avalara-salestax in OpenERP/Odoo follow below steps-
Step-1 Go to avalara_salestax module.
Step-2 avalara_salestax->avalara_salestax.py.
Step-3 After that...
How to show folder structure using TreeView control in Windows Form Application using C#.
Hello All,
Working with Windows form application using C# while developing desktop application, many times we need to show the folder structure in TreeView control, and to do that we have the following code :
private void btnShow(object...
How to check invoice date in OpenERP/Odoo ?
Step-1 Install the account_invoice_sequential_dates module.
Step-2 Account_invoice_sequential_dates->invoice.py
Step-3 After that custmozie invoice.py(Python file) file: In below example, I have custmozied invoice.py file. You can directly ...
How to serialize a class in C#
Hello All,
Working with ASP.NET C#, I wanted to serialize a class to a file which will be later de Serialize to access its properties and delegates, and to do this we have following block of code :
Structure of the class to be Serialized :
...
Regular expressions for Email Validation
Regular expressions for Email Validation
In this post, we are going to elaborate, how can we implement Regular Expressions for email validation in JavaScript. There are many validation example and function are available, but ...
What is Xamarin
Hello All,
In this blog, we will have a brief discussion on Xamarin. Xamarin is basically a tool for Cross Platform Development of Android, iOS and win forms.You can visit the Xamarin website https://xamarin.com/ and you can find more detail...
How to make Purchase Usability Extension in OpenERP/Odoo ?
Step-1 Install the purchase_usability_extension module.
Step-2 purchase_usability_extension->Purchases.py
Step-3 After that custmozie purchases.py(Python file) file: In below example, I have custmozied purchases.py file. You can directly cop...
How to search name field in OpenERP
To install account module and searching by name in account module in customers invoice form and get results in particular name use this code in account_invoice file in account module in openerp.
Code given below:-
def name_search(self, cr,...
Fetch Parse PFUser data in iOS
If you are querying on Parse User class and not getting the user data of custom columns then use below code.
PFQuery *query= [PFUser query];
[query whereKey:@"username" equalTo:[[PFUser currentUser]username]];
[query getFirstObjectIn...
How to make Long Term Agreement (Framework Agreement) for purchases in OpenERP/Odoo ?
Step-1 Install the Framework_agreement module.
Step-2 Framework_agreement->Model->Purchases.py
Step-3 After that custmozie purchases.py(Python file) file:
In below example, I have custmozied purchases.py file. You can directly copy the b...
How to copy data form account_invoice_line table in PostgreSQL
To copy data from account_invoice_line table in account module in PostgreSQL use this code in pgadmin and user can copy data from account_invoice_line table.
Copy account_invoice_lines
copy (SELECT *
FROM
account_invoice_lines
INNER JO...
UIAlertController as an action sheet in iOS8 and above.
Now you can use UIAlertController as an actionsheet in iOS 8 and above versions. Here is an example of it:-
UIAlertController * view= [UIAlertController
alertControllerWithTitle:@"Sample"
...
How to use UIAlertController for iOS8 and above.
Apple has deprecated UIAlertView in iOS 8 and above. Now they have introduce UIAlertController, below are the examples.
AlertView without buttons:-
UIAlertController * alert= [UIAlertController
alertContro...
How to use classical inheritance in OpenERP/Odoo ?
If you want to use classical inheritance in OpenERP use below code -
class subscription_document(osv.osv):
_name = "subscription.document"
_description = "Subscription Document"
_columns = {
'name': fields.char('Name', ...
ENABLE_BITCODE in xcode 7
Bitcode refers to an intermediate representation of a compiled program. The installation of iOS, tvOS, and watchOS apps by tailoring app delivery to the capabilities of the users particular device. Apple called this optimization,"app thinning".
...
How to use _inherit and _name attributes together, in OpenERP/Odoo ?
If you want to use _inherit and _name attributes together in OpenERP use below code -
class sale_order(osv.osv):
_name = "sale.order"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_description = "Sales Order"
_track = {...
Sample application of angularJS
Hello guys,
Here, I am writing a blog to develop application using AngularJS. AngularJs is a framework of JavaScript such as JQuery and it's very efficient. AngularJS is a cross browser independent.
First of all, we need to add angularJS API ...
Overview of AngularJS
AngularJS is a powerful JavaScript based framework to create RICH Internet Application and developer's have option to write client side application in MVC way. Applications of angularJS are cross browser independent and it handles automatically j...
How to defines write()method in OpenERP/Odoo ?
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.
How to create a model in OpenERP/Odoo ?
If you want to create a model in OpenERP use like below code -
from openerp.osv import fields, osv
class course(osv.osv):
_name='course'
_columns= {
'name':fields.char("Name",size=128,domain=[('name', '=',2)]),
...
How to defines a new notebook page for the view in OpenERP/Odoo ?
If you want to defines a new notebook page for the view in OpenERP use below code -
<page string="Order Line"> :
Notebook page is used to create the new page and divide the section of pages.
How to adds a separator line in OpenERP/Odoo ?
To add a separator line separator string is used, below us the way to do this.
Go to .xml file and use the below code .
<separator string="Session" colspan="4"/>
<field name="session" nolabel="1">
<tree>
<field name=...
How to use default_get method in OpenERP/Odoo ?
If you want to use default_get method in OpenERP use below code -
self.pool.get(sale.order.line).default_get(cr, uid, [product_id,product_uom_id])
Note- If you want to migrating the module from OpenERP-7 to OpenERP-8(Odoo),then we have to...
How to use browse method in OpenERP/Odoo ?
If you want to use browse method in OpenERP use below code -
def _get_company(self, cr, uid, context=None):
user_pool = self.pool.get('res.users')
company_pool = self.pool.get('res.company')
user ...
How to define many2many field in OpenERP/Odoo ?
If you want to define many2many field in OpenERP use like below code -
class test (osv.osv):
_inherit='sale.order.line'
_columns={
'product1_cat':fields.char('product academy'),
'product&_cat':fields.many2...
Digital Marketing: Remarketing vs Retargeting Strategy
Digital Marketing
Digital marketing plays an important role for all business organizations to get success in todays world. As we know that more number of people are now accessing internet for the purpose of buying various things including the ...
How to define Functional field in OpenERP/Odoo ?
If you want to define Functional field in OpenERP use below code -
class Demo1 (osv.osv):
_name = Demo1
_description = Contract
_columns = {
name : fields.char(Contract Name, size=30, required=True),
employee_id : fields.many2one(employee...
How to define the _sel_ function in OpenERP/Odoo ?
If you want to make the _sel_ function in OpenERP use below code -
def _sel_func(self, cr, uid, context={}):
obj = self.pool.get(Test.relation.model)
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, [Demo, id], context)
res = [(r...
Built in Place Picker in Android.
Android has now a built in Place picker, where user can pick the places. Developer can only send an intent and get result in OnActivityResult.
Requirements -Google play service greater than 7.
public void onPickButtonClick(View v) {
//...
How to navigate into the folder having space in the Name
In ubuntu, sometimes we create folder having space in between the name of the folder. When we navigate to these type of folder normally, we get message that file not exist.
For example, if we have a folder name Music Folder, Then we have ...
Best Google Chrome Extensions
Hi, Here I am writing some of the Google chrome extensions because they are very useful and I personally love them too. Around 60% people use Google chrome worldwide.
Pocket :- If you want to read or view any content later, you just need t...
Stack in java
In stack, we save elements in last-in, first-out manner. Stack extends the Vector class and have only one constructor that is default. By this default constructor, we can create an empty stack.
Below is the example.
public class Exampl...
Add custom ringtone on Notification
In our application, we can add notification ringtone as we want. Here is the solution.
First of all we need to create a folder named raw in /res/ file. After creating the folder put your ringtone in raw folder.
Then put this code when you...