Bug - ODOO Receipt printing of Partial Payment

Environment - https://erp-product-qa04.mybahmni.org/ ODOO

  1. New Customer (only to ensure that there is no outstanding balance)
  2. Create quotation for Rs. 10, confirm sale, create invoice
  3. Register Payment but pay partially say Rs. 5
  4. Account->Customer Payments->Print receipt for this payment. Note that previous balance is shown as balance of this payment (Rs. 5) and outstanding balance is shown as the actual outstanding balance + previous balance (Rs. 10).

This is because here previous balance is shown as customer’s credit or debit (Rs. 5) which already has the existing payment taken into account and then using this previous balance (Rs. 5) outstanding balance is calculated as previous balance (Rs. 5) + balance of this bill (Rs. 5) = Rs. 10

Whereas it should have shown previous balance: customer’s debit or credit - balance of this bill and outstanding balance should be: Customer’s debit or credit.

@anandpatel @angshuonline

@anandpatel any comments on this? @ramashish the modifications you made, did it resolve the problem? Can you please create a JIRA card for this, and if possible raise a PR against the card?

Checking back on this. @ramashishthe was the problem resolved with above modifications that you made?


I have worked on this issue and on investigation I have found that, outstanding _balance should be equal to previous_balance in the calculation so that it should give proper invoice detail. I have made the change in account_payment.py in bahmni_stock module in my local machine and it is working fine.

But to make this change have to do the following configurations first:

  • Need to define charts of accounts
  • Need to define income account for the product.
  • Need to define account_receivable and account_payment for customer if it is not defined earlier.
  • Need to define account in POS Journal

Please refer this document for configuration steps.

Also please note the following :

  • On fresh installation of bahmni 0.92 on local, we have to create purchase order and receive products since the product stock can be empty.

  • For all customers in odoo (the one’s synced from bahmni and the one’s created in odoo) we need to enter the account receivable and account payable details of every customer.

I have raised a PR for this in ticket BAH-958