Add datasync support for CORE VendorItem -> ProductCost
This commit is contained in:
parent
580f2093ae
commit
aff04035ff
2 changed files with 12 additions and 1 deletions
rattail_corepos/importing/corepos
|
@ -614,6 +614,7 @@ class ProductCostImporter(FromCOREPOSAPI, corepos_importing.model.ProductCostImp
|
|||
if hasattr(self, 'vendors'):
|
||||
return self.vendors.get(corepos_id)
|
||||
|
||||
model = self.config.get_model()
|
||||
try:
|
||||
return self.session.query(model.Vendor)\
|
||||
.join(model.CoreVendor)\
|
||||
|
@ -626,7 +627,7 @@ class ProductCostImporter(FromCOREPOSAPI, corepos_importing.model.ProductCostImp
|
|||
if hasattr(self, 'corepos_products'):
|
||||
return self.corepos_products.get(item['upc'])
|
||||
|
||||
return self.api.get_vendor_item(item['upc'], item['vendorID'])
|
||||
return self.api.get_product(item['upc'])
|
||||
|
||||
def normalize_host_object(self, item):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue