<commit_before>-
  I prepare tunneling extra args in the context
-
  !python {model: sale.order}: |
    context.update({'fiscal_category_id': ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12'), 'shop_id': ref('sale.sale_shop_1')})
-
  In order to test fiscal parameters of Sale Order inside the same state, I create sale order
-
  !record {model: sale.order, id: sale_order_test1}:
    partner_id: l10n_br_base.res_partner_akretion
    order_line:
      - product_id: product.product_product_7
        product_uom_qty: 8
-
  I verify that the onchange was correctly triggered
-
  !assert {model: sale.order, id: l10n_br_sale.sale_order_test1, string: The onchange function of product was not correctly triggered}:
    - fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_internal_demo')
    - order_line[0].product_id.id == ref('product.product_product_7')
    - order_line[0].fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - order_line[0].fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_internal_demo')
    - order_line[0].product_uom_qty == 8
    - order_line[0].product_uom.id == ref('product.product_uom_unit')
-
  I create another sale order
-
  !record {model: sale.order, id: sale_order_test2}:
    partner_id: l10n_br_base.res_partner_akretion
    order_line:
      - product_id: product.product_product_7
        product_uom_qty: 16
        product_uom: product.product_uom_dozen
-
  I verify that the onchange was correctly triggered
-
  !assert {model: sale.order, id: l10n_br_sale.sale_order_test2, string: The onchange function of product was not correctly triggered}:
    - fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_internal_demo')
    - order_line[0].product_id.id == ref('product.product_product_7')
    - order_line[0].fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - order_line[0].fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_internal_demo')
    - order_line[0].product_uom.id == ref('product.product_uom_dozen')
    - order_line[0].product_uom_qty == 16<commit_msg>more tests: sale outside from state<commit_after>-
  I prepare tunneling extra args in the context
-
  !python {model: sale.order}: |
    context.update({'fiscal_category_id': ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12'), 'shop_id': ref('sale.sale_shop_1')})
-
  In order to test fiscal parameters of Sale Order inside the same state, I create sale order
-
  !record {model: sale.order, id: sale_order_test1}:
    partner_id: l10n_br_base.res_partner_akretion
    order_line:
      - product_id: product.product_product_7
        product_uom_qty: 8
-
  I verify that the onchange was correctly triggered
-
  !assert {model: sale.order, id: l10n_br_sale.sale_order_test1, string: The onchange function of product was not correctly triggered}:
    - fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_internal_demo')
    - order_line[0].product_id.id == ref('product.product_product_7')
    - order_line[0].fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - order_line[0].fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_internal_demo')
    - order_line[0].product_uom_qty == 8
    - order_line[0].product_uom.id == ref('product.product_uom_unit')
-
  I create another sale order
-
  !record {model: sale.order, id: sale_order_test2}:
    partner_id: l10n_br_base.res_partner_address_ak2
    order_line:
      - product_id: product.product_product_7
        product_uom_qty: 16
        product_uom: product.product_uom_dozen
-
  I verify that the onchange was correctly triggered
-
  !assert {model: sale.order, id: l10n_br_sale.sale_order_test2, string: The onchange function of product was not correctly triggered}:
    - fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_external_icms12_demo')
    - order_line[0].product_id.id == ref('product.product_product_7')
    - order_line[0].fiscal_category_id.id == ref('l10n_br_account_product.fc_78df616ab31e95ee46c6a519a2ce9e12')
    - order_line[0].fiscal_position.id == ref('l10n_br_account_product.fp_78df616ab31e95ee46c6a519a2ce9e12_external_icms12_demo')
    - order_line[0].product_uom.id == ref('product.product_uom_dozen')
    - order_line[0].product_uom_qty == 16
{'fraction_non_alphanumeric': 0.09755604928297314, 'fraction_numerical': 0.09068874974752575, 'mean_word_length': 5.397932816537468, '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': '4025409', 'n_tokens_mistral': 2128, 'n_tokens_neox': 1913, 'n_words': 280}