<commit_before>-
  In order to test the purchase requisition flow,I start by creating a new product 'MOB1'
- 
  !record {model: product.product, id: product_product_mob1}:
    name: MOB1
    categ_id: product.product_category_3
    cost_method: standard
    mes_type: fixed
    price_margin: 2.0
    procure_method: make_to_stock
    property_stock_inventory: stock.location_inventory
    property_stock_procurement: stock.location_procurement
    property_stock_production: stock.location_production
    seller_delay: '1'
    standard_price: 2000.0
    supply_method: buy
    type: product
    uom_id: product.product_uom_unit
    uom_po_id: product.product_uom_unit
    volume: 0.0
    warranty: 0.0
    weight: 0.0
    weight_net: 0.0
- 
  I create purchase requisition for MOB1 for 1 quantity.
- 
  !record {model: purchase.requisition, id: purchase_requisition_te0}:
    company_id: base.main_company
    exclusive: multiple
    line_ids:
      - company_id: base.main_company
        product_id: product_product_mob1
        product_qty: 10.0
        product_uom_id: product.product_uom_unit
    name: TE00009
- 
  Initially purchase requisition is in draft state.
-
  !assert {model: purchase.requisition, id: purchase_requisition_te0}:
    - state == 'draft'  
- 
  I confirm the purchase requisition for MOB1.
- 
  !python {model: purchase.requisition}: |
    self.tender_in_progress(cr, uid, [ref("purchase_requisition_te0")])
-
  I check that the purchase requisition which was initially in the draft state has transmit to In Progress after confirm it.
-
  !assert {model: purchase.requisition, id: purchase_requisition_te0}:
    - state == 'in_progress'
- 
   I Create a Purchase Order for the supplier 'Axelor'.
- 
  !record {model: purchase.requisition.partner, id: purchase_requisition_partner_0}:
    partner_address_id: base.res_partner_address_7
    partner_id: base.res_partner_desertic_hispafuentes
- 
  I create Quotations For supplier 'Axelor'.
- 
  !python {model: purchase.requisition.partner}: |
    self.create_order(cr, uid, [ref("purchase_requisition_partner_0")], {"active_model": "purchase.requisition",
      "active_ids": [ref("purchase_requisition_te0")],"active_id": ref("purchase_requisition_te0"), })
-
  I confirm the purchase order of Axelor.
-
  !python {model: purchase.order}: |
    req_obj = self.pool.get('purchase.requisition')
    ids =req_obj.search(cr, uid, [('name','=','TE00009')])    
    purchase_id= self.search(cr, uid, [('requisition_id','in',ids)])
    import netsvc
    wf_service = netsvc.LocalService("workflow")   
    if purchase_id:
      wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_confirm', cr)
      wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_approve', cr)
-
  I check that Quotation of Axelor is Approved.
-        
  !python {model: purchase.order}: |
   req_obj = self.pool.get('purchase.requisition')
   ids =req_obj.search(cr, uid,[('name','=','TE00009')])     
   purchase_id= self.search(cr, uid, [('requisition_id','in',ids)])[0]
   state=self.browse(cr,uid,purchase_id).state
   assert (state=='approved')
- 
  I click on Done button
- 
  !python {model: purchase.requisition}: |
    self.tender_done(cr, uid, [ref("purchase_requisition_te0")],)
-
  I check that after click on Done button state is in done.
-
  !assert {model: purchase.requisition, id: purchase_requisition_te0}:
    - state == 'done'
-
  In order to test the purchase requisition flow for Requisition Type is exclusive 
- 
  I create purchase requisition for Requisition Type is exclusive 
- 
  !record {model: purchase.requisition, id: purchase_requisition_ex1}:
    company_id: base.main_company
    exclusive: exclusive
    line_ids:
      - company_id: base.main_company
        product_id: product_product_mob1
        product_qty: 10.0
        product_uom_id: product.product_uom_unit
    name: TE000010<commit_msg>[REM] purchase_requisition: Remove Static code from yml<commit_after>-
  In order to test the purchase requisition flow,I start by creating a new product 'MOB1'
