Changeset - 59abc4995ea8
[Not reviewed]
0 1 0
Lance Edgar - 4 years ago 2021-01-21 18:16:56
lance@edbob.org
Fix 'size' and push 'unitofmeasure' when exporting to CORE Products
1 file changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general) First comment
rattail_corepos/corepos/importing/rattail.py
Show inline comments
 
@@ -2,7 +2,7 @@
 
################################################################################
 
#
 
#  Rattail -- Retail Software Framework
 
#  Copyright © 2010-2020 Lance Edgar
 
#  Copyright © 2010-2021 Lance Edgar
 
#
 
#  This file is part of Rattail.
 
#
 
@@ -31,7 +31,7 @@ from sqlalchemy import orm
 
from rattail import importing
 
from rattail.db import model
 
from rattail.db.util import short_session
 
from rattail.util import OrderedDict
 
from rattail.util import OrderedDict, pretty_quantity
 
from rattail_corepos.corepos import importing as corepos_importing
 
from rattail_corepos.corepos.util import get_max_existing_vendor_id
 

	
 
@@ -280,6 +280,7 @@ class ProductImporter(FromRattail, corepos_importing.model.ProductImporter):
 
        'brand',
 
        'description',
 
        'size',
 
        'unitofmeasure',
 
        'department',
 
        'normal_price',
 
        'foodstamp',
 
@@ -300,7 +301,8 @@ class ProductImporter(FromRattail, corepos_importing.model.ProductImporter):
 
            'upc': upc,
 
            'brand': product.brand.name if product.brand else '',
 
            'description': product.description or '',
 
            'size': product.size or '',
 
            'size': pretty_quantity(product.unit_size),
 
            'unitofmeasure': product.uom_abbreviation,
 
            'department': str(product.department.number) if product.department else None,
 
            'normal_price': '{:0.2f}'.format(product.regular_price.price) if product.regular_price else None,
 
            'foodstamp': '1' if product.food_stampable else '0',
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now