Tags


.xml file

<xpath expr="//button[@string='Cancel Order']" position="after">
 <button name="getinvno" string="Print EP" type="object" />
</xpath>

.py file

def getinvno(self, cr, uid, ids,arg, context=None):
 res = {}
 for resource in self.browse(cr, uid, ids, context=context):
 # res[resource.id]=resource.name
 #val = 'Test'
 return self.write(cr, uid, ids, {'invno': resource.name}, context=context)

 

Advertisements