跳至内容
菜单
此问题已终结
1 回复
3345 查看

I noticed there are two kind of modules/application in odoo

one is the kind of module has workflow.

another kind have not workflow.

What is the difference between the two kind.

Is there any diffence on Python modules structure?

 

形象
丢弃
最佳答案

That's not really correct. Workflows exist on objects, not on modules/applications. For example, the sale order has a workflow, as well as the invoice. In fact, nearly all objects that have a "state" field also have a workflow. These workflows are defined in XML files and their states are mostly called in Python. See sale_workflow.xml and sale.py for examples.

Maybe you are referring to the wizards that launch after installing a certain module? For example, when you install the accounting module, automatically the chart of accounts wizard is run. If that is what you mean, then these are some modules that have that. 

This can be achieved by creating a wizard and making it run at startup. The example code for this is as follows:

class account_installer(osv.osv_memory):
    _name = 'account.installer'
    _inherit = 'res.config.installer'

形象
丢弃