Hello community,
I have a query, from a duplicate reception order and change the type of operation to order of delivery or delivery order, this to save time writing all the products, but when I change the operation type of income (example) Bodeg/IN/00001 keeps the name of the document bodeg/IN when it should be bodeg / OUT- the number of the consecutive one that corresponds to it...
how can I solve this or is there an additional module that can transform a receipt into a delivery order or delivery order?
Regards!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
3
Trả lời
5759
Lượt xem
I can't solve ... I don't understand it well
Hi,
if you want to create a delivery order from reception order,just try the following
for order in self:
product_ids = []
for line in order.move_ids_without_package:
product_ids.append((0, 0,
{
'name': line.product_id.name,
'product_id': line.product_id.id,
'product_uom_qty': line.product_qty,
'product_uom_id': line.product_id.uom_id.id,
'product_uom': line.product_id.uom_id.id,
'location_dest_id': destination_location,
'location_id': source_location,
}))
pick = {
'picking_type_id': Operation_type,
'partner_id': Partner,
'origin': name,
'location_dest_id': destination_location,
'location_id': source_location,
'move_ids_without_package': product_ids
}
self.env['stock.picking'].create(pick)
Thanks for your response, I'm not very good with odoo programming ...
Where can I add these lines?
Thank you again for your help!
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
3
thg 8 19
|
3637 | ||
|
0
thg 3 15
|
3122 | ||
|
1
thg 5 25
|
1124 | ||
|
1
thg 12 22
|
1109 | ||
|
4
thg 12 18
|
4906 |