Skip to content

Commit 25445d4

Browse files
committed
[IMP] stock_rest_api: added more data to qty dict
1 parent 1888f70 commit 25445d4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

stock_rest_api/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Stock Rest API",
33
"summary": """
44
Rest API for Stock Management""",
5-
"version": "15.0.1.3.1",
5+
"version": "15.0.1.4.0",
66
"author": "Indexa",
77
"depends": ["base_rest", "base_rest_datamodel", "stock", "base_rest_auth_api_key"],
88
"data": [],

stock_rest_api/services/product_services.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,14 @@ def get_product_qty_data(self, values):
8181
except Exception as e:
8282
return {"error": str(e)}, 500
8383

84+
for key, vals in quantities.items():
85+
product_id = product_obj.browse(int(key))
86+
vals.update(
87+
{
88+
"id": product_id.id,
89+
"default_code": product_id.default_code,
90+
"name": product_id.display_name,
91+
}
92+
)
93+
8494
return quantities, 200

0 commit comments

Comments
 (0)