There is an option to roll up AR balances - it works well in situations where a Head Office (like Walmart) pays for products that both Distribution Centers (children of the Head Office) and stores (children of the Distribution Centers) place orders. In this situation there are multiple levels in the Customer hierarchy:
It may or may not work for you. Please make sure you understand how this affects your book keeping before you implement it. it also affects who is liable for the balance, so be sure you are OK with how that looks on your Financial Reports. I am posting this mainly because your question reminds me of the requirement to rollup based on the SAME company, so I am unsure if it will be acceptable when you have DIFFERENT companies paying for things.
Account Receivable balances can only be paid by the same Customer that accrued them and Odoo manages this via the Commercial Entity field - this field is hidden by default and managed by Odoo.
If you setup three Customers, all Companies, this is how Odoo sets the Commercial Entity field:
In this way, each Company accrues and pays its own AR balance.
You can setup your Customers so that Agrolait and CamptoCamp accrue AR balances on behalf of the same Commercial Entity - a third Customer - and any of the three Customers can pay those balances.
You would manually override the Commercial Entity field like this:
To do this requires two changes.
1: Expose the commercial_partner_id (COMMERCIAL ENTITY) field on the Customer form, so you can manage it. Odoo sets the Commercial Entity to match the Customer if you make the Customer a Company or an Individual without a Parent Company. Odoo sets the Commercial Entity to match the Parent if the Invidual works for a Parent Company.
In base.view_partner_form, the field is defined like this:
<field name="commercial_partner_id" invisible="1"/>
You would make your own view and set invisible to 0 and readonly to 0, so that you can edit the field.
When you are setting up the multi-level Customer structure, be sure to realize that Odoo only lets you set a parent when the INDIVIDUAL checkbox is selected, so temporarily set your child companies to INDIVIDUAL so you can set the parent, then set them back to COMPANY.
Also, select the appropriate Commercial Entity which involves editing the field after Odoo has given it a value.
2: Modify the filters on the Search View because they filter for Customers that don't have a parent, and the ones you are setting up DO have a parent.
<filter string="Customers" name="customer" domain="[('customer','=',1), ('parent_id', '=', False)]"/>
would be overwritten to become:
<filter string="Customers" name="customer" domain="[('customer','=',1), ('is_company','=','1')]"/>
Now these Payments:
And this Invoice:
Will show up on the AR Aging like this:
This is how it looks in the General Ledger:
Note that Odoo will let you apply BOTH payments to the ONE Invoice: