Trigger model Trigger expr_id in WorkFolow

For example, suppose you want to set a Sale Order into the state "Done" once it has been shipped. The first the time the condition will be evaluated, it will be False. But later (some days after), we will confirm the shipping order. But our workflow condition is not checked again. Unless you define trigger_model and trigger_expr_id.

- Trigger model: The object type which will trigger an evaluation of your condition.
- Trigger expr_id: A list of model ids which will trigger the condition.

For example, to take the example of our Sale Order, we don't want to check the condition each time a shipping order is confirmed, but only when the shipping order associated to our sale order is confirmed !

--------------------------

Trigger model: 出发  条件(condition)的对象

Trigger expr_id:那些Trigger model的记录(ids)能过触发条件(condition)

例如: 在销售订单的 ship --> ship_end 的迁移中,

         Trigger model== procurement.order, 

        Trigger expr_id==procurement_lines_get()

          condition==   test_state('finished')

及SO.procurement_lines_get()  得到  procurement.order_id_list,

当procurement.order_id_list 有变动,就会自动触发这个  test_state('finished')  测试条件,驱动这SO的工作流。

~~~~~~~ 需要odoo 实施,二开,培训 等服务 QQ:190170444
原文地址:https://www.cnblogs.com/alangwansui/p/3471235.html