Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4723 Lượt xem

Searched around for modules, i've found dx_sale_line_delivered which works perfect for v6.1 and v7(with minor changes)
But for v8, since the new WMS introduced, line.move_ids has been removed? Code extracted from dx_sale_line_delivered:


class sale_order_line(osv.osv):

_inherit = 'sale.order.line'

def _delivered_qty(self, cr, uid, ids, field_name, arg, context=None):

move_obj = self.pool.get('stock.move')

res = {}

for line in self.browse(cr, uid, ids, context=context):

qty = 0

for move in line.move_ids:

if move.state == 'done':

qty += move.product_qty

res[line.id] = qty

return res

 

Any advice on how to migrate this module to v8? Thanks   



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

See this post and proposed solution. I tested. It works

Ảnh đại diện
Huỷ bỏ
Tác giả

It shows picked rate of sale.order, not sale.order.line. picked rate for whole order is merely useless for multiple lines order. Thanks anyway.

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 23
1948
2
thg 12 24
21787
0
thg 9 24
1331
3
thg 8 24
2653
0
thg 2 24
1753