Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
2469 มุมมอง

Hi, I'm trying to locate where are stock pickings created when confirming a purchase order in python. I'm using Odoo v17.


Thank you in advance


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

 In Odoo 17, when you confirm a Purchase Order (PO), the related stock pickings (i.e., incoming shipments) are created inside the purchase.order model.

Location/Path: https://github.com/odoo/odoo/blob/169d9133c7d86278bc2ac679deb61bdcd6679cf7/addons/purchase_stock/models/purchase_order.py#L237

Function :  _create_picking()


Hope it helps.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

In odoo/addons/purchase_stock/models/purchase_order.py

In function _create_picking called in function button_approve

https://github.com/odoo/odoo/blob/17.0/addons/purchase_stock/models/purchase_order.py#L237-L264

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

anyone know why they confirm immediately after confirm purchase. why they not set them to draft or let us create manually from PO

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

When you confirm the purchase order, it will generate receipt. So if you need to know from where the stock pickings are created, you need to navigate to inventory module > configurations > Operation Types > Receipts. Here you can see the source location and destination location. Means, the stocks are transferring from which location to which location


Here the stocks will get transfer from "Partners/Vendors" to "WH/Stock", when generating receipts. You can also change the locations, as per your business need.


Note: You should enable "Storage Locations" in inventory module > Configuration > Settings, so that you can view source and destination locations in respective operation type

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
6
พ.ค. 20
4829
0
มี.ค. 15
4399
1
มิ.ย. 22
3379
2
พ.ย. 21
2836
0
พ.ย. 20
2640