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