Cherry-picked and modified by @anandpdoshi Conflicts: accounts/doctype/purchase_invoice/purchase_invoice.py controllers/buying_controller.py controllers/stock_controller.py
Cherry-picked and modified by @anandpdoshi Conflicts: accounts/doctype/purchase_invoice/purchase_invoice.py controllers/buying_controller.py controllers/stock_controller.py