Hello odoo-friends,
I'm developing a module where I have to create transfers from customer location to stock. It is a return from a rental order. For several reasons I am creating the transfers via a given route_id I have prepared. It has stock rules for moving goods from Customer/Rental -> WH/Input -> WH/QualitlyControl. I introduced new operation types to separate the pickings from outgoing operation types (their code is therefore 'incoming').
I am for looping though stock rules which belong to my given route_id. This works fine since I am creating a list of products+lot_ids from a given line model and then create my pickings incl my stock_move_ids. After doing this I trigger action_confirm and action_assign, so the picking state will be 'confirmed' (I don't get which it doesn't get the state 'waiting', because there all the pickings are in the same procurement group, but that is another issue).
Thepoint which drives my crazy is now: My first transfer from Customer -> WH/input is ready in any case and odoo shows me stock_move_lines, ALTHOUGH THERE IS NO STOCK AMOUNT IN THE SOURCE LOCATION!!! How could that be! odoo reserves stock in my customer location but my products (even given serials) have not yet arrived in that location.
I am sure I do something wrong either on creating my pickings, or something is missconfigured in my operation type or whatever. I have check my configuration multiple times and I have no idea why odoo reserves serials in a location where the item has not yet arrived.
So please help me since I have no idea what else I could check. If you like I share any of my code or configuration.
THANKS in advance!!!
Regards, Tastenmeister