Use dropdown for attachments
issue7659 review50551002
This commit is contained in:
@@ -51,6 +51,11 @@ class Attachment(ResourceMixin, ModelSQL, ModelView):
|
||||
'invisible': Eval('type') != 'data',
|
||||
}, depends=['type']), 'get_size')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._order.insert(0, ('create_date', 'DESC'))
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
cursor = Transaction().connection.cursor()
|
||||
|
||||
@@ -6,9 +6,11 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<label name="resource"/>
|
||||
<field name="resource"/>
|
||||
<label name="name"/>
|
||||
<group id="name_data" col="2" colspan="1">
|
||||
<field name="name"/>
|
||||
<field name="data" xexpand="0"/>
|
||||
<group id="name_data" col="1" colspan="1">
|
||||
<field name="data" filename_visible="1"/>
|
||||
<group name="link" string="">
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</group>
|
||||
<label name="type"/>
|
||||
<field name="type"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree editable="bottom">
|
||||
<tree editable="top">
|
||||
<field name="resource"/>
|
||||
<field name="name"/>
|
||||
<field name="summary"/>
|
||||
@@ -9,5 +9,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="last_modification" widget="date"/>
|
||||
<field name="last_modification" widget="time"
|
||||
string="Last Modification Time"/>
|
||||
<field name="type"/>
|
||||
<field name="data"/>
|
||||
<field name="link" widget="url"/>
|
||||
</tree>
|
||||
|
||||
Reference in New Issue
Block a user