Help with BOM- Manufacturing

Hi Guys ,

I need only the items which are in stock to appear in the BOM when I select the child parts for an assembly , is there a way to do this ?

Thanks in advance

Maybe a validation using JS might be easier to do depending on the type of installation (Cloud v/s self-hosted). BOMs are meant to be a tool to just hold the materials required for creating a particular product. ( It should not matter if it is in stock or no) as material requests can be raised later for it after using the production planning tool.

1 Like

Many thanks for the reply @Pawan . Could you hint me by throwing some light on the JS script on how to check if it is available in stock ?

Thanks in advance

You would need to check against the stock table and retrieve balances from that for the item and then validate against the values on your page. I think you may have to use a white listed python method for this.

1 Like

Thanks a ton for the reply @Pawan , I am a python neophyte , so I will try my best to stick to js as possible . Is there any examples available to query the available stock ? Could you guide me please .

Thanks

You can check the Stock Ledger Report code for ideas on how to get the balance.

1 Like

Thanks a lot @Pawan . I will check