Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1791 Ansichten

 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
Verwerfen
Autor

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Feb. 25
16265
1
Apr. 25
1355
1
Nov. 24
18867
1
Juli 24
2172
1
Jan. 24
2243