q2rad 0.1.185__tar.gz → 0.1.186__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of q2rad might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q2rad
3
- Version: 0.1.185
3
+ Version: 0.1.186
4
4
  Summary: RAD - database, GUI, reports
5
5
  Author: Andrei Puchko
6
6
  Author-email: andrei.puchko@gmx.de
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "q2rad"
3
- version = "0.1.185"
3
+ version = "0.1.186"
4
4
  description = "RAD - database, GUI, reports"
5
5
  authors = ["Andrei Puchko <andrei.puchko@gmx.de>"]
6
6
  readme = "README.md"
@@ -147,15 +147,15 @@ class Q2Actions(Q2Form, Q2_save_and_run):
147
147
  def copy_to(self):
148
148
  rows = self.get_grid_selected_rows()
149
149
  choice = choice_form()
150
- seq = (
151
- int_(
152
- q2cursor(
153
- f"select max(seq) as maxseq from actions where name='{choice['name']}'", q2app.q2_app.db_logic
154
- ).r.maxseq
155
- )
156
- + 1
157
- )
158
150
  if choice:
151
+ seq = (
152
+ int_(
153
+ q2cursor(
154
+ f"select max(seq) as maxseq from actions where name='{choice['name']}'", q2app.q2_app.db_logic
155
+ ).r.maxseq
156
+ )
157
+ + 1
158
+ )
159
159
  for x in rows:
160
160
  rec = self.model.get_record(x)
161
161
  rec["seq"] = seq
@@ -67,7 +67,7 @@ class Q2AppSelect(Q2Form):
67
67
  def define_form(self):
68
68
  self.add_control("uid", "", datatype="int", pk="*", noform=1, nogrid=1)
69
69
  if self.add_control("/h"):
70
- self.add_control("ordnum", _("Order"), datatype="int")
70
+ self.add_control("seq", _("Order"), datatype="int")
71
71
  self.add_control(
72
72
  "autoselect",
73
73
  label=_("Autoload"),
@@ -197,9 +197,8 @@ class Q2AppSelect(Q2Form):
197
197
  self.before_form_show = self.before_form_show
198
198
  self.before_crud_save = self.before_crud_save
199
199
 
200
- cursor: Q2Cursor = self.db.table(table_name="applications", order="ordnum")
201
- model = Q2CursorModel(cursor)
202
- self.set_model(model)
200
+ cursor: Q2Cursor = self.db.table(table_name="applications", order="seq")
201
+ self.set_cursor(cursor)
203
202
 
204
203
  self.actions.add_action("/crud")
205
204
 
@@ -273,20 +273,20 @@ class Q2Lines(Q2Form, Q2_save_and_run):
273
273
  def copy_to(self):
274
274
  rows = self.get_grid_selected_rows()
275
275
  choice = choice_form()
276
- seq = (
277
- int_(
278
- q2cursor(
279
- f"select max(seq) as maxseq from lines where name='{choice['name']}'", q2app.q2_app.db_logic
280
- ).r.maxseq
281
- )
282
- + 1
283
- )
284
- print(seq)
285
276
  if choice:
277
+ seq = (
278
+ int_(
279
+ q2cursor(
280
+ f"select max(seq) as maxseq from lines where name='{choice['name']}'",
281
+ q2app.q2_app.db_logic,
282
+ ).r.maxseq
283
+ )
284
+ + 1
285
+ )
286
286
  for x in rows:
287
287
  rec = self.model.get_record(x)
288
288
  rec["seq"] = seq
289
- rec["name"] = choice['name']
289
+ rec["name"] = choice["name"]
290
290
  seq += 1
291
291
  if not insert("lines", rec, q2app.q2_app.db_logic):
292
292
  print(last_error(q2app.q2_app.db_logic))
@@ -391,22 +391,22 @@ class Q2Lines(Q2Form, Q2_save_and_run):
391
391
  def select_linked_table(self):
392
392
  choice = choice_table()
393
393
  if choice:
394
- self.s.to_table = choice['table']
394
+ self.s.to_table = choice["table"]
395
395
 
396
396
  def select_linked_table_pk(self):
397
397
  if self.s.to_table:
398
398
  choice = choice_column(self.s.to_table)
399
399
  if choice:
400
- self.s.to_column = choice['col']
400
+ self.s.to_column = choice["col"]
401
401
 
402
402
  def select_linked_table_column(self):
403
403
  if self.s.to_table:
404
404
  choice = choice_column(self.s.to_table)
405
405
  if choice:
406
406
  self.s.related += ", " if self.s.related else ""
407
- self.s.related += choice['col']
407
+ self.s.related += choice["col"]
408
408
 
409
409
  def select_linked_form(self):
410
410
  choice = choice_form()
411
411
  if choice:
412
- self.s.to_form = choice['name']
412
+ self.s.to_form = choice["name"]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.186"
@@ -1 +0,0 @@
1
- __version__ = "0.1.185"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes