comparison src/tools/xml_tools.py @ 2386:2e05921df16a

plugin schema, core(xmlui): deep copy base form when reused to avoid accidental modification
author Goffi <goffi@goffi.org>
date Fri, 20 Oct 2017 08:39:05 +0200
parents 59636c4db2d0
children 7fff98d64ab5
comparison
equal deleted inserted replaced
2385:39d30cf722cb 2386:2e05921df16a
249 for name, field in form.fields.iteritems(): 249 for name, field in form.fields.iteritems():
250 try: 250 try:
251 base_field = base_form.fields[name] 251 base_field = base_form.fields[name]
252 except KeyError: 252 except KeyError:
253 continue 253 continue
254 field.options = base_field.options 254 field.options = base_field.options[:]
255 xml_ui = XMLUI("window", "vertical", session_id=session_id) 255 xml_ui = XMLUI("window", "vertical", session_id=session_id)
256 dataForm2Widgets(xml_ui, form, read_only=True, prepend=prepend) 256 dataForm2Widgets(xml_ui, form, read_only=True, prepend=prepend)
257 return xml_ui 257 return xml_ui
258 258
259 259