These accounts should exist in your Chart of Accounts. If you don't have a Chart of Accounts, go to Configuration / Settings in the Invoicing / Accounting app and install one (you'll need to do this for each of your three companies).
The simplest way to use them is to set them on the Product Categories (there's no need to set them for each product)
This should work in a multi-company database because the accounts are stored in Company Properties:
You can see that there are different accounts selected in the two companies.
I think there is a small problem with account selection in a multi-company database. It should only show accounts for the current company, but it actually shows accounts for multiple companies.
In Odoo 13 it shows records from all selected companies, so you should ensure that you only have one company selected when you are setting this up.
In Odoo 12 (and earlier) this is only an issue when you use the admin account, so it's better to set this up as another user
Hi Chris Tringham,
Below mentioned all accounts are created in the product category. But my problem is that all products are common for these 3 companies. Which company i should mention in these accounts? Or shall i need to create all the products in 3 company each. This will cause duplication in database.
I added an explanation about how Odoo keeps track of the different accounts in each company.