{
	"name": "table/local/product/product.json",
	"table_name": "product",
	"table_prefix": "pr",
	"record_type": ["", "work", "nxmat"],
	"table_name_language": {
		"": "Product",
		"work": "Work",
		"nxmat": "nx material"
	},
	"default_field": "table/prf/default_field.json",
	"default_order": [
		{
			"field": "product_id",
			"order": ">"
		}
	],
	"save_script": [],
	"calculated_field": [],
	"row_table": [
		{
			"field": [
				{
					"name": "header",
					"type": "varchar",
					"field_length": 80
				},
				{
					"name": "value",
					"type": "text"
				}
			],
			"row_table_name": "additional_field",
			"save_field": "pr.json_data"
		}
	],
	"field": [
		{
			"field_name": "product_id",
			"field_type": "varchar",
			"field_length": 80,
			"constraint": ["primary key"],
			"not_allowed_value": [""]
		},
		{
			"field_name": "name",
			"field_type": "varchar",
			"field_length": 200
		},
		{
			"field_name": "work_number_id",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "drawing_number",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "stock_unit",
			"field_type": "varchar",
			"field_length": 20,
			"not_allowed_value": [""]
		},
		{
			"field_name": "design_unit",
			"field_type": "varchar",
			"field_length": 20,
			"not_allowed_value": [""]
		},
		{
			"field_name": "unit_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "ean_code",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "info",
			"field_type": "text"
		},
		{
			"field_name": "product_group",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "subgroup",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "quality",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "product_state",
			"field_type": "integer"
		},
		{
			"field_name": "product_type",
			"field_type": "text"
		},
		{
			"field_name": "stock_type",
			"field_type": "integer",
			"allowed_value": [
				{
					"show": "No stock",
					"value": 0
				},
				{
					"show": "Has stock",
					"value": 1
				}
			]
		},
		{
			"field_name": "production_type",
			"field_type": "integer"
		},
		{
			"field_name": "purchase_price",
			"field_type": "double"
		},
		{
			"field_name": "purchase_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "cost_price",
			"field_type": "double"
		},
		{
			"field_name": "profit_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "sales_price",
			"field_type": "double"
		},
		{
			"field_name": "default_supplier_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_record_type": "supplier",
					"linked_table": "company",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "purchase_order_code_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "order_code_id",
					"linked_record_type": "purchase",
					"linked_table": "order_code",
					"linking_record_type": ""
				}
			],
			"not_allowed_value": [""]
		},
		{
			"field_name": "sales_order_code_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"default_link": true,
					"link_type": "prevent delete",
					"linked_field": "order_code_id",
					"linked_record_type": "sales",
					"linked_table": "order_code",
					"linking_record_type": ""
				}
			],
			"not_allowed_value": [""]
		},
		{
			"field_name": "minimum_order_amount",
			"field_type": "double"
		},
		{
			"field_name": "minimum_stock",
			"field_type": "double",
			"constraint": ["index"]
		},
		{
			"field_name": "setup_time",
			"field_type": "double"
		},
		{
			"field_name": "calculation_lot",
			"field_type": "double"
		}
	],
	"extra_field": [
		{
			"field_name": "json_data.foreign_sales_order_code_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "order_code_id",
					"linked_record_type": "sales",
					"linked_table": "order_code",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "json_data.design_conversion_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "json_data.material_cost_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.material_sales_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.stock_balance",
			"field_type": "double",
			"sync_value": 0,
			"constraint": ["index"]
		},
		{
			"field_name": "json_data.subcontract_cost_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.subcontract_sales_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.design_unit_2",
			"field_type": "varchar",
			"field_length": 20,
			"not_allowed_value": [""]
		},
		{
			"field_name": "json_data.stock_unit_2",
			"field_type": "varchar",
			"field_length": 20,
			"not_allowed_value": [""]
		},
		{
			"field_name": "json_data.default_customer_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_record_type": "customer",
					"linked_table": "company",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "json_data.work_cost_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.action_limit",
			"field_type": "double",
			"constraint": ["index"]
		},
		{
			"field_name": "json_data.critical_date",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.critical_end_date",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.work_sales_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.work_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.normal_purchase_amount",
			"field_type": "double"
		},
		{
			"field_name": "json_data.fixed",
			"field_type": "double",
			"sync_value": 0,
			"constraint": ["index"]
		},
		{
			"field_name": "json_data.available",
			"field_type": "double",
			"sync_value": 0,
			"constraint": ["index"]
		},
		{
			"field_name": "json_data.reserved",
			"field_type": "double",
			"sync_value": 0,
			"constraint": ["index"]
		},
		{
			"field_name": "json_data.purchase_average_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.last_stock_event_date",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.change_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.going_amount",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.manufacturing_cycle_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.net_weight",
			"field_type": "double"
		},
		{
			"field_name": "json_data.firm_id",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.not_in_dispatch_note",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.estimated_average_need",
			"field_type": "double"
		},
		{
			"field_name": "json_data.price_group",
			"field_type": "varchar",
			"field_length": 88
		},
		{
			"field_name": "json_data.order_forecast_days",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.no_billing",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.supplier_price_in_use",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.forecast_days",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.no_discount",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.foreign_purch_pr__unit",
			"field_type": "double"
		},
		{
			"field_name": "json_data.spare_part_need",
			"field_type": "double"
		},
		{
			"field_name": "json_data.average_balance",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.transfer_state",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.size",
			"field_type": "varchar",
			"field_length": 160
		},
		{
			"field_name": "json_data.currency_id",
			"field_type": "varchar",
			"field_length": 12
		},
		{
			"field_name": "json_data.safety_stock_duration",
			"field_type": "double"
		},
		{
			"field_name": "json_data.work_order_type",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.not_in_use",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.picture_path",
			"field_type": "text"
		},
		{
			"field_name": "json_data.no_printing",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.price_change_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.category",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.effect_of_fixed_size",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.parcel_code",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.explanation",
			"field_type": "text"
		},
		{
			"field_name": "json_data.free_amount",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.maximum_stock",
			"field_type": "double"
		},
		{
			"field_name": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 120
		},
		{
			"field_name": "json_data.max_production_amount",
			"field_type": "double"
		},
		{
			"field_name": "json_data.manufacturing_average_need",
			"field_type": "double"
		},
		{
			"field_name": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.work_resource",
			"field_type": "varchar",
			"field_length": 24
		},
		{
			"field_name": "json_data.abc_class",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.inventory_date",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.unit_design_unit_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "json_data.volume",
			"field_type": "double"
		},
		{
			"field_name": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.shelf_stock_balance",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.ean_code2",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.stock_position",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.est_work_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.true_free_amount",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.track_time_status",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.tariff_heading",
			"field_type": "varchar",
			"field_length": 30
		},
		{
			"field_name": "json_data.stock_parcel_in_use",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.stock_balance_wip",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.reclamation_count",
			"field_type": "integer",
			"sync_value": 0
		},
		{
			"field_name": "json_data.no_automatic_stock_remove",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.state",
			"field_type": "varchar",
			"field_length": 4
		},
		{
			"field_name": "json_data.true_going_amount",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.sales_price_locked",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.need_calculation_in_use",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.default_sales_person_id",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.origin",
			"field_type": "varchar",
			"field_length": 160
		},
		{
			"field_name": "json_data.external_stock_balance",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.salary_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.stock_limit_calc_type",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.manufacturing_need",
			"field_type": "double"
		},
		{
			"field_name": "json_data.work_drawing_number",
			"field_type": "varchar",
			"field_length": 160
		},
		{
			"field_name": "json_data.purchase_price_change_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.calculation_type",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.purch_avg_price_start_date",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.purch_avg_price_amount",
			"field_type": "double"
		},
		{
			"field_name": "json_data.unfinished_orders_in_weeks",
			"field_type": "double"
		},
		{
			"field_name": "json_data.material_class",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.raw_material_delivery_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.calculated_sales_pr__unit",
			"field_type": "double"
		},
		{
			"field_name": "json_data.true_coming_amount",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.effect_of_amount",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.supplier_product_code",
			"field_type": "varchar",
			"field_length": 100
		},
		{
			"field_name": "json_data.actual_average_need",
			"field_type": "double"
		},
		{
			"field_name": "json_data.is_in_enclosure",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.in_price_list",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.average_balance_start_date",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.critical_date_real",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.critical_end_date_real",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.cost_center",
			"field_type": "varchar",
			"field_length": 160
		},
		{
			"field_name": "json_data.average_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.dynamic_act_limit_min_val",
			"field_type": "double"
		},
		{
			"field_name": "json_data.dynamic_act_limit_max_val",
			"field_type": "double"
		},
		{
			"field_name": "json_data.coming_amount",
			"field_type": "double",
			"sync_value": 0
		},
		{
			"field_name": "json_data.gross_weight",
			"field_type": "double"
		},
		{
			"field_name": "json_data.max_wanted_stock_balance",
			"field_type": "double"
		},
		{
			"field_name": "json_data.last_stock_removal_date",
			"field_type": "date",
			"sync_value": "1970-01-01"
		},
		{
			"field_name": "json_data.normal_delivery_lot_size",
			"field_type": "double"
		},
		{
			"field_name": "json_data.dynamic_act_limit_in_use",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.document_count",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.product_code",
			"field_type": "varchar",
			"field_length": 88
		},
		{
			"field_name": "json_data.average_rating",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.backordered",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.backorders",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.backorders_allowed",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.button_text",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.catalog_visibility",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.date_created_gmt",
			"field_type": "date"
		},
		{
			"field_name": "json_data.date_modified_gmt",
			"field_type": "date"
		},
		{
			"field_name": "json_data.date_on_sale_from",
			"field_type": "date"
		},
		{
			"field_name": "json_data.date_on_sale_from_gmt",
			"field_type": "date"
		},
		{
			"field_name": "json_data.date_on_sale_to",
			"field_type": "date"
		},
		{
			"field_name": "json_data.date_on_sale_to_gmt",
			"field_type": "date"
		},
		{
			"field_name": "json_data.description",
			"field_type": "text"
		},
		{
			"field_name": "json_data.download_expiry",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.download_limit",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.downloadable",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.external_url",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.featured",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.manage_stock",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.on_sale",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.parent_id",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.price_html",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.purchasable",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.purchase_note",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.rating_count",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.regular_price",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.reviews_allowed",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.shipping_class",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.shipping_class_id",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.shipping_required",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.shipping_taxable",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.short_description",
			"field_type": "text"
		},
		{
			"field_name": "json_data.sku",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.slug",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.sold_individually",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.status",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.tax_class",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.tax_status",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.total_sales",
			"field_type": "double"
		},
		{
			"field_name": "json_data.virtual",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.weight",
			"field_type": "double"
		},
		{
			"field_name": "json_data._links",
			"field_type": "json"
		},
		{
			"field_name": "json_data.categories",
			"field_type": "json"
		},
		{
			"field_name": "json_data.cross_sell_ids",
			"field_type": "json"
		},
		{
			"field_name": "json_data.dimensions",
			"field_type": "json"
		},
		{
			"field_name": "json_data.downloads",
			"field_type": "json"
		},
		{
			"field_name": "json_data.images",
			"field_type": "json"
		},
		{
			"field_name": "json_data.meta_data",
			"field_type": "json"
		},
		{
			"field_name": "json_data.related_ids",
			"field_type": "json"
		},
		{
			"field_name": "json_data.tags",
			"field_type": "json"
		},
		{
			"field_name": "json_data.upsell_ids",
			"field_type": "json"
		},
		{
			"field_name": "json_data.in_stock",
			"field_type": "varchar"
		},
		{
			"field_name": "json_data.sale_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.permalink",
			"field_type": "text"
		},
		{
			"field_name": "json_data.sales_price__unit",
			"field_type": "double"
		},
		{
			"field_name": "json_data.date_created",
			"field_type": "text"
		},
		{
			"field_name": "json_data.drawing_number__material",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.work_id",
			"field_type": "varchar",
			"field_length": 20
		},
		{
			"field_name": "json_data.level",
			"field_type": "integer"
		}
	],
	"field_change": [
		{
			"name": "product_type",
			"old_name": ["type", "product_type"]
		},
		{
			"name": "product_state",
			"old_name": ["record_state"]
		},
		{
			"name": "json_data.supplier_product_code",
			"old_name": ["supplier_material_code"]
		}
	]
}
