Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2015
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. def _rut(self, cr, uid, ids, field_name, args, context=None):
  2.     res = {}
  3.     for i in self.browse(cr, uid, ids, context):
  4.         res[i.id] = ''
  5.         if i.partner_id:
  6.             res[i.id] = i.partner_id.vat
  7.     return res
  8.  
  9. _columns = {
  10.     'rut': fields.function(_rut, type='char', string='Rut')
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement