Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Build the customer Profile in avatax in OpenERP(Odoo)?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 153
    Comment on it

    Step-1 Install the avatax module.
    Step-2 After that custmozie .py(Python file) file:
    In below example, I have custmozied .py file. You can directly copy the below python code in your .py file -

     profileNameSpace = ('ns1', 'http://avatax.avalara.com/services')
            profile = suds.sax.element.Element('Profile', ns=profileNameSpace)
            profile.append(suds.sax.element.Element('Client', ns=profileNameSpace).setText(CLIENT))
            profile.append(suds.sax.element.Element('Adapter', ns=profileNameSpace).setText(ADAPTER))
            hostname = socket.gethostname()
            profile.append(suds.sax.element.Element('Machine', ns=profileNameSpace).setText(hostname))
            return profile
    
        def get_result(self, svc, operation, request):
            try:
                result = operation(request)
            except suds.WebFault, e:
                raise osv.except_osv(_('Avatax: Error'), _(e.fault.faultstring))
            except urllib2.HTTPError, e:
                raise osv.except_osv(_('Avatax: Server Failed to Response'), _(e.code))
            except urllib2.URLError, details

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: