File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
1.7.15 (unreleased)
2
2
-------------------
3
3
4
- - Nothing changed yet.
4
+ - fix contract <-> CR relation [amleczko]
5
5
6
6
7
7
1.7.14 (2013-06-27)
Original file line number Diff line number Diff line change 6
6
from formalchemy import Field , fatypes
7
7
from formalchemy .exceptions import ValidationError
8
8
from formalchemy .fields import HiddenFieldRenderer , SelectFieldRenderer
9
+ from formalchemy .fields import _query_options
9
10
10
11
from pyramid_formalchemy import events
11
12
from pyramid .security import has_permission
@@ -337,6 +338,8 @@ def before_customerrequest_editrender(context, event):
337
338
fs .description .set (renderer = RichTextFieldRenderer (use = 'tinymce' , theme = 'simple' ))
338
339
fs .append (fs .name .required ())
339
340
del fs ._render_fields ['project' ]
341
+ q = fs .contract .query (fs .contract .relation_type ()).filter_by (project_id = context .project_id ).order_by ('name' )
342
+ fs .contract .render_opts ['options' ] = _query_options (q )
340
343
[fs .append (fs ._render_fields .pop (a )) for a in fs ._render_fields if a != 'name' ]
341
344
342
345
You can’t perform that action at this time.
0 commit comments