{
"actions": {
"POST": {
"id": {
"type": "integer",
"required": false,
"read_only": false,
"label": "ID"
},
"revision_display": {
"type": "field",
"required": false,
"read_only": true,
"label": "Revision display"
},
"revision": {
"type": "integer",
"required": false,
"read_only": true,
"label": "Revision"
},
"sub_revision": {
"type": "integer",
"required": false,
"read_only": true,
"label": "Sub Revision"
},
"user_editable": {
"type": "field",
"required": false,
"read_only": true,
"label": "User editable"
},
"revision_editable": {
"type": "field",
"required": false,
"read_only": true,
"label": "Revision editable"
},
"status": {
"type": "choice",
"required": false,
"read_only": true,
"label": "Status"
},
"status_name": {
"type": "field",
"required": false,
"read_only": true,
"label": "Status name"
},
"approval_status": {
"type": "choice",
"required": false,
"read_only": true,
"label": "Approval Status"
},
"approval_status_name": { // ADDED
"type": "field",
"required": false,
"read_only": true,
"label": "Approval Status name"
},
"approval_flow": { // NOTE: See also: `approval_flow_instruction` field for more info.
"type": "field",
"required": true,
"read_only": false,
"label": "Approval Flow"
},
"approval_flow_instruction": {
"type": "field",
"required": false,
"read_only": true,
"label": "Approval flow instruction",
"child": {
"type": "nested object",
"required": false,
"read_only": true,
"children": {
"approver": {
"type": "field",
"required": true,
"read_only": false,
"label": "Approver",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"role": {
"type": "choice",
"required": true,
"read_only": false,
"label": "Role",
"choices": [
{
"display_name": "Requester",
"value": 1
},
{
"display_name": "Owner",
"value": 2
},
{
"display_name": "Approver",
"value": 3
}
]
},
"approved_date": {
"type": "datetime",
"required": false,
"read_only": false,
"label": "Approved Date"
}
}
}
},
// NOTE: According to `requester_name`, `owner_name` and `assistant_name` field, please specify as '-' (dash) when the `requester`, `owner` and `assistant` field are respectively left blank.
"requester": {
"type": "field",
"required": true,
"read_only": false,
"label": "Requester",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"requester_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Requester name"
},
"owner": {
"type": "field",
"required": true,
"read_only": false,
"label": "Owner",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"owner_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Owner name"
},
"assistant": {
"type": "field",
"required": false,
"read_only": false,
"label": "Assistant",
"choices": [
{
"display_name": "AAAA - ปวริศ แสงปรีชารัตน์ 1",
"value": "3"
},
{
"display_name": "AAAB - ปวริศ แสงปรีชารัตน์ 2",
"value": "2"
},
{
"display_name": "admin (Superuser)",
"value": "1"
}
]
},
"assistant_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Assistant name"
},
"numbering_code": {
"type": "field",
"required": true,
"read_only": false,
"label": "Numbering code",
"choices": [
{
"display_name": "A",
"value": "2"
}
]
},
"reserved_no": {
"type": "string",
"required": true,
"read_only": false,
"label": "Reserved No.",
"max_length": 50
},
"approved_no": {
"type": "string",
"required": false,
"read_only": true,
"label": "Approved No."
},
"company": {
"type": "field",
"required": true,
"read_only": false,
"label": "Company",
"choices": [
{
"display_name": "COM01 - บริษัท 1",
"value": "1"
},
{
"display_name": "COM02 - บริษัท 2",
"value": "2"
}
]
},
"company_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Assistant name"
},
"date": {
"type": "date",
"required": true,
"read_only": false,
"label": "Date"
},
"date_long": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Date long"
},
"sensitivity_level": {
"type": "choice",
"required": true,
"read_only": false,
"label": "Sensitivity Level",
"choices": [
{
"display_name": "Official",
"value": 1
},
{
"display_name": "Restricted",
"value": 2
},
{
"display_name": "Confidential",
"value": 3
},
{
"display_name": "Secret",
"value": 4
},
{
"display_name": "Top Secret",
"value": 5
}
]
},
"sensitivity_level_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Sensitivity Level name"
},
"external_ref_no": {
"type": "string",
"required": false,
"read_only": false,
"label": "External Ref No.",
"max_length": 20
},
"customer": {
"type": "field",
"required": true,
"read_only": false,
"label": "Customer",
"choices": [
{
"display_name": "1 - บริษัท 91",
"value": "1"
},
{
"display_name": "2 - บริษัท 92",
"value": "2"
}
]
},
"customer_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Customer name"
},
"customer_tax_id": { // MODIFIED, RENAME THE KEY: 'tax_id' -> 'customer_tax_id'
"type": "string", // *
"required": false,
"read_only": false,
"label": "Customer Tax ID", // *
"max_length": 25
},
"customer_address": { // MODIFIED, RENAME THE KEY: 'address' -> 'customer_address'
"type": "string", // *
"required": false,
"read_only": false,
"label": "Customer address", // *
"max_length": 255
},
"contract": {
"type": "field",
"required": true,
"read_only": false,
"label": "Contract",
"choices": [
{
"display_name": "a",
"value": "1"
},
{
"display_name": "a",
"value": "3"
},
{
"display_name": "a",
"value": "4"
},
{
"display_name": "a",
"value": "5"
}
]
},
"contract_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Contract name",
},
"contract_person": { // ADDED
"type": "field",
"required": true,
"read_only": false,
"label": "Contract's contact person",
"child": {
"type": "nested object",
"required": false,
"read_only": false,
"children": {
"name": {
"type": "string",
"required": true, // *
"read_only": false,
"label": "Name",
},
"email": {
"type": "email", // *
"required": true,
"read_only": false,
"label": "Email",
},
"phone": {
"type": "string",
"required": true, // *
"read_only": false,
"label": "Phone",
}
}
}
},
"payment_term": {
"type": "field",
"required": true,
"read_only": false,
"label": "Payment Term",
"choices": [
{
"display_name": "5/15 N/30",
"value": "1"
},
{
"display_name": "10/25",
"value": "4"
}
]
},
"payment_term_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Payment term name",
},
"export_warehouse": {
"type": "field",
"required": true,
"read_only": false,
"label": "Export Warehouse",
"choices": [
{
"display_name": "W000001 - พระราม 9",
"value": "1"
},
{
"display_name": "W000002 - ห้วยขวาง",
"value": "2"
}
]
},
"export_warehouse_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Export warehouse name",
},
"business_unit": {
"type": "field",
"required": true,
"read_only": false,
"label": "Business Unit",
"choices": [
{
"display_name": "U0901 - สายการผลิต",
"value": "1"
},
{
"display_name": "U0902 - สายบรรจุภัณฑ์",
"value": "2"
}
]
},
"business_unit_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Business unit name",
},
"delivery_term": {
"type": "choice",
"required": false,
"read_only": false,
"label": "Delivery Term",
"choices": [
{
"display_name": "Ex Work",
"value": "EXW"
},
{
"display_name": "Free Carrier",
"value": "FCA"
},
{
"display_name": "Carriage Paid to",
"value": "CPT"
},
{
"display_name": "Carriage and Insurance Paid to",
"value": "CIP"
},
{
"display_name": "Delivered at Terminal",
"value": "DAT"
},
{
"display_name": "Delivered at Place",
"value": "DAP"
},
{
"display_name": "Delivered Duty Paid",
"value": "DDP"
},
{
"display_name": "Free Alongside Ship",
"value": "FAS"
},
{
"display_name": "Free on Board",
"value": "FOB"
},
{
"display_name": "Cost and Freight",
"value": "CFR"
},
{
"display_name": "Cost, Insurance and Freight",
"value": "CIF"
}
]
},
"delivery_point": {
"type": "string",
"required": true,
"read_only": false,
"label": "Delivery Point",
"max_length": 255
},
"final_destination": { // MODIFIED, MOVE THE OLD VALUE TO `final_destination_address` AND CHANGED TO SELECT FIELD
"type": "field",
"required": false,
"read_only": false,
"label": "Final Destination",
"choices": [
{
"display_name": "17/4 Village No.5 Bamroongrat Road, Pibulsongkram Sub-district, Muang District, Bangkok, 10400",
"value": "1"
},
{
"display_name": "17/5 Village No.5 Bamroongrat Road, Pibulsongkram Sub-district, Muang District, Bangkok, 10400",
"value": "2"
}
]
},
"final_destination_address": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Final Destination address",
"max_length": 255
},
"remark": {
"type": "string",
"required": false,
"read_only": false,
"label": "Remark"
},
"price_inclusive_tax": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Price Inclusive Tax"
},
"currency": {
"type": "string",
"required": true,
"read_only": false,
"label": "Currency",
"max_length": 3
},
"items": { // MODIFIED, RENAME THE KEY: 'sale_order_product_quantities' -> 'items'
"type": "field",
"required": true,
"read_only": false,
"label": "Sale order product quantities",
"child": {
"type": "nested object",
"required": true,
"read_only": false,
"children": {
"id": {
"type": "integer",
"required": false,
"read_only": false,
"label": "ID"
},
"product": {
"type": "field",
"required": true,
"read_only": false,
"label": "Product",
"choices": [
{
"display_name": "1 - Product 1",
"value": "1"
},
{
"display_name": "2 - Product 2",
"value": "2"
}
]
},
"product_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Product name",
},
"pricing_type": {
"type": "field",
"required": false,
"read_only": false,
"label": "Pricing type",
"choices": [
{
"display_name": "Main Pricing type",
"value": "1"
},
{
"display_name": "25% in 5 days",
"value": "3"
},
{
"display_name": "20% in 7 days",
"value": "4"
}
]
},
"pricing_type_name": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Pricing type name",
},
"quantity": {
"type": "decimal",
"required": true,
"read_only": false,
"label": "Quantity"
},
"uom": {
"type": "field",
"required": false,
"read_only": true,
"label": "Uom"
},
"tax": {
"type": "decimal",
"required": true,
"read_only": false,
"label": "Tax"
},
"unit_price": {
"type": "decimal",
"required": true,
"read_only": false,
"label": "Unit Price"
},
"unit_discount": {
"type": "decimal",
"required": true,
"read_only": false,
"label": "Unit Discount"
},
"unit_discount_display_type": { // ADDED, NOTE: It could be either "percent" or "net".
"type": "string",
"required": true,
"read_only": false,
"label": "Unit Discount display type"
},
"amount": {
"type": "decimal",
"required": true,
"read_only": false,
"label": "Amount"
},
"required_date": {
"type": "date",
"required": true,
"read_only": false,
"label": "Required Date"
},
/* // REMOVED
"sale_order": {
"type": "field",
"required": false,
"read_only": false,
"label": "Sale order",
"choices": [
{
"display_name": "SRR1COM01-0003",
"value": "11"
},
{
"display_name": "SRR1COM01-0004",
"value": "12"
},
{
"display_name": "SRR1COM01-0005",
"value": "13"
},
{
"display_name": "SRR1COM02-0002",
"value": "15"
},
{
"display_name": "SOR1COM01-0001",
"value": "8"
},
{
"display_name": "SOR1COM01-0001",
"value": "9"
},
{
"display_name": "SRR1COM01-0007",
"value": "16"
},
{
"display_name": "SRR1COM02-0001",
"value": "10"
},
{
"display_name": "SRR1COM01-0008",
"value": "17"
},
{
"display_name": "SRR1COM01-0006",
"value": "14"
},
{
"display_name": "SRR1COM01-0009",
"value": "18"
},
{
"display_name": "SRR1COM01-0010",
"value": "19"
},
{
"display_name": "SRR1COM01-0011",
"value": "20"
},
{
"display_name": "SRR1COM01-0012",
"value": "21"
},
{
"display_name": "SOR1COM01-0001",
"value": "22"
},
{
"display_name": "SRR1COM01-0014",
"value": "23"
},
{
"display_name": "SOR1COM01-0001",
"value": "24"
}
]
}
*/
}
}
},
"grand_total": { // ADDED
"type": "decimal", // *
"required": false,
"read_only": true,
"label": "Grand Total",
},
"grand_total_in_words": { // ADDED
"type": "string", // *
"required": false,
"read_only": true,
"label": "Grand Total (in words)",
},
"submit": {
"type": "boolean",
"required": false,
"read_only": false,
"label": "Submit"
},
}
}
}
The Sample API Result
Module name: Sale Order
Sample view: OPTIONS view
NOTE: There're 3 marker types at the end of lines:
- REMOVED: The field should be removed.
- ADDED: the field should be added. In each field's options object, some lines are marked with asterisks (*) which mean I'm not sure the correctness of the key-value. Please let me know if there're the point that's incorrect or better if we improve them.
- MODIFIED: the field has been edited from the current version in somewhat, please read more info at that line.
Module name: Sale Order
Sample view: OPTIONS view
NOTE: There're 3 marker types at the end of lines:
- REMOVED: The field should be removed.
- ADDED: the field should be added. In each field's options object, some lines are marked with asterisks (*) which mean I'm not sure the correctness of the key-value. Please let me know if there're the point that's incorrect or better if we improve them.
- MODIFIED: the field has been edited from the current version in somewhat, please read more info at that line.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.