Stock Adjustment
Get Stock Quant Line
Before inserting a stock quant line, you should always check for an existing matching line first.
Odoo only allows one line per product per location. This means you must either:
Update the existing line, or
Insert a new one (if no matching line exists).
To query stock locations you can navigate here. And as for products you can navigate here
{
"id": "839dj3ud9829302jd",
"action": "search",
"model_id": "stock.quant",
"keyword": {
"context": {
"allowed_company_ids": [
1
],
"default_company_id": 1,
"tz": "Asia/Singapore"
}
},
"params": [
[
["product_id","=",14],
["location_id","=", 8]
]
],
"odoo_instance": {
"url": "YOUR_ODOO_INSTANCE_URL",
"user_id": INT(YOUR_USER_ID),
"db": "YOUR_ODOO_DB",
"api_key": "YOUR_ODOO_API_KEY"
}
}Insert a new one
Update Stock Count Quantity
Apply Stock Count Quantity
Last updated