Add date + result_notes in document_incoming
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<!-- 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. -->
|
||||||
<tree>
|
<tree>
|
||||||
|
<field name="create_date"/>
|
||||||
<field name="name" expand="2"/>
|
<field name="name" expand="2"/>
|
||||||
<field name="source" expand="1" optional="0"/>
|
<field name="source" expand="1" optional="0"/>
|
||||||
<field name="company" expand="1" optional="1"/>
|
<field name="company" expand="1" optional="1"/>
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ class IncomingConfiguration(metaclass=PoolMeta):
|
|||||||
class Incoming(metaclass=PoolMeta):
|
class Incoming(metaclass=PoolMeta):
|
||||||
__name__ = 'document.incoming'
|
__name__ = 'document.incoming'
|
||||||
|
|
||||||
|
result_notes = fields.Function(
|
||||||
|
fields.Text("Result Notes"),
|
||||||
|
'get_result_notes')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
super().__setup__()
|
super().__setup__()
|
||||||
@@ -39,7 +43,7 @@ class Incoming(metaclass=PoolMeta):
|
|||||||
WR.save([wr])
|
WR.save([wr])
|
||||||
WR.run_ocr([wr])
|
WR.run_ocr([wr])
|
||||||
WR.run_metadata([wr])
|
WR.run_metadata([wr])
|
||||||
|
WR.run_pipeline([wr])
|
||||||
return wr
|
return wr
|
||||||
|
|
||||||
def _process_controller(self):
|
def _process_controller(self):
|
||||||
@@ -54,6 +58,14 @@ class Incoming(metaclass=PoolMeta):
|
|||||||
|
|
||||||
return wr
|
return wr
|
||||||
|
|
||||||
|
def get_result_notes(self, name=None):
|
||||||
|
result = getattr(self, 'result', None)
|
||||||
|
if not result:
|
||||||
|
return ''
|
||||||
|
if getattr(result, '__name__', None) == 'automation.document':
|
||||||
|
return getattr(result, 'notes', '') or ''
|
||||||
|
return ''
|
||||||
|
|
||||||
# @property
|
# @property
|
||||||
# def supplier_invoice_company(self):
|
# def supplier_invoice_company(self):
|
||||||
# pass
|
# pass
|
||||||
|
|||||||
@@ -8,5 +8,10 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<field name="inherit" ref="document_incoming.document_incoming_configuration_view_form"/>
|
<field name="inherit" ref="document_incoming.document_incoming_configuration_view_form"/>
|
||||||
<field name="name">document_incoming_configuration_form</field>
|
<field name="name">document_incoming_configuration_form</field>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.ui.view" id="document_incoming_view_list_wr">
|
||||||
|
<field name="model">document.incoming</field>
|
||||||
|
<field name="inherit" ref="document_incoming.document_incoming_view_list"/>
|
||||||
|
<field name="name">document_incoming_list_wr</field>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</tryton>
|
</tryton>
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
version=7.2.0
|
version=7.2.0
|
||||||
depends:
|
depends:
|
||||||
document_incoming
|
document_incoming
|
||||||
|
automation
|
||||||
ir
|
ir
|
||||||
party
|
party
|
||||||
xml:
|
xml:
|
||||||
document.xml
|
document.xml
|
||||||
|
view/document_incoming_list.xml
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?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. -->
|
||||||
|
<data>
|
||||||
|
<xpath expr="/tree/field[@name='result']" position="after">
|
||||||
|
<field name="result_notes" expand="2"/>
|
||||||
|
</xpath>
|
||||||
|
</data>
|
||||||
Reference in New Issue
Block a user