jeudi 25 janvier 2018

Workflow Editing in Odoo

A workflow is a technical artifact which manages a set of “things to do” associated to the records of any model. More specifically, a workflow is a directed graph where the nodes are called “activities” and the arcs are called “transitions”.


Odoo workflow provides:
– a description of the evolution of a record (document) over time
– automatic actions based on various and flexible conditions
– management of company roles and validation steps
– management of interactions between objects
– a visual representation of document flows through their lifecycle

Note:
When customizing a workflow, be sure you do not modify an existing node or arrow, but rather add new nodes or arrows. If you absolutely need to modify a node or arrow, you can only change fields that are empty or set to the default value. If you don’t do that, your customization will be overwritten at the next update or upgrade to a future version of Odoo.

Example:
If Total Amount of Quotation is less than or equals to 1000rs then directly make a purchase order otherwise it should first ask for confirmation if total amount is greater than 1000.

Steps:
First of all, if the user doesn’t have access to technical features then you have to give him access.
Go to Settings click on Users, then edit the user, in access rights tab, check Technical Features and save.Reload your page. Now you will have access to a new Technical menu on left Sub-menu Panel.

1) Go to Settings click on Workflows

2) Select Purchase Order Basic Workflow

3) Switch to Diagram View

A) New Node
Name:- validatequotation.
B) Drag Lines between Nodes and Create Transactions




a)Draft-to-validatequotation.
Signal Button:- BLANK
Condition:- amount_total>=1000

b)Draft-to-confirmed.
Signal Button:- BLANK
Condition:- amount_total<1000

c)validatequotation-to-confirmed.
Signal Button:- purchase_confirm
Condition:- True

Now, try to create purchase order with both the conditions and see the changes.

Aucun commentaire:

Enregistrer un commentaire