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

Users are receiving more than was ordered, delivering more than was ordered, etc.

What is the best way to do this?

Ảnh đại diện
Huỷ bỏ

**raise UserError**
instead of "raise Warning" for V14 and above.

Câu trả lời hay nhất

If you do this, you must educate users that IMMEDIATE Internal Transfers are no longer possible (they don't have any initial demand) unless they UNLOCK them after creation to add the initial demand.  

They can still do PLANNED Internal Transfers without any issues.

One method is to create an Automated Action to block over picking:

Code:

if record.product_uom_qty < record.quantity_done:
raise Warning("You can't transfer more than the Initial Demand!")

Note that this is a code snippet only, and you may need to modify it to be more robust and to fit any specific edge cases you encounter.

For example, if you use scanning or show detailed operations on the transfer type you may need to create another automated action to handle security on Packing Operations (stock.move.line)


Ảnh đại diện
Huỷ bỏ

This works for PICKS, but not Delivery Orders (OUT).

Câu trả lời hay nhất

You can change the code like:

if record.picking_code and record.picking_code != "internal" and record.product_uom_qty < record.quantity_done:

    raise UserError("You can't transfer more than the Initial Demand!")

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 11 24
1755
0
thg 6 25
387
0
thg 1 25
1510
0
thg 1 25
1544
1
thg 12 24
2037