To solve this issue, you need to create a separate BOM for the byproduct and define a procurement rule for it. Here are the steps to follow:
Create a new BOM for the byproduct: Go to the Manufacturing app, open the product that is produced as a byproduct, and create a new BOM for it. In the BOM, add the raw materials required to produce the byproduct and save it.
Define a procurement rule for the byproduct: Go to the Warehouse app, open the product that is produced as a byproduct, and go to the "Procurements" tab. Click on "Create" to create a new procurement rule for the byproduct. In the procurement rule, select the source location, the destination location, and the BOM you created in step 1.
Add the byproduct to the sales order: Go to the Sales app, create a new sales order, and add the main product and the byproduct to the order. When you add the byproduct, make sure you select the newly created procurement rule in the "Procurement" field.
Confirm the sales order: Once you have added the products to the sales order, confirm the order. This will create a procurement order for the byproduct and the main product.
Receive the products and create a delivery note: When you receive the products, go to the Warehouse app and process the procurement orders for both the main product and the byproduct. Once the products are ready for delivery, create a delivery note. The delivery note should show the main product and the byproduct as separate line items.
By following these steps, you should be able to create and deliver the byproduct as a separate line item in the delivery note.