Please post the Version (17.0, 18.0, 18.3, etc) and Edition (Community / Enterprise) of Odoo your question applies to.
Odoo 18.0
Example: our Vendor billed us $1,000 but we get a 9% rebate. We create a Customer Invoice for $90 then we reconcile them to pay down the Vendor Bill so we owe $910.
1. Accounting --> Accounting -> Reconcile
2. Identify your Partner and select the open AR and open AP and use the Reconcile button

3. Select Allow Partials and then click Reconcile

Odoo then automatically creates and posts the Journal Entry for you that debits AP and credits AR as well as paying the Customer Invoice and paying down the Vendor Bill so you are left able to close the Vendor Bill with the remaining balance due of $910.