'This function is called at the end of negative quant reconciliation
and does the accounting entries adjustemnts and the update of the product
cost price if needed'

@api.multi
def _price_update(self, newprice):

    super(StockQuant, self)._price_update(newprice)
    for quant in self:
        move = quant._get_latest_move()
        valuation_update = (newprice - quant.cost)
        if ((not quant.company_id.currency_id.is_zero(valuation_update)) and move._check_lock_date()):
            quant.with_context(force_valuation_amount=valuation_update)._account_entry_move(move)
        if ((quant.product_id.cost_method == 'real') and (quant.location_id.usage != 'internal')):
            move._store_average_cost_price()
