Community mailing list archives

Re: Sale and purchase workflow

- 09/16/2015 07:06:52
+1 to Guewen, we really need to still have the equivalent of "action_xxx" method so we can hook them and keep the flexibility we need.

Yannick Buron
+33 (0) 6 70 74 52 26 |
My blog :

Building the tools we need
98 Avenue du general pierre billotte BatD
94000 Creteil |
Le 16/09/2015 12:22, Guewen Baconnier a écrit :
<blockquote cite="" type="cite">
On Wed, Sep 16, 2015 at 11:17 AM, Fabien Pinckaers <> wrote:
>> > Overwriting a function to trigger actions if not more complex than
>> > overwriting a workflow. And overwriting a computed fields "like To
>> > Invoice
>> > or To Deliver" is way easier than revamping a workflow to adapt to all
>> > possible transitions on all states.
>> Could you maybe hint which method we'd have to overwrite when there is
>> no more workflow activities but only function fields? Function fields
>> mean no more trigger we can hook on, or do I miss a new feature to
>> handle that?
> The way that most looks like workflows is to use "Automated Actions" as it
> does not even requires development. (e.g. when invoice status goes from "Not
> Invoiced" to "Fully Invoiced") That's pretty much the same behaviour than
> workflow as it does not requires to develop a module, it's just
> customizations. (but IMHO, more powerful than workflow as you can do
> anything without having to worry about the global state of the document)
> Example: doing "send an email to France customers, 3 months after the
> invoice creation if it's not paid" --> That's a pain with workflows and easy
> with Automated Actions.

So basically what you propose is to add something that will do a
SELECT with a domain before and after every write to see what changed
between, whereas before v9 we could simply hook into "action_xxx"
methods, that is not something I would call efficient.

> If you develop as a module, you can also connect on the action (generate
> invoice, validate delivery order, ...), instead of connecting on the status
> change. (invoiced, delivered)

You still have some methods for what we could call the 'beginning' of
the actions (create an invoice, create a delivery order), but we no
longer have triggers for their lifetime actions (sales order is
shipped, invoice has been canceled, ... all the "action_xxx" methods
we had, called by workflows). Simple example: we used to have
action_done on sales orders that we could overwrite when an order was
fully delivered and invoiced, now how could we trigger on that event
programmatically (not using inefficient automated actions)?

Post to: