@@ -55,7 +55,7 @@ along with this program. If not, see .
-
+
@@ -63,8 +63,11 @@ along with this program. If not, see .
+
+
+
-
diff --git a/golem_resource_pack/wizard/golem_pack_rejection.py b/golem_resource_pack/wizard/golem_pack_rejection.py
index 2dcb6d8..9845e5f 100644
--- a/golem_resource_pack/wizard/golem_pack_rejection.py
+++ b/golem_resource_pack/wizard/golem_pack_rejection.py
@@ -31,8 +31,7 @@ class GolemReservationRejectionWizard(models.TransientModel):
def reject(self):
""" Sets pack status to rejected and add reason """
self.ensure_one()
- rejection = self[0]
- for reservation in rejection.pack_id.reservation_ids:
- if reservation.state == "confirmed":
- reservation.write({'state' :'rejected'})
- rejection.pack_id.write({'rejection_reason': rejection.reason})
+ rdata = {'state': 'rejected',
+ 'rejection_reason': self[0].reason}
+ self[0].pack_id.reservation_ids.filtered(lambda r: r.state == 'confirmed').write(rdata)
+ self[0].pack_id.rejection_reason = self[0].reason
diff --git a/golem_resource_pack/wizard/golem_pack_rejection_views.xml b/golem_resource_pack/wizard/golem_pack_rejection_views.xml
index b0b01ec..34347bc 100644
--- a/golem_resource_pack/wizard/golem_pack_rejection_views.xml
+++ b/golem_resource_pack/wizard/golem_pack_rejection_views.xml
@@ -25,10 +25,12 @@ along with this program. If not, see .
golem.pack.rejection.wizard
+
GOLEM Resource Pack Account extention Form
@@ -37,14 +39,14 @@ along with this program. If not, see .
-
+
@@ -52,5 +54,6 @@ along with this program. If not, see .
+