~openerp-commiter/openobject-client-web/OOCRM

« back to all changes in this revision

Viewing changes to openerp/widgets/listgrid.py

  • Committer: ksh (Axelor)
  • Date: 2010-03-11 12:18:57 UTC
  • mfrom: (2594.4.136 5.0)
  • Revision ID: ksh@axelor.com-20100311121857-yz35zlz2u5nevgl1
[MRG] eTiny5.0 till revno 2833

Show diffs side-by-side

added added

removed removed

Lines of Context:
445
445
        m2o_link = int(self.attrs.get('link', 1))
446
446
        
447
447
        if m2o_link == 1:
448
 
            return tools.url('/form/view', model=self.attrs['relation'], id=(self.value or False) and self.value[0])
 
448
            return tools.url('/form/view', model=self.attrs['relation'], id=(self.value or False) and self.value[0], context=self.context)
449
449
        else:
450
450
            return None
451
451
        
472
472
 
473
473
    def get_text(self):
474
474
        if self.value:
 
475
            
 
476
            if isinstance(self.value, (tuple, list)):
 
477
                self.value = self.value[0]
 
478
                
475
479
            selection = self.attrs['selection']
476
480
            for k, v in selection:
477
481
                if k == self.value: