Contributors mailing list archives

Browse archives


Re: Modeling general business workflows

MetricWise, Inc., Adam Heinz
- 18/03/2024 18:30:23
Odoo has some special handling for any model with a field named "state" that lends itself towards this sort of effort. You can decorate other fields with "states" in Python and XML to pay attention to its value, i.e.

    currency_id = fields.Many2one('res.currency', store=True, readonly=True, tracking=True, required=True,
        states={'draft': [('readonly', False)]},

    <button name="action_post" states="draft" icon="fa-check" title="Post" type="object" groups="account.group_account_invoice"/>

This should allow you to drive a user through a mostly linear workflow without too much trouble, by showing only actions appropriate to the current state and marking fields readonly once they should no longer be changed.

On Mon, Mar 18, 2024 at 11:22 AM Radovan Skolnik <> wrote:

is anyone aware of any module that would allow for some kind of general workflow? I have a requirement for something the customer calls "Personnel Requisition Request" where hiring manager initiates a request to head of department, then when approved moves to another department for filling in some data, then is set back, ...  This particular case involves hiring but I guess such need is more general.

I can handle approvals with existing tier validation modules. I can build an object to represent the request. Using tasks as request and stages came to my mind. But I have a feeling that there is (could be) fomething to automate the business flow. Any ideas are welcome. Thank you very much.

Best regards

	Radovan Skolnik

Post to: