<commit_before># -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################

from openerp import models, fields, api


class StockQuant(models.Model):
    _inherit = 'stock.quant'

    @api.one
    def move_to(self, dest_location):
        last_move = self._get_latest_move(self)
        new_move = last_move.copy()
        new_move.location_id = new_move.location_dest_id
        new_move.location_dest_id = dest_location
        new_move.date_expected = fields.Datetime.now()
        new_move.date = new_move.date_expected
        new_move.action_done()
<commit_msg>[MOD] <stock_quant...> quantity taken from quant<commit_after># -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################

from openerp import models, fields, api


class StockQuant(models.Model):
    _inherit = 'stock.quant'

    @api.one
    def move_to(self, dest_location):
        last_move = self._get_latest_move(self)
        new_move = last_move.copy()
        new_move.location_id = new_move.location_dest_id
        new_move.location_dest_id = dest_location
        new_move.date_expected = fields.Datetime.now()
        new_move.date = new_move.date_expected
        new_move.product_uom_qty = self.qty
        new_move.action_done()

{'fraction_non_alphanumeric': 0.2680667078443484, 'fraction_numerical': 0.0012353304508956147, 'mean_word_length': 4.1923076923076925, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7243587', 'n_tokens_mistral': 451, 'n_tokens_neox': 429, 'n_words': 89}