diff --git a/CHANGELOG b/CHANGELOG
index 47ebbe1cf7..1a74403f36 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+* Add button to process requisition
+
Version 5.4.0 - 2019-11-04
* Bug fixes (see mercurial logs for details)
* Remove domain constraint on unit
diff --git a/purchase.py b/purchase.py
index e049578d9a..8564882206 100644
--- a/purchase.py
+++ b/purchase.py
@@ -189,6 +189,13 @@ class PurchaseRequisition(Workflow, ModelSQL, ModelView):
'invisible': Eval('state') != 'waiting',
'depends': ['state'],
},
+ 'process': {
+ 'invisible': ~Eval('state').in_(
+ ['approved', 'processing']),
+ 'icon': If(Eval('state') == 'approved',
+ 'tryton-forward', 'tryton-refresh'),
+ 'depends': ['state'],
+ },
'reject': {
'invisible': Eval('state') != 'waiting',
'depends': ['state'],
@@ -382,6 +389,7 @@ class PurchaseRequisition(Workflow, ModelSQL, ModelView):
pass
@classmethod
+ @ModelView.button
def process(cls, requisitions):
done = []
process = []
diff --git a/purchase.xml b/purchase.xml
index 30f230ed53..91e09a55b5 100644
--- a/purchase.xml
+++ b/purchase.xml
@@ -209,6 +209,16 @@ this repository contains the full copyright notices and license terms.
+
+ process
+ Process
+
+
+
+
+
+
+
reject
Reject
diff --git a/view/purchase_requisition_form.xml b/view/purchase_requisition_form.xml
index 330020c7a2..f06ec01627 100644
--- a/view/purchase_requisition_form.xml
+++ b/view/purchase_requisition_form.xml
@@ -38,5 +38,6 @@ this repository contains the full copyright notices and license terms. -->
+