diff --git a/tailbone/views/products.py b/tailbone/views/products.py index a8ba6447..0d49401b 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -485,9 +485,11 @@ class ProductsView(MasterView): i = fields.index('department_uuid') fields.insert(i + 1, 'department_number') + fields.insert(i + 2, 'department_name') i = fields.index('subdepartment_uuid') fields.insert(i + 1, 'subdepartment_number') + fields.insert(i + 2, 'subdepartment_name') i = fields.index('category_uuid') fields.insert(i + 1, 'category_code') @@ -526,9 +528,13 @@ class ProductsView(MasterView): if 'department_number' in fields: row['department_number'] = product.department.number if product.department else None + if 'department_name' in fields: + row['department_name'] = product.department.name if product.department else None if 'subdepartment_number' in fields: row['subdepartment_number'] = product.subdepartment.number if product.subdepartment else None + if 'subdepartment_name' in fields: + row['subdepartment_name'] = product.subdepartment.name if product.subdepartment else None if 'category_code' in fields: row['category_code'] = product.category.code if product.category else None