For a company that sells airline tickets, there's no "stock" of the products, i.e. tickets. When a ticket is sold, money is also being paid to the airline, i.e. vendor.
So, when an invoice is being validated, I want a vendor bill for the product added against the vendor. How can I do that? I can create many2one relation on account.invoice.line to the account.invoice model, but I don't know how to automatically let it generate a vendor bill with the product.
Ideally, I want to add vendor and cost price fields to the product row in invoice so a vendor bill can be generated to that vendor with the product added at the cost price.
Vendor Bill is itself an Invoice and it is already linked with invoice lines.
Would you please explain your requirement in more details?
Product added to customer invoice is money received. For every product on invoice, I need vendor bill to pay to vendor.
For example, customer A purchases Air India ticket from us. Customer pays 450 dollars to us for ticket, and we pay 400 dollars to Air India. That's two invoice: one customer invoice, one vendor bill for same product. When I add product (air ticket) to customer invoice and validate, that product needs to be purchased from vendor (Air India).