<commit_before>-
  I select for this file a user that is not admin
-
  !context
  uid: 'res_users_emma'
-
  I create three pickings for the same product. They could be generate by the
  Purchase Orders PO1, PO2, and PO3. We do not handle the orders here, except
  for the origin field.
-
  !record {model: stock.picking.out, id: picking_1}:
    move_lines:
      - origin: PO1
        date_expected: 2013-12-10
        product_qty: 10
        product_uom: product.product_uom_unit
        name: line1
        product_id: product.product_product_48
-
  !record {model: stock.picking.out, id: picking_2}:
    move_lines:
      - origin: PO2
        date_expected: 2013-12-20
        product_qty: 10
        product_uom: product.product_uom_unit
        name: line2
        product_id: product.product_product_48
-
  !record {model: stock.picking.out, id: picking_3}:
    move_lines:
      - origin: PO3
        date_expected: 2013-12-29
        product_qty: 10
        product_uom: product.product_uom_unit
        name: line3
        product_id: product.product_product_48
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_1}
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_2}
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_3}
-
  !python {model: procurement.order}: |
    self.run_scheduler(cr, uid)<commit_msg>more WIP: we have an assertion<commit_after>-
  !record {model: res.company, id: base.main_company}:
    security_lead: 2.0
-
  I select for this file a user that is not admin
-
  !context
  uid: 'res_users_emma'
-
  I update the available quantity for the product "Usb Adapter"
-
  !record {model: stock.change.product.qty, id: change_qty_1}:
    new_quantity: 15
    product_id: product.product_product_48
-
  !python {model: stock.change.product.qty}: |
    self.change_product_qty(cr, uid, [ref('change_qty_1')], context=dict(
        context, active_id=ref('product.product_product_48')))
-
  I create three incoming pickings for the same product. They could be
  generated by the Purchase Orders PO1, PO2, and PO3. We do not handle the
  orders here, except for the origin field.
-
  !record {model: stock.picking.in, id: picking_in_1}:
    move_lines:
      - origin: PO1
        product_qty: 10
        product_uom: product.product_uom_unit
        name: line1
        product_id: product.product_product_48
-
  !python {model: stock.picking.in}: |
    import datetime
    self.write(cr, uid, ref('picking_in_1'), {
        'date_expected': '{0}-12-10'.format(datetime.date.today().year + 1)
    })
-
  !record {model: stock.picking.in, id: picking_in_2}:
    move_lines:
      - origin: PO2
        product_qty: 30
        product_uom: product.product_uom_unit
        name: line2
        product_id: product.product_product_48
-
  !python {model: stock.picking.in}: |
    import datetime
    self.write(cr, uid, ref('picking_in_2'), {
        'date_expected': '{0}-12-20'.format(datetime.date.today().year + 1)
    })
-
  !record {model: stock.picking.in, id: picking_in_3}:
    move_lines:
      - origin: PO3
        product_qty: 30
        product_uom: product.product_uom_unit
        name: line3
        product_id: product.product_product_48
-
  !python {model: stock.picking.in}: |
    import datetime
    self.write(cr, uid, ref('picking_in_3'), {
        'date_expected': '{0}-12-29'.format(datetime.date.today().year + 1)
    })
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_in_1}
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_in_2}
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_in_3}
-
  I create three outgoing pickings for the same product. They could be
  generated by the Sale Orders SO1, SO2, and SO3. We do not handle the
  orders here, except for the origin field.
-
  !record {model: stock.picking.out, id: picking_out_1}:
    move_lines:
      - origin: SO1
        product_qty: 15
        product_uom: product.product_uom_unit
        name: line1
        product_id: product.product_product_48
-
  !python {model: stock.picking.out}: |
    import datetime
    self.write(cr, uid, ref('picking_out_1'), {
        'date_expected': '{0}-12-03'.format(datetime.date.today().year + 1)
    })
-
  !record {model: stock.picking.out, id: picking_out_2}:
    move_lines:
      - origin: SO2
        product_qty: 10
        product_uom: product.product_uom_unit
        name: line2
        product_id: product.product_product_48
-
  !python {model: stock.picking.out}: |
    import datetime
    self.write(cr, uid, ref('picking_out_2'), {
        'date_expected': '{0}-12-01'.format(datetime.date.today().year + 1)
    })
-
  !record {model: stock.picking.out, id: picking_out_3}:
    move_lines:
      - origin: SO3
        product_qty: 50
        product_uom: product.product_uom_unit
        name: line3
        product_id: product.product_product_48
-
  !python {model: stock.picking.out}: |
    import datetime
    self.write(cr, uid, ref('picking_out_3'), {
        'date_expected': '{0}-12-05'.format(datetime.date.today().year + 1)
    })
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_out_1}
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_out_2}
-
  !workflow {model: stock.picking, action: button_confirm, ref: picking_out_3}
-
  !python {model: stock.picking.out}: |
    import datetime as dt
    security_days = dt.timedelta(days=2)

    picking_1 = self.browse(cr, uid, ref('picking_out_1'), context)
    picking_1_date = picking_1.move_lines[0].date_expected
    assert picking_1_date == dt.datetime.today() + security_days, (
        'Picking 1 should be delivered 2 days after today, not on {0}'.format(
            picking_1_date
        )
    )
{'fraction_non_alphanumeric': 0.11447753485970047, 'fraction_numerical': 0.02892064038560854, 'mean_word_length': 3.037526059763725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6646103', 'n_tokens_mistral': 2075, 'n_tokens_neox': 1985, 'n_words': 484}