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....
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,
...
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...
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...
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 ...
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
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 ...
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 simply manage expense of utility bills and daily expense in odoo ... example electricity bill food bill telephone bill service charges and how to make auto estimate for next month and on certain date it gives us reminder ....? I need answ...
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...
Hello Guys
When I rotate the iPad, CSS clsses are not updating.
In present, I am changing classes on page loading using javascript but now I need to update classes using CSS.
Thank you in advance.
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,...
guy's is anybody having Idea about how to access xampp with IP address not from lan from anywhere...?
like with public IP I'm stuck with changing of the Apache config files also but no use...!
Any help Plz...
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...
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...
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...
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"
...
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...
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', ...
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".
...
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 = {...
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 ...
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...
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.
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)]),
...
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.
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=...
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...
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 ...
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
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 ...
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...
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...
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) {
//...
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 ...
Hello,
I'm trying to do a redirect of a login to another page but I receiving error 404.
Can someone explain me how the sendRedirect work please?
I post too a screen shot of the structure of my files inside the project.
Thank you a lot.
/*...
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...
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...
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...
Android provide us the facility to know the call state. Android gives this feature by providing Telephonymanager class. We need to implement PhoneStateListener interface that has one method onCallStateChanged().
Below is the example.
publ...
We can add animation on activity switching.
First thing that we need to do is to create xml for animation. Here I am using two xml for in and out.
animation_in.xml
set xmlns:android="http://schemas.android.com/apk/res/android" android:sh...
I am writing a way to implement SortedSet in java.
SortedSet have the properties of Set interface plus feature of sorting in ascending order. It is by default provides elements in ascending order. It is very useful in such situation when we do...
Hi friends,
Here I am writing a way to implement basic LinkedList.
First of all LinkedList has the properties of List interface and
AbstractSequentialList class because it implements List interface and extends
AbstractSequentialList.
...
Can any one give me the idea. How I can detect collision between 2 dom element. I have got this code form MDN. But can't go thorough it. Please help me.
var rect1 = {x: 5, y: 5, width: 50, height: 50}
var rect2 = {x: 20, y: 10, width: 10, heig...
To start with module development in magento it is necessary to understand the file structure needed to create module. To understand the structure we are going to develop one hello world module to display content in front end.
1) app/etc/module...
If you want to define class and attributes in OpenERP use below code -
from osv import osv, fields
class travel_hostel(osv.osv):
_name = travel.hostel
_inherit = res.partner
_columns = {
rooms_id: fields.one2many(travel.room, hostel_id, ...