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

Hi,

I don't think it is the normal behaviour, let me explain.

I've made a Sales Order, this create manufacturing orders. (procurement on real time activate or not)

Then I will just cancel this Sales order. Manufacturing orders previously created by this Sales Order aren't cancel.

 

The normal behaviour must be : Sales Order cancel => Manufacturing orders attached cancelled

아바타
취소
베스트 답변

The normal behavior is just like that, when you cancel the Sale Order (SO) that originated the Manufactoring Order (MO), the MO will not cancel by itself. This happens because in a big company, the Sales department and Manufactoring department are separated, and they might already have started the MO (The SO was confirmed before).

This happens the same in Delivery Orders, that have to be cancelled before cancelling the Order that generated it.

아바타
취소
작성자

Thanks for the answer, but if the manufacturing order isn't start yet why openerp can't cancel it ? Or forced us to cancel manufacturing order before like it does with Delivery Orders ?

I am wondering about this as well for v15. I can imagine customization that would do this.

Something like (pseudo code):

@api.model
def write(self, vals):
res = super(ProductTemplate, self).write(vals)

if 'some_canceled_state_field' in values and values['some_canceled_state_field']:
# find mo's and cancel them with their cancel method.
mfg_order = self.env["the.mfg.order.model.name"].search([("origin", "ilike", order_name)])
for order in mfg_orders:
#cancel them
order.cancel()
return res

Surely someone has written one up that could share it here.

관련 게시물 답글 화면 활동
1
3월 15
4431
2
3월 15
6230
0
3월 15
3561
2
10월 25
460
1
3월 21
2723