Cleanup attribute names for CORE Product model

This commit is contained in:
Lance Edgar 2019-08-14 20:48:27 -05:00
parent b2b6dd0139
commit 699900cbc5

View file

@ -43,23 +43,12 @@ class ProductView(CoreOfficeMasterView):
labels = { labels = {
'id': "ID", 'id': "ID",
'upc': "UPC", 'upc': "UPC",
'pricemethod': "Price Method", 'department_number': "Dept. No.",
'groupprice': "Group Price",
'specialpricemethod': "Special Price Method",
'specialgroupprice': "Special Group Price",
'specialquantity': "Special Quantity",
'dept_no': "Dept. No.",
'foodstamp': "Food Stamp", 'foodstamp': "Food Stamp",
'scaleprice': "Scale Price", 'unit_of_measure': "Unit of Measure",
'mixmatchcode': "Mix Match Code", 'quantity_enforced': "Qty. Enforced",
'tareweight': "Tare Weight", 'id_enforced': "ID Enforced",
'discounttype': "Discount Type", 'subdepartment_number': "Subdept. No.",
'unitofmeasure': "Unit of Measure",
'qttyEnforced': "Qty. Enforced",
'idEnforced': "ID Enforced",
'inUse': "In Use",
'numflag': "Flags",
'subdept': "Subdept. No.",
'default_vendor_id': "Default Vendor ID", 'default_vendor_id': "Default Vendor ID",
'current_origin_id': "Current Origin ID", 'current_origin_id': "Current Origin ID",
} }
@ -103,21 +92,21 @@ class ProductView(CoreOfficeMasterView):
f.set_renderer('vendor', self.render_corepos_vendor) f.set_renderer('vendor', self.render_corepos_vendor)
f.set_renderer('numflag', self.render_flags) f.set_renderer('flags', self.render_flags)
f.set_type('start_date', 'datetime_local') f.set_type('start_date', 'datetime_local')
f.set_type('end_date', 'datetime_local') f.set_type('end_date', 'datetime_local')
f.set_type('modified', 'datetime_local') f.set_type('modified', 'datetime_local')
f.set_type('normal_price', 'currency') f.set_type('normal_price', 'currency')
f.set_type('groupprice', 'currency') f.set_type('group_price', 'currency')
f.set_type('special_price', 'currency') f.set_type('special_price', 'currency')
f.set_type('specialgroupprice', 'currency') f.set_type('special_group_price', 'currency')
f.set_type('cost', 'currency') f.set_type('cost', 'currency')
f.set_type('deposit', 'currency') f.set_type('deposit', 'currency')
def render_flags(self, product, field): def render_flags(self, product, field):
flags = product.numflag flags = product.flags
if not flags: if not flags:
return "" return ""