Author: reinhard Date: 2010-10-28 13:52:34 -0500 (Thu, 28 Oct 2010) New Revision: 10222
Modified: trunk/gnue-forms/ trunk/gnue-forms/src/GFObjects/GFField.py trunk/gnue-forms/src/GFObjects/GFTabStop.py Log: Autosearch fields are editable and navigable even if the form is read only or when there is no current record. On failed autosearch, don't insert a new record if the block or form is read only. Property changes on: trunk/gnue-forms ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2010-10-28 15:58:33.852999926 +0200 committer: Reinhard Müller <[email protected]> properties: branch-nick: forms + timestamp: 2010-10-28 16:47:09.230000019 +0200 committer: Reinhard Müller <[email protected]> properties: branch-nick: forms Name: bzr:file-ids - src/GFObjects/GFBlock.py 1...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-forms:src%2FGFObjects%2FGFBlock.py + src/GFObjects/GFField.py 1...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-forms:src%2FGFObjects%2FGFField.py src/GFObjects/GFTabStop.py 3...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-forms:src%2FGFObjects%2FGFTabStop.py Name: bzr:revision-id:v4 - 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] + 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] 3140 [email protected] Name: bzr:text-parents - src/GFObjects/GFBlock.py [email protected] + src/GFObjects/GFField.py [email protected] src/GFObjects/GFTabStop.py [email protected] Modified: trunk/gnue-forms/src/GFObjects/GFField.py =================================================================== --- trunk/gnue-forms/src/GFObjects/GFField.py 2010-10-28 18:52:32 UTC (rev 10221) +++ trunk/gnue-forms/src/GFObjects/GFField.py 2010-10-28 18:52:34 UTC (rev 10222) @@ -283,7 +283,7 @@ def is_editable(self, offset=0): - if self._block.mode == 'query': + if self._block.mode == 'query' or self.autosearch: return self._block.queryable elif self._form.readonly: @@ -619,7 +619,8 @@ self.__in_validate = True try: if not self._block.search_record( - **{self.name: self.__autosearch_value}): + **{self.name: self.__autosearch_value}) and \ + 'insert' in self._block.get_possible_operations(): self._block.new_record( **{self.name: self.__autosearch_value}) finally: Modified: trunk/gnue-forms/src/GFObjects/GFTabStop.py =================================================================== --- trunk/gnue-forms/src/GFObjects/GFTabStop.py 2010-10-28 18:52:32 UTC (rev 10221) +++ trunk/gnue-forms/src/GFObjects/GFTabStop.py 2010-10-28 18:52:34 UTC (rev 10222) @@ -379,11 +379,6 @@ if self.hidden: return False - # Current row not enabled (i.e. no records in this block): not - # navigable. - if not self.__current_row_enabled: - return False - # Attached field is not editable in current mode: not navigable. if isinstance(self, GFFieldBound) and not self._field.is_editable(0): return False _______________________________________________ commit-gnue mailing list [email protected] http://lists.gnu.org/mailman/listinfo/commit-gnue
