Sales Order to work Order error in getting quantity

In Sales order, I have a item which has 2 UOM for the items. In my scanerio i have 2 UOM’s which are Nos and Batch where batch = 1000Nos. In sales order to denote 20000 as quantity I’ll enter quantity as 20. In sales order I’ll set Batch as UOM and create work order, there once the work order is created it is taking the qty of batch into quantity to be produced but i need to set the stock uom quantity there, How can I do it?

def make_work_orders(items, sales_order, company, project=None):
        """Make Work Orders against the given Sales Order for the given `items`"""
        items = json.loads(items).get("items")
        out = []
 
        for i in items:
                if not i.get("bom"):
                        frappe.throw(_("Please select BOM against item {0}").format(i.get("item_code")))
                if not i.get("pending_qty"):
                        frappe.throw(_("Please select Qty against item {0}").format(i.get("item_code")))
                frappe.logger().info(f"list all data {i}")
                work_order = frappe.get_doc(
                        dict(
                                doctype="Work Order",
                                production_item=i["item_code"],
                                bom_no=i.get("bom"),
                                qty=i["pending_qty"],
                                company=company,
                                sales_order=sales_order,
                                sales_order_item=i["sales_order_item"],
                                project=project,
                                fg_warehouse=i["warehouse"],
                                description=i["description"],
                        )
                ).insert()
                work_order.set_work_order_operations()
                work_order.flags.ignore_mandatory = True
                work_order.save()
                out.append(work_order)
 
        return [p.name for p in out]

in the above code is it possible to view the uom and qty data like this get(“pending_qty”).