I tried to find the method concerned to do the job but I couldn't.
I tried to inherit the _prepare_procurement_values from but wasn't able to get it to work. I found solutions for other versions in here but not for odoo 11. Please help.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I tried to find the method concerned to do the job but I couldn't.
I tried to inherit the _prepare_procurement_values from but wasn't able to get it to work. I found solutions for other versions in here but not for odoo 11. Please help.
There is no way to pass any custom value directly from Sales Order to Picking. But, still there is a way to do that as follow:
1) There is a m2o field in "procurement.group" object called "sale_id" and we can use this field to fetch the data from Sales Order.
2) Override "_get_new_picking_values" method of the "stock.move" object and add a field of the picking to which you want to pass the value and fetch the value from the "self.group_id.sale_id.field_name"
Ex I want to pass some texts to note field of the picking:
Class StockMove(models.Model):
_inherit = 'stock.move'
def _get_new_picking_values(self):
res = super(StockMove, self)._get_new_picking_values()
# Pass value of note field from Sales Order to Picking
res.update({'note': self.group_id.sale_id.note})
return res
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 | |
---|---|---|---|---|
|
1
thg 4 25
|
1134 | ||
|
0
thg 5 23
|
3005 | ||
|
1
thg 1 25
|
7003 | ||
|
1
thg 9 18
|
4602 | ||
Client order ref on delivery orders
Đã xử lý
|
|
3
thg 3 15
|
8528 |
Have a look into odoo customization tips: https://old.reddit.com/r/learnopenerp/
I am having the similar issues.