web/views/autoform.py
branchstable
changeset 2143 d4c2fb633062
parent 2096 58c485797b03
child 2652 3753f3a07ca1
equal deleted inserted replaced
2142:098aa2075903 2143:d4c2fb633062
   290     def should_display_inline_creation_form(self, rschema, existant, card):
   290     def should_display_inline_creation_form(self, rschema, existant, card):
   291         """return true if a creation form should be inlined
   291         """return true if a creation form should be inlined
   292 
   292 
   293         by default true if there is no related entity and we need at least one
   293         by default true if there is no related entity and we need at least one
   294         """
   294         """
   295         return not existant and card in '1+'
   295         return not existant and card in '1+' or self.req.form.has_key('force_%s_display' % rschema)
   296 
   296 
   297     def should_display_add_new_relation_link(self, rschema, existant, card):
   297     def should_display_add_new_relation_link(self, rschema, existant, card):
   298         """return true if we should add a link to add a new creation form
   298         """return true if we should add a link to add a new creation form
   299         (through ajax call)
   299         (through ajax call)
   300 
   300