{
	"name": "table/manager/product/production_order.json",
	"table_name": "production_order",
	"table_prefix": "pro",
	"main_table": "product",
	"record_type": [""],
	"default_order": [{
			"field": "product_id",
			"order": ">"
		},
		{
			"field": "production_lot",
			"order": ">"
		}
	],
	"save_script": [],
	"calculated_field": {
		"json_data.actual_end_date": {
			"type": "date"
		},
		"json_data.critical_delayed_end_date": {
			"type": "date"
		},
		"json_data.critical_end_date": {
			"type": "date"
		},
		"json_data.critical_real_end_date": {
			"type": "date"
		},
		"json_data.critical_start_date": {
			"type": "date"
		},
		"json_data.material_actual_arrival_date": {
			"type": "date"
		},
		"json_data.material_estimated_arrival_date": {
			"type": "date"
		}
	},
	"field": [{
			"field_length": 40,
			"field_name": "company_id",
			"foreign_key": [{
				"link_type": "prevent delete",
				"linked_field": "company_id",
				"linked_record_type": "",
				"linked_table": "company",
				"linking_record_type": ""
			}],
			"not_allowed_value": [""]
		},
		{
			"field_name": "critical_date"
		},
		{
			"field_name": "critical_start_date"
		},
		{
			"field_length": 40,
			"field_name": "drawing_number"
		},
		{
			"field_name": "failed_amount",
			"field_type": "double"
		},
		{
			"field_name": "info"
		},
		{
			"field_name": "produced_amount",
			"field_type": "double"
		},
		{
			"field_length": 80,
			"field_name": "product_id",
			"foreign_key": [{
				"link_type": "prevent delete",
				"linked_field": "product_id",
				"linked_record_type": "",
				"linked_table": "product",
				"linking_record_type": ""
			}]
		},
		{
			"constraint": ["primary key", "unique"],
			"field_length": 40,
			"field_name": "production_lot",
			"not_allowed_value": [""]
		},
		{
			"field_length": 20,
			"field_name": "production_order_id"
		},
		{
			"field_length": 40,
			"field_name": "production_order_state"
		},
		{
			"field_length": 80,
			"field_name": "project_id"
		},
		{
			"field_name": "remaining_amount",
			"field_type": "double"
		},
		{
			"field_name": "row_number"
		},
		{
			"field_length": 40,
			"field_name": "sales_order_id",
			"foreign_key": [{
				"link_type": "prevent delete",
				"linked_field": "order_id",
				"linked_record_type": "",
				"linked_table": "order",
				"linking_record_type": ""
			}]
		},
		{
			"field_name": "sales_order_row"
		},
		{
			"field_name": "started_amount",
			"field_type": "double"
		}
	],
	"extra_field": [{
			"field_name": "json_data.est_finish_difference",
			"field_type": "double"
		},
		{
			"field_name": "json_data.transfer_id",
			"field_type": "varchar",
			"length": 120
		},
		{
			"field_name": "json_data.critical_real_end_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.actual_end_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.track_time_status",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.parent_production_lot",
			"field_type": "varchar",
			"length": 80
		},
		{
			"field_name": "json_data.critical_start_difference",
			"field_type": "double"
		},
		{
			"field_name": "json_data.material_actual_arrival_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.firm_id",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.start_time",
			"field_type": "time without time zone"
		},
		{
			"field_name": "json_data.est_finish_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.work__position_num_id",
			"field_type": "varchar",
			"length": 60
		},
		{
			"field_name": "json_data.finished_work_phase",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.partial_delivery_number",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.material_estimated_arrival_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.stock_event",
			"field_type": "text"
		},
		{
			"field_name": "json_data.type",
			"field_type": "varchar",
			"length": 20
		},
		{
			"field_name": "json_data.modifier_id",
			"field_type": "varchar",
			"length": 40
		},
		{
			"field_name": "json_data.critical_delayed_end_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.creation_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.work_order_type",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.critical_end_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.transfer_info",
			"field_type": "text"
		},
		{
			"field_name": "json_data.in_report",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.est_finish_time",
			"field_type": "time without time zone"
		},
		{
			"field_name": "json_data.print_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.critical_start_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.pricing_state",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.serial_number",
			"field_type": "varchar",
			"length": 80
		},
		{
			"field_name": "json_data.sales_price__unit",
			"field_type": "double"
		},
		{
			"field_name": "json_data.delivery_date",
			"field_type": "date"
		},
		{
			"field_name": "json_data.purchase_order_id",
			"field_type": "varchar",
			"length": 20
		},
		{
			"field_name": "json_data.transfer_state",
			"field_type": "integer"
		}
	],
	"default_field": "table/default_field.json",
	"field_change": [{
			"name": "production_order_state",
			"old_name": ["state"]
		},
		{
			"name": "sales_order_row",
			"old_name": ["sales_order_row"]
		}
	]
}