-
  Only sales manager Creates product so let's check with access rights of salemanager.
-
  !context
    uid: 'res_sale_stock_salesmanager'
-
  In order to test the onchange of the Sale Order, I create a product
-
  !record {model: product.product, id: product_onchange1}:
    name: 'Devil Worship Book'
    list_price: 66.6
-
  In sale order to test process of onchange of Sale Order with access rights of saleman.
-
  !context
    uid: 'res_sale_stock_salesman'
-
  Now i create a sale order that uses my new product
-
  !record {model: sale.order, id: sale_order_onchange1}:
    partner_id: base.res_partner_2
    order_line:
      - product_id: sale_stock.product_onchange1
        product_uom_qty: 10
-
  I verify that the onchange of product on sale order line was correctly triggered
-
  !assert {model: sale.order, id: sale_order_onchange1, string: The onchange function of product was not correctly triggered}:
    - order_line[0].name == u'Devil Worship Book'
    - order_line[0].price_unit == 66.6
