fix: fix CORE op model reference

This commit is contained in:
Lance Edgar 2024-07-14 08:36:41 -05:00
parent 24213f22c9
commit b7ad6ba37f

View file

@ -786,9 +786,12 @@ class ProductCostImporter(FromCOREPOS, corepos_importing.model.ProductCostImport
self.products_by_item_id = self.cache_model(model.Product, key='item_id') self.products_by_item_id = self.cache_model(model.Product, key='item_id')
def query(self): def query(self):
corepos = self.app.get_corepos_handler()
op_model = corepos.get_model_office_op()
query = super().query() query = super().query()
query = query.options(orm.joinedload(corepos.VendorItem.product)) query = query.options(orm.joinedload(op_model.VendorItem.product))
return query return query