~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to msf_tools/msf_tools.py

  • Committer: jf
  • Date: 2012-11-29 13:00:27 UTC
  • mfrom: (1287.9.8 unifield-wm)
  • Revision ID: jfb@tempo-consulting.fr-20121129130027-564r4yns8t5d2v7d
UTP-368 [FIX] Shouldn't be possible to source a non-stockable product to stock in the order sourcing tool (fix unit test)
lp:~unifield-team/unifield-wm/utp-368

Show diffs side-by-side

added added

removed removed

Lines of Context:
481
481
        return True
482
482
    
483
483
picking_tools()
484
 
    
485
 
 
486
 
class ir_translation(osv.osv):
487
 
    _name = 'ir.translation'
488
 
    _inherit = 'ir.translation'
489
 
 
490
 
    def tr_view(self, cr, name, context):
491
 
        if not context or not context.get('lang'):
492
 
            return name
493
 
        tr = self._get_source(cr, 1, False, 'view', context['lang'], name, True)
494
 
        if not tr:
495
 
            # sometimes de view name is empty and so the action name is used as view name
496
 
            tr2 = self._get_source(cr, 1, 'ir.actions.act_window,name', 'model', context['lang'], name)
497
 
            if tr2:
498
 
                return tr2
499
 
            return name
500
 
        return tr
501
 
 
502
 
 
503
 
ir_translation()