42
41
raise osv.except_osv(_('Warning !'), _('Labels are only available for completed Pre-Packing List Objects!'))
44
43
return super(labels, self).set_context(objects, data, ids, report_type=report_type)
51
res = dict(sel[field]['selection']).get(getattr(o,field),getattr(o,field))
53
tr_ids = self.pool.get('ir.translation').search(self.cr, self.uid, [('type', '=', 'selection'), ('name', '=', name),('src', '=', res)])
55
return self.pool.get('ir.translation').read(self.cr, self.uid, tr_ids, ['value'])[0]['value']
59
45
report_sxw.report_sxw('report.labels', 'stock.picking', 'addons/msf_outgoing/report/labels.rml', parser=labels, header=False)