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

 Hello,

I'm looking to create a module allowing me to launch a production of several production orders.

for that I started to realize a Wizard allowing me to select 

  1. input lots (components)

  2. finished product lot

  3. the workcenter


the wizard code (Python and XML) 

 1 : https://pastebin.com/JsGzri5m Wizard (Python) 

 2: https://pastebin.com/SkaJr2WL Wizard (XML)


I had to search in the odoo v13 repository in the mrp application to see what level it will be able to intervene to perform this operation but I don't find that it extends method or how to do it. 


I thought of extending the action_assign method of the mrp.production model because the associated operation is exactly what I'm trying to do but I'd like to limit the batches that can be assigned by those selected on my wizard.

thank you in advance for your help.


Avatar
Vazgeç
Üretici

I've found the solution, I don't know if it's the right way to do it but in any case it works well according to the tests I've been able to do.

It's a question of modifying the methods: _gather and _update_reserved_quantity on the model stock.quant

if it can help someone

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Şub 25
16189
1
Nis 25
1294
1
Kas 24
18703
1
Tem 24
2097
1
Oca 24
2165