Add date + result_notes in document_incoming
This commit is contained in:
@@ -18,6 +18,10 @@ class IncomingConfiguration(metaclass=PoolMeta):
|
||||
class Incoming(metaclass=PoolMeta):
|
||||
__name__ = 'document.incoming'
|
||||
|
||||
result_notes = fields.Function(
|
||||
fields.Text("Result Notes"),
|
||||
'get_result_notes')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
@@ -39,7 +43,7 @@ class Incoming(metaclass=PoolMeta):
|
||||
WR.save([wr])
|
||||
WR.run_ocr([wr])
|
||||
WR.run_metadata([wr])
|
||||
|
||||
WR.run_pipeline([wr])
|
||||
return wr
|
||||
|
||||
def _process_controller(self):
|
||||
@@ -54,6 +58,14 @@ class Incoming(metaclass=PoolMeta):
|
||||
|
||||
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
|
||||
# def supplier_invoice_company(self):
|
||||
# pass
|
||||
|
||||
Reference in New Issue
Block a user