20.01.26
This commit is contained in:
@@ -28,10 +28,7 @@ class Incoming(metaclass=PoolMeta):
|
|||||||
return super()._get_results() | {'automation.document'}
|
return super()._get_results() | {'automation.document'}
|
||||||
|
|
||||||
def _process_weight_report(self):
|
def _process_weight_report(self):
|
||||||
pool = Pool()
|
WR = Pool().get('automation.document')
|
||||||
WR = pool.get('automation.document')
|
|
||||||
# Configuration = pool.get('document.incoming.configuration')
|
|
||||||
# config = Configuration(1)
|
|
||||||
wr = WR()
|
wr = WR()
|
||||||
wr.document = self.id
|
wr.document = self.id
|
||||||
wr.type = 'weight_report'
|
wr.type = 'weight_report'
|
||||||
@@ -39,6 +36,10 @@ 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])
|
||||||
|
|
||||||
|
WeightReport = Pool().get('weight.report')
|
||||||
|
WeightReport.create_from_json(wr.metadata_json)
|
||||||
|
|
||||||
return wr
|
return wr
|
||||||
|
|
||||||
# @property
|
# @property
|
||||||
|
|||||||
Reference in New Issue
Block a user