Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1739 Widoki

 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.


Awatar
Odrzuć
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

Powiązane posty Odpowiedzi Widoki Czynność
3
lut 25
16189
1
kwi 25
1294
1
lis 24
18702
1
lip 24
2097
1
sty 24
2165