Cleanup attribute names for CORE Product model
This commit is contained in:
		
							parent
							
								
									b2b6dd0139
								
							
						
					
					
						commit
						699900cbc5
					
				
					 1 changed files with 9 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -43,23 +43,12 @@ class ProductView(CoreOfficeMasterView):
 | 
			
		|||
    labels = {
 | 
			
		||||
        'id': "ID",
 | 
			
		||||
        'upc': "UPC",
 | 
			
		||||
        'pricemethod': "Price Method",
 | 
			
		||||
        'groupprice': "Group Price",
 | 
			
		||||
        'specialpricemethod': "Special Price Method",
 | 
			
		||||
        'specialgroupprice': "Special Group Price",
 | 
			
		||||
        'specialquantity': "Special Quantity",
 | 
			
		||||
        'dept_no': "Dept. No.",
 | 
			
		||||
        'department_number': "Dept. No.",
 | 
			
		||||
        'foodstamp': "Food Stamp",
 | 
			
		||||
        'scaleprice': "Scale Price",
 | 
			
		||||
        'mixmatchcode': "Mix Match Code",
 | 
			
		||||
        'tareweight': "Tare Weight",
 | 
			
		||||
        'discounttype': "Discount Type",
 | 
			
		||||
        'unitofmeasure': "Unit of Measure",
 | 
			
		||||
        'qttyEnforced': "Qty. Enforced",
 | 
			
		||||
        'idEnforced': "ID Enforced",
 | 
			
		||||
        'inUse': "In Use",
 | 
			
		||||
        'numflag': "Flags",
 | 
			
		||||
        'subdept': "Subdept. No.",
 | 
			
		||||
        'unit_of_measure': "Unit of Measure",
 | 
			
		||||
        'quantity_enforced': "Qty. Enforced",
 | 
			
		||||
        'id_enforced': "ID Enforced",
 | 
			
		||||
        'subdepartment_number': "Subdept. No.",
 | 
			
		||||
        'default_vendor_id': "Default Vendor 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('numflag', self.render_flags)
 | 
			
		||||
        f.set_renderer('flags', self.render_flags)
 | 
			
		||||
 | 
			
		||||
        f.set_type('start_date', 'datetime_local')
 | 
			
		||||
        f.set_type('end_date', 'datetime_local')
 | 
			
		||||
        f.set_type('modified', 'datetime_local')
 | 
			
		||||
 | 
			
		||||
        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('specialgroupprice', 'currency')
 | 
			
		||||
        f.set_type('special_group_price', 'currency')
 | 
			
		||||
        f.set_type('cost', 'currency')
 | 
			
		||||
        f.set_type('deposit', 'currency')
 | 
			
		||||
 | 
			
		||||
    def render_flags(self, product, field):
 | 
			
		||||
        flags = product.numflag
 | 
			
		||||
        flags = product.flags
 | 
			
		||||
        if not flags:
 | 
			
		||||
            return ""
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue