Bug 117848 - moveToInsertRow does nothing from python
Summary: moveToInsertRow does nothing from python
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-28 08:47 UTC by Ηλίας Ηλιάδης
Modified: 2018-05-29 09:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
an odb with python and BASIC macro (29.39 KB, application/vnd.oasis.opendocument.database)
2018-05-28 08:47 UTC, Ηλίας Ηλιάδης
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ηλίας Ηλιάδης 2018-05-28 08:47:03 UTC
Created attachment 142334 [details]
an odb with python and BASIC macro

Based on https://ask.libreoffice.org/en/question/116286/base-macro-that-opens-a-newclean-record-in-another-form/ I created a macro that opens a form in a add new mode.

After that I tried to convert the macro for python. That never worked. I include an .odb file that has a Companies form with two buttons, one uses the BASIC macro and opens the form "correctly" and the other uses the python macro but never goes to "new record".

moveToInsertRow :does nothing
moveToInsertRow() :gives SQLException
moveToInsertRow(False) :gives error for incorrect number of parameters
Comment 1 Julien Nabet 2018-05-28 20:35:52 UTC
On pc Debian x86-64 with master sources updated today, here are the results I get when opening "Companies" form:
- clicking "+Basic" button opens another form but an error message appears:
Error 1: An exception occurred
Type: com.sun.star.container.NoSuchElementException
Message: . (line : 63)
- clicking "+Python" button opens another form (the same as with Basic button) but no error message.

5.1 branch is EOL.
Could you give a try to 5.4.7 or brand new 6.0.4?
Comment 2 Ηλίας Ηλιάδης 2018-05-29 09:09:47 UTC
Based on https://ask.libreoffice.org/en/question/156160/base-macro-that-opens-a-newclean-record-in-another-form-using-python/ it is now clear to me that this is not an exact bug.