Improve operation's rec_name.

This commit is contained in:
Albert Cervera i Areny 2016-03-03 17:14:42 +01:00
parent fc08e19d39
commit 6c3e604c1b
1 changed files with 5 additions and 2 deletions

View File

@ -85,9 +85,12 @@ class Operation(sequence_ordered(), Workflow, ModelSQL, ModelView):
return [('production.company',) + tuple(clause[1:])]
def get_rec_name(self, name):
res = ''
if self.operation_type:
return self.operation_type.rec_name
return super(Operation, self).get_rec_name()
res = self.operation_type.rec_name + ' @ '
if self.production:
res += self.production.rec_name
return res
@classmethod
def search_rec_name(cls, name, clause):