~openerp-community/openobject-addons/openerp-evernote

« back to all changes in this revision

Viewing changes to openERP_evernote/configuration.py

  • Committer: Serpent Consulting Services Pvt. Ltd.
  • Date: 2014-02-14 12:19:58 UTC
  • Revision ID: support@serpentcs.com-20140214121958-0xvhh8rds1j9sdjx
[IMP] Improvements 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from openerp.osv import fields,osv
2
 
 
3
 
class evernote_configuration(osv.osv_memory):
4
 
    
5
 
    _name = 'evernote.configuration' 
6
 
    
7
 
    _columns = {
8
 
                'name': fields.char('Account Name', size=64),
9
 
                'username' : fields.char('Username',size=64),
10
 
                'passwd' : fields.char('Password',size=64),
11
 
                'auth_token': fields.char('Auth Token',size=128)
12
 
    }
13
 
    
14
 
    def add_connection(self,cr,uid,ids,context=None):
15
 
        data = self.browse(cr,uid,ids,context=context)
16
 
        vals={
17
 
              'name':data.name,
18
 
              'username':data.username,
19
 
              'passwd' : data.passwd,
20
 
              'auth_token':data.auth_token
21
 
        }
22
 
        self.write(cr, uid, ids[0],vals, context=context)
23
 
        
 
 
b'\\ No newline at end of file'