Add date + result_notes in document_incoming

This commit is contained in:
2026-04-21 18:40:51 +02:00
parent cfb719a7da
commit b1680cc96c
5 changed files with 29 additions and 1 deletions

View File

@@ -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