<commit_before>-
  In order to test the flow of stock planning module. I will create forecast periods,
  stock forecast and then with master procurement schedule.
-
  I create weekly stock periods for the month of July.
-
  I create stock period for the first week of July.
-
  !record {model: stock.period, id: stock_period_01}:
    date_start: !eval "'%s-07-01 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-06 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 27' %(datetime.now().year)"
-
  I create stock period for the second week of July.
-
  !record {model: stock.period, id: stock_period_02}:
    date_start: !eval "'%s-07-07 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-12 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 28' %(datetime.now().year)"
-
  I create stock period for the third week of July.
-
  !record {model: stock.period, id: stock_period_03}:
    date_start: !eval "'%s-07-15 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-20 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 29' %(datetime.now().year)"
-
  I create stock period for the fourth week of July.
-
  !record {model: stock.period, id: stock_period_04}:
    date_start: !eval "'%s-07-22 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-27 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 30' %(datetime.now().year)"
-
  I create stock period for the fifth week of July.
-
  !record {model: stock.period, id: stock_period_05}:
    date_start: !eval "'%s-07-29 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-31 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 31' %(datetime.now().year)"
-
  Now I create the forecast for this period for all PCs.
-
  !record {model: stock.sale.forecast.createlines, id: stock_sale_forecast_createlines_0}:
    company_id: base.main_company
    period_id: stock_period_03
    product_categ_id: product.product_category_pc
    warehouse_id: stock.warehouse0
-
  Performing an osv_memory action create_forecast on module stock.sale.forecast.createlines
-
  !python {model: stock.sale.forecast.createlines}: |
    self.create_forecast(cr, uid, [ref("stock_sale_forecast_createlines_0")], {"lang":
      'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_sale_forecast_createlines")],
      "tz": False, "active_id": ref("stock_planning.menu_stock_sale_forecast_createlines"),
      })
-
  I create a sale order for PC1-Basic PC and PC3-Medium PC.
-
  !record {model: sale.order, id: sale_order_so0}:
    date_order: !eval time.strftime('%Y-%m-%d')
    invoice_quantity: order
    name: SO006
    order_line:
      - name: '[PC1] Basic PC'
        price_unit: 450.0
        product_uom: product.product_uom_unit
        product_uom_qty: 13.0
        state: draft
        delay: 2.0
        product_id: product.product_product_pc1
        product_uos_qty: 13.0
        th_weight: 0.0
        type: make_to_stock
      - name: '[PC3] Medium PC'
        price_unit: 900.0
        product_uom: product.product_uom_unit
        product_uom_qty: 5.0
        state: draft
        delay: 3.0
        product_id: product.product_product_pc3
        product_uos_qty: 5.0
        th_weight: 0.0
        type: make_to_stock
    order_policy: manual
    partner_id: base.res_partner_desertic_hispafuentes
    partner_invoice_id: base.res_partner_address_3000<commit_msg>[FIX] stock_planning: fixed yaml test<commit_after>-
  In order to test the flow of stock planning module. I will create forecast periods,
  stock forecast and then with master procurement schedule.
-
  I create weekly stock periods for the month of July.
-
  I create stock period for the first week of July.
-
  !record {model: stock.period, id: stock_period_01}:
    date_start: !eval "'%s-07-01 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-06 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 27' %(datetime.now().year)"
-
  I create stock period for the second week of July.
-
  !record {model: stock.period, id: stock_period_02}:
    date_start: !eval "'%s-07-07 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-12 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 28' %(datetime.now().year)"
-
  I create stock period for the third week of July.
-
  !record {model: stock.period, id: stock_period_03}:
    date_start: !eval "'%s-07-15 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-20 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 29' %(datetime.now().year)"
-
  I create stock period for the fourth week of July.
-
  !record {model: stock.period, id: stock_period_04}:
    date_start: !eval "'%s-07-22 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-27 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 30' %(datetime.now().year)"
-
  I create stock period for the fifth week of July.
-
  !record {model: stock.period, id: stock_period_05}:
    date_start: !eval "'%s-07-29 00:00:00' %(datetime.now().year)"
    date_stop: !eval "'%s-07-31 23:59:00' %(datetime.now().year)"
    name: !eval "'%s, week 31' %(datetime.now().year)"
-
  Now I create the forecast for this period for all PCs.
-
  !record {model: stock.sale.forecast.createlines, id: stock_sale_forecast_createlines_0}:
    company_id: base.main_company
    period_id: stock_period_03
    product_categ_id: product.product_category_pc
    warehouse_id: stock.warehouse0
-
  Performing an osv_memory action create_forecast on module stock.sale.forecast.createlines
-
  !python {model: stock.sale.forecast.createlines}: |
    self.create_forecast(cr, uid, [ref("stock_sale_forecast_createlines_0")], {"lang":
      'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_sale_forecast_createlines")],
      "tz": False, "active_id": ref("stock_planning.menu_stock_sale_forecast_createlines"),
      })
-
  I create a sale order for PC1-Basic PC and PC3-Medium PC.
-
  !record {model: sale.order, id: sale_order_so0}:
    date_order: !eval time.strftime('%Y-07-20')
    invoice_quantity: order
    name: SO006
    order_line:
      - name: '[PC1] Basic PC'
        price_unit: 450.0
        product_uom: product.product_uom_unit
        product_uom_qty: 13.0
        state: draft
        delay: 2.0
        product_id: product.product_product_pc1
        product_uos_qty: 13.0
        th_weight: 0.0
        type: make_to_stock
      - name: '[PC3] Medium PC'
        price_unit: 900.0
        product_uom: product.product_uom_unit
        product_uom_qty: 5.0
        state: draft
        delay: 3.0
        product_id: product.product_product_pc3
        product_uos_qty: 5.0
        th_weight: 0.0
        type: make_to_stock
    order_policy: manual
    partner_id: base.res_partner_desertic_hispafuentes
    partner_invoice_id: base.res_partner_address_3000
{'fraction_non_alphanumeric': 0.13961226851851852, 'fraction_numerical': 0.04832175925925926, 'mean_word_length': 3.445659163987138, 'pattern_counts': {'":': 10, '<': 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': '7382211', 'n_tokens_mistral': 2694, 'n_tokens_neox': 2471, 'n_words': 625}