diff --git a/tailbone/views/products.py b/tailbone/views/products.py index 10561582..bf5a974d 100644 --- a/tailbone/views/products.py +++ b/tailbone/views/products.py @@ -518,6 +518,8 @@ class ProductsView(MasterView): i = fields.index('current_price_uuid') fields.insert(i + 1, 'current_price') + fields.append('unit_cost') + return fields def get_xlsx_row(self, product, fields): @@ -563,6 +565,9 @@ class ProductsView(MasterView): if 'current_price' in fields: row['current_price'] = product.current_price.price if product.current_price else None + if 'unit_cost' in fields: + row['unit_cost'] = product.cost.unit_cost if product.cost else None + return row def get_instance(self):