- 
  !record {model: product.product, id: product_product_mob1}:
    name: MOB1
    categ_id: product.product_category_3
    cost_method: standard
    mes_type: fixed
    price_margin: 2.0
    procure_method: make_to_stock
    property_stock_inventory: stock.location_inventory
    property_stock_procurement: stock.location_procurement
    property_stock_production: stock.location_production
    seller_delay: '1'
    standard_price: 2000.0
    supply_method: buy
    type: product
    uom_id: product.product_uom_unit
    uom_po_id: product.product_uom_unit
    volume: 0.0
    warranty: 0.0
    weight: 0.0
    weight_net: 0.0
- 
  I create purchase requisition for MOB1 for 1 quantity.
- 
  !record {model: purchase.requisition, id: purchase_requisition_te0}:
    company_id: base.main_company
    exclusive: multiple
    line_ids:
      - company_id: base.main_company
        product_id: product_product_mob1
        product_qty: 10.0
        product_uom_id: product.product_uom_unit
    name: TE00009
- 
  Initially purchase requisition is in draft state.
-
  !assert {model: purchase.requisition, id: purchase_requisition_te0}:
    - state == 'draft'  
- 
  I confirm the purchase requisition for MOB1.
- 
  !python {model: purchase.requisition}: |
    self.tender_in_progress(cr, uid, [ref("purchase_requisition_te0")])
-
  I check that the purchase requisition which was initially in the draft state has transmit to In Progress after confirm it.
-
  !assert {model: purchase.requisition, id: purchase_requisition_te0}:
    - state == 'in_progress'
- 
   I Create a Purchase Order for the supplier 'Axelor'.
- 
  !record {model: purchase.requisition.partner, id: purchase_requisition_partner_0}:
    partner_address_id: base.res_partner_address_7
    partner_id: base.res_partner_desertic_hispafuentes
- 
  I create Quotations For supplier 'Axelor'.
- 
  !python {model: purchase.requisition.partner}: |
    self.create_order(cr, uid, [ref("purchase_requisition_partner_0")], {"active_model": "purchase.requisition",
      "active_ids": [ref("purchase_requisition_te0")],"active_id": ref("purchase_requisition_te0"), })
-
  I confirm the purchase order of Axelor.
-
  !python {model: purchase.order}: |
    purchase_id= self.search(cr, uid, [('requisition_id','=',ref("purchase_requisition_te0"))])
    import netsvc
    wf_service = netsvc.LocalService("workflow")   
    if purchase_id:
      wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_confirm', cr)
      wf_service.trg_validate(uid, 'purchase.order',purchase_id[0],'purchase_approve', cr)
-
  I check that Quotation of Axelor is Approved.
-        
  !python {model: purchase.order}: |
   purchase_id= self.search(cr, uid, [('requisition_id','=',ref("purchase_requisition_te0"))])[0]
   state=self.browse(cr,uid,purchase_id).state
   assert (state=='approved')
- 
  I click on Done button
- 
  !python {model: purchase.requisition}: |
    self.tender_done(cr, uid, [ref("purchase_requisition_te0")],)
-
  I check that after click on Done button state is in done.
-
  !assert {model: purchase.requisition, id: purchase_requisition_te0}:
    - state == 'done'
-
  In order to test the purchase requisition flow for Requisition Type is exclusive 
- 
  I create purchase requisition for Requisition Type is exclusive 
- 
  !record {model: purchase.requisition, id: purchase_requisition_ex1}:
    company_id: base.main_company
    exclusive: exclusive
    line_ids:
      - company_id: base.main_company
        product_id: product_product_mob1
        product_qty: 10.0
        product_uom_id: product.product_uom_unit
    name: TE000010
{'fraction_non_alphanumeric': 0.1018951194184839, 'fraction_numerical': 0.016355140186915886, 'mean_word_length': 4.013012361743656, 'pattern_counts': {'":': 6, '<': 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': '5324196', 'n_tokens_mistral': 2711, 'n_tokens_neox': 2555, 'n_words': 604}