Impacted versions:
9.0

Steps to reproduce:
- Create a product with costing method set to average
- Create a purchase order for the product in a foreign currency, and validate
- Change the exchange rate for the currency in question
- Receive the product

Current behavior:
- Stock quants get the correct cost behind the scene (PO value at current rate)
- Accounting journals get the correct value
- Stock move price unit has been updated to the correct value
- **Average cost on product file is the PO value at old rate**

Expected behavior:
- Average should have been updated in line with the new rate

Video/Screenshot link (optional):

addons/stock_account/stock_account.py
invoice_data = super(account_invoice, self)._prepare_refund(cr, uid, invoice, date_invoice, date,
                                                                    description, journal_id, context=context)
        
        if invoice.company_id.anglo_saxon_accounting and invoice.type == 'in_invoice':
            fiscal_position = self.pool.get('account.fiscal.position')
            for dummy, dummy, line_dict in invoice_data['invoice_line_ids']:
                if line_dict.get('product_id'):
                    product = self.pool.get('product.product').browse(cr, uid, line_dict['product_id'], context=context)
                    counterpart_acct_id = product.property_stock_account_output and \
                            product.property_stock_account_output.id
                    if not counterpart_acct_id:
                        counterpart_acct_id = product.categ_id.property_stock_account_output_categ_id and \
                                product.categ_id.property_stock_account_output_categ_id.id
                    if counterpart_acct_id:
                        fpos = invoice.fiscal_position_id or False
                        line_dict['account_id'] = fiscal_position.map_account(cr, uid,
                                                                              fpos,
                                                                              counterpart_acct_id)
        return invoice_data
class stock_location(osv.osv):