hunk.code_window:     def _onchange_product_id(self):
           if self.product_id:
               if not self.id and self.user_has_groups('stock.group_stock_multi_locations') and not self.result_package_id:
                   qty_done = self.product_uom_id._compute_quantity(self.qty_done, self.product_id.uom_id)
                   default_dest_location = self._get_default_dest_location()
                   self.location_dest_id = default_dest_location._get_putaway_strategy(
  
hunk.labels: keep keep keep keep add keep
hunk.after_edit:                 additional_qty = self._get_putaway_additional_qty()
  
hunk.file_path: addons/stock/models/stock_move_line.py
hunk.type: add
file: # -*- coding: utf-8 -*-
  # Part of Odoo. See LICENSE file for full copyright and licensing details.
  
  from odoo.addons.test_mail.tests.common import TestMailCommon, TestRecipients
  from odoo.tests import tagged
  from odoo.tests.common import users
  
  
  @tagged('mail_composer_mixin')
  class TestMailComposerMixin(TestMailCommon, TestRecipients):
  
      @classmethod
      def setUpClass(cls):
          super(TestMailComposerMixin, cls).setUpClass()
          cls._init_mail_gateway()
  
          cls.mail_template = cls.env['mail.template'].create({
              'subject': 'Subject for {{ object.name }}',
              'body_html': '<p>Body for <t t-out="object.name"/></p>',
          })
  
      @users("employee")
      def test_content_sync(self):
          record = self.env['mail.test.composer.mixin'].create({
              'name': 'Invite',
              'template_id': self.mail_template.id,
          })
          self.assertEqual(record.subject, self.mail_template.subject)
          self.assertEqual(record.body, self.mail_template.body_html)
  
          subject = record._render_field('subject', record.ids)[record.id]
          self.assertEqual(subject, 'Subject for %s' % record.name)
          body = record._render_field('body', record.ids)[record.id]
          self.assertEqual(body, '<p>Body for %s</p>' % record.name)
  
      @users("employee")
      def test_rendering(self):
          record = self.env['mail.test.composer.mixin'].create({
              'name': 'Invite',
              'subject': 'Subject for {{ object.name }}',
              'body': '<p>Content from <t t-out="user.name"/></p>',
              'description': '<p>Description for <t t-esc="object.name"/></p>',
          })
          self.assertEqual(record.subject, 'Subject for {{ object.name }}')
          self.assertEqual(record.body, '<p>Content from <t t-out="user.name"/></p>')
  
          subject = record._render_field('subject', record.ids)[record.id]
          self.assertEqual(subject, 'Subject for %s' % record.name)
          body = record._render_field('body', record.ids)[record.id]
          self.assertEqual(body, '<p>Content from %s</p>' % self.env.user.name)
          description = record._render_field('description', record.ids)[record.id]
          self.assertEqual(description, '<p>Description for Invite</p>')
  