Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
1.2 kB
2
Indexable
Never
stock move

"name": val.get('sequence'),
"sequence": 1,
"priority": 1,
"date": val.get('date'),
"company_id": 1,
"date_expected": val.get('date'),
"product_id": val.get('product_id'),
"product_qty": val.get('quantity'),
"product_uom_qty": val.get('quantity'),
"product_uom": val.get('uom_id'),
"location_id": val.get('location_src_id'),
"location_dest_id": val.get('location_dest_id'),
"picking_id": val.get('picking_id'),
"note": "",
"state": "done",
"price_unit": 0,
"origin": "POS Teraoka",
"procure_method": "make_to_stock",
"scrapped": False,
"picking_type_id": val.get('picking_type_id')

stock move line
"picking_id": val.get('picking_id'),
"move_id": val.get('move_id'),
"company_id": 1,
"product_id": val.get('product_id'),
"product_uom_id": val.get('uom_id'),
"product_qty": 0,
"product_uom_qty": 0,
"qty_done": val.get('quantity'),
"date": val.get('date'),
"location_id": val.get('location_src_id'),
"location_dest_id": val.get('location_dest_id'),
"state": "done",
"reference": "POS Teraoka"

stock quant
"product_id": val.get('product_id'),
"company_id": 1,
"location_id": val.get('location_src_id'),
"quantity": -1 * (val.get('quantity') or 0),
"reserved_quantity": 0