Rename resume into summary

This commit is contained in:
Cédric Krier committed 2011-04-01 16:34:50 +02:00
1 parent 8fc9820dcb
commit 1676bf3c63
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -34,8 +34,8 @@ class Attachment(ModelSQL, ModelView):
'invisible': Not(Equal(Eval('type'), 'data')),
}, depends=['type']), 'get_data', setter='set_data')
description = fields.Text('Description')
resume = fields.Function(fields.Char('Resume',
on_change_with=['description']), 'get_resume')
summary = fields.Function(fields.Char('Summary',
on_change_with=['description']), 'get_summary')
resource = fields.Reference('Resource', selection='models_get', select=1)
link = fields.Char('Link', states={
'invisible': Not(Equal(Eval('type'), 'link')),
@@ -174,11 +174,11 @@ class Attachment(ModelSQL, ModelView):
'collision': collision,
})
def get_resume(self, ids, name):
def get_summary(self, ids, name):
return dict((x.id, firstline(x.description or ''))
for x in self.browse(ids))
def on_change_with_resume(self, values):
def on_change_with_summary(self, values):
return firstline(values.get('description') or '')
def get_last_modification(self, ids, name):
+1 -1
View File
@@ -47,7 +47,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="resource" select="1"/>
<field name="name" select="1"/>
<field name="data_size"/>
<field name="resume"/>
<field name="summary"/>
<field name="last_user"/>
<field name="last_modification"/>
</tree>