{
	"name": "form/nc/erp-sync/odoo/save/order_row-invoice.json",
	"save": [
		{
			"table": "order_row",
			"record_type": "invoice",
			"row_number_field": [
				{
					"field": "ordr.row_number",
					"start_value": 1
				}
			]
		}
	],
	"parameter": {
		"show_sql": false
	},
	"run_script": [],
	"run_script-": [
		{
			"find_linked_record": ["ordr.order_id"],
			"init_new_record": true,
			"script_field": ["ordr.product_id", "ordr.order_amount", "ordr.price_without_vat", "ordr.vat_price", "ordr.unit_price"],
			"table": "order_row"
		},
		{
			"init_new_record": false,
			"script_field": ["ord.company_id", "ord.person_id"],
			"table": "order",
			"up_calculate": 1
		}
	]
}
