DI
This commit is contained in:
@@ -18,6 +18,9 @@ class IncomingConfiguration(metaclass=PoolMeta):
|
||||
class Incoming(metaclass=PoolMeta):
|
||||
__name__ = 'document.incoming'
|
||||
|
||||
created_at = fields.Function(
|
||||
fields.DateTime("Created At"),
|
||||
'get_created_at')
|
||||
result_notes = fields.Function(
|
||||
fields.Text("Result Notes"),
|
||||
'get_result_notes')
|
||||
@@ -58,6 +61,9 @@ class Incoming(metaclass=PoolMeta):
|
||||
|
||||
return wr
|
||||
|
||||
def get_created_at(self, name=None):
|
||||
return getattr(self, 'create_date', None)
|
||||
|
||||
def get_result_notes(self, name=None):
|
||||
result = getattr(self, 'result', None)
|
||||
if not result:
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/tree/field[@name='name']" position="before">
|
||||
<field name="created_at"/>
|
||||
</xpath>
|
||||
<xpath expr="/tree/field[@name='result']" position="after">
|
||||
<field name="result_notes" expand="2"/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user