İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4920 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt

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.

Avatar
Vazgeç
Üretici

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.

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Mar 15
4443
2
Mar 15
6246
0
Mar 15
3574
2
Eki 25
494
1
Mar 21
2728