This commit is contained in:
2026-01-20 19:46:48 +01:00
parent d9ab3cfe47
commit ecdc4b283d

View File

@@ -28,10 +28,7 @@ class Incoming(metaclass=PoolMeta):
return super()._get_results() | {'automation.document'}
def _process_weight_report(self):
pool = Pool()
WR = pool.get('automation.document')
# Configuration = pool.get('document.incoming.configuration')
# config = Configuration(1)
WR = Pool().get('automation.document')
wr = WR()
wr.document = self.id
wr.type = 'weight_report'
@@ -39,6 +36,10 @@ class Incoming(metaclass=PoolMeta):
WR.save([wr])
WR.run_ocr([wr])
WR.run_metadata([wr])
WeightReport = Pool().get('weight.report')
WeightReport.create_from_json(wr.metadata_json)
return wr
# @property