=== modified file 'bin/addons/documents_done/documents_done.py'
--- bin/addons/documents_done/documents_done.py	2018-10-29 13:05:04 +0000
+++ bin/addons/documents_done/documents_done.py	2018-11-27 11:22:41 +0000
@@ -46,6 +46,9 @@
         for model in context.get('models', ['sale.order', 'purchase.order', 'tender']):
             sel = self.pool.get(model).fields_get(cr, uid, ['state'])
             res = sel['state']['selection']
+            if model == 'purchase.order':
+                res = self.pool.get(model).fields_get(cr, uid, ['rfq_state'])['rfq_state']['selection'] + res
+                
             for st in res:
                 if not 'db_value' in context:
                     if (st[1], st[1]) not in states and st[0] not in ('done', 'cancel'):
@@ -81,14 +84,13 @@
         Returns the good value according to the doc type
         '''
         res = {}
-        if not context:
+        if context is None:
             context = {}
 
         for doc in self.browse(cr, uid, ids, context=context):
-            context.update({'models': [doc.real_model], 'db_value': True})
-            for state in self._get_selection(cr, uid, context=context):
-                if state[0] == doc.state:
-                    res[doc.id] = state[1]
+            field = 'rfq_state' if doc.model == 'rfq' else 'state'
+            state_str = self.pool.get('ir.model.fields').get_selection(cr, uid, doc.real_model, field, doc.state, context=context)
+            res[doc.id] = state_str
 
         return res
 
@@ -551,6 +553,8 @@
         wf_service = netsvc.LocalService("workflow")
 
         for wiz in self.browse(cr, uid, ids, context=context):
+            res = self.pool.get('documents.done.wizard').cancel_line(cr, uid, [wiz.wizard_id.id], all_doc=True, context=context)
+
             # cancel associated document:
             for wiz_line in wiz.pb_lines:
                 if wiz_line.doc_model in ('purchase.order', 'sale.order', 'tender'):
@@ -558,9 +562,7 @@
                         for line in order.order_line:
                             wf_service.trg_validate(uid, line._name, line.id, 'cancel', cr)
 
-            return self.pool.get('documents.done.wizard').cancel_line(cr, uid, [wiz.wizard_id.id], all_doc=True, context=context)
-
-        return True
+        return res
 
 documents_done_problem()
 

