20.01.26
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user