콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
10681 화면

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

What is the best way to do this?

아바타
취소

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

베스트 답변

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)


아바타
취소

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

베스트 답변

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!")

아바타
취소
관련 게시물 답글 화면 활동
2
11월 24
2033
5
9월 25
13894
0
6월 25
625
0
1월 25
1782
0
1월 25
1822