hunk.code_window:                                     for qty_reserved, qty, ml_uom in zip(values['product_qty'], values['qty_done'], list(uoms)))
                           qty_by_location[values['location_dest_id'][0]] = qty_done
                       for values in quant_data:
                           qty_by_location[values['location_id'][0]] += values['quantity']
               putaway_location = putaway_rules._get_putaway_location(product, quantity, package, packaging, qty_by_location)
           if not putaway_location:
               putaway_location = locations[0] if locations and self.usage == 'view' else self
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit:             if additional_qty:
                   for location_id, qty in additional_qty.items():
                       qty_by_location[location_id] += qty
  
hunk.file_path: addons/stock/models/stock_location.py
hunk.type: add
file: # -*- coding: utf-8 -*-
  # Part of Odoo. See LICENSE file for full copyright and licensing details.
  
  from odoo import fields, models, _
  from odoo.exceptions import UserError
  
  
  class HrDepartureWizard(models.TransientModel):
      _inherit = 'hr.departure.wizard'
  
      set_date_end = fields.Boolean(string="Set Contract End Date", default=True,
          help="Set the end date on the current contract.")
  
      def action_register_departure(self):
          """If set_date_end is checked, set the departure date as the end date to current running contract,
          and cancel all draft contracts"""
          current_contract = self.employee_id.contract_id
          if current_contract and current_contract.date_start > self.departure_date:
              raise UserError(_("Departure date can't be earlier than the start date of current contract."))
  
          super(HrDepartureWizard, self).action_register_departure()
          if self.set_date_end:
              self.employee_id.contract_ids.filtered(lambda c: c.state == 'draft').write({'state': 'cancel'})
              if current_contract:
                  self.employee_id.contract_id.write({'date_end': self.departure_date})
  