コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4904 ビュー

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
4438
2
3月 15
6232
0
3月 15
3565
2
10月 25
482
1
3月 21
2725