hunk.code_window:         mo_form = Form(mo)
           mo_form.qty_producing = 3
           self.assertEqual(sum([x['quantity_done'] for x in mo_form.move_raw_ids._records]), 15, 'Update the produce quantity should change the components quantity.')
           self.assertEqual(sum([x['reserved_availability'] for x in mo_form.move_raw_ids._records]), 5, 'Update the produce quantity should not change the components reserved quantity.')
           mo_form.qty_producing = 4
           self.assertEqual(sum([x['quantity_done'] for x in mo_form.move_raw_ids._records]), 20, 'Update the produce quantity should change the components quantity.')
  
hunk.labels: keep keep keep replace keep keep
hunk.after_edit:         mo = mo_form.save()
           self.assertEqual(sum(mo.move_raw_ids.mapped('reserved_availability')), 5, 'Update the produce quantity should not change the components reserved quantity.')
           mo_form = Form(mo)
  
hunk.file_path: addons/mrp/tests/test_order.py
hunk.type: replace
file: # -*- coding: utf-8 -*-
  # Part of Odoo. See LICENSE file for full copyright and licensing details.
  
  from odoo.addons.hr.tests.common import TestHrCommon
  
  
  class TestChannel(TestHrCommon):
  
      def setUp(self):
          super(TestChannel, self).setUp()
  
          self.channel = self.env['mail.channel'].create({'name': 'Test'})
  
          emp0 = self.env['hr.employee'].create({
              'user_id': self.res_users_hr_officer.id,
          })
          self.department = self.env['hr.department'].create({
              'name': 'Test Department',
              'member_ids': [(4, emp0.id)],
          })
  
      def test_auto_subscribe_department(self):
          self.assertEqual(self.channel.channel_partner_ids, self.env['res.partner'])
  
          self.channel.write({
              'subscription_department_ids': [(4, self.department.id)]
          })
  
          self.assertEqual(self.channel.channel_partner_ids, self.department.mapped('member_ids.user_id.partner_id'))
  