Commit Graph
4644 Commits
Author SHA1 Message Date
Sergi Almacellas Abellana 4507ec63fd Clean active_* keys from context when executing an action
As the values may be already present on the context they should be
cleared in order to correctly evaluate action domains

issue7839
review68381002
2019-02-22 19:35:46 +01:00
Cédric Krier 9180bed90c Migrate cellrenderer to introspection and store editable
In order to limit issue with vfunc, it is better to follow the best practice
by using introspection without pygtkcompat.
Also vfunc may have issue with object created by it and returned, so it is
safer to keep a Python reference to on the Python class.

issue8110
review47811002
2019-02-20 12:14:12 +01:00
Cédric Krier 74eb7d4e94 Delay execution of CellRendererBinary callbacks
If those callbacks open a popups, GTK shows some warning and eventually it
leads to a segmentation fault. So we delay them using by executing them when
the loop is idle.

issue8111
review48731002
2019-02-20 12:04:00 +01:00
Cédric Krier 9e1fa47b2c Set default size on dialog of CSV windows
issue8016
2019-02-19 15:56:58 +01:00
Cédric Krier 7a1a18ee9a Prefix login title with Tryton
issue8091
review60541002
2019-02-13 11:02:32 +01:00
Cédric Krier 9aa60f5a2e Display version on login dialog
issue8090
review70551002
2019-02-13 11:01:22 +01:00
Cédric Krier 22080c2d75 Test all widgets of the field for expand
A form can have multiple widget for the same field, so we must test all of
them for expand.

issue8016
review51621002
2019-02-13 10:56:22 +01:00
Cédric Krier 358be93e23 Use tab key for tab navigation
issue8070
review49771002
2019-02-13 10:46:27 +01:00
Cédric Krier 39a3b4bf00 Use ShortcutsWindow
issue8072
review58511002
2019-02-13 10:44:04 +01:00
Cédric Krier 11ba44a3dc Remove record and field on widget display call
changeset fb74e8d64b9d missed to remove it from Form.reset

issue8107
2019-02-13 10:13:35 +01:00
Cédric Krier d3ab928971 Define fields to read for export CSV
issue8095
review46741002
2019-02-10 13:42:16 +01:00
David Harper 5ebf689c5b Rename informations to information
issue7926
review54491002
2019-02-06 22:34:13 +01:00
Cédric Krier a35d6077f6 Improve size request of form widgets
issue8016
review45911002
2019-02-05 19:24:07 +01:00
Cédric Krier 5d570f8924 Use Mixin to share common behavior between Form and Dict widgets
The Integer and Float widgets of form and dict can share the same Entry
handlers.

issue7989
review66511002
2019-02-03 20:41:27 +01:00
Cédric Krier 8a3e2498dc Ensure sort key always return an integer
When sorting tree model, it is possible that some ids are not in the ordered
list (because they do not fit anymore in the domain). So we return the number
of records so they are moved at the end of the list.

issue8042
review53531002
2019-02-03 20:29:09 +01:00
Cédric Krier e3da9f8726 Remove call to window_list_toplevels when destroying NoModal
The test was added by changeset 5b5d0c1660e9 to prevent case when the parent
was destoyed before the NoModal. This happened when creating a record from the
search window. But this is no more the case with changeset b87844203f77 as the
search window is destroyed before the creation of the form window.
As the window_list_toplevels has shown multiple times to generate segmentation
fault, it is safer to stop calling it and remove the test which is normally no
more needed.

issue8049
review52621002
2019-02-03 20:25:03 +01:00
Cédric Krier 08048027cd Always append ':' at the end of the string
issue8041
review51611002
2019-02-03 20:19:17 +01:00
Sergi Almacellas Abellana 5ede351d44 Do not override action context with record context
As action context is a copy of record context is does not make sense to update
the same values

issue7917
review50651002
2019-01-30 11:47:04 +01:00
Cédric Krier ad45f2bc69 Always display tree views to keep model up to date
Any tree view may be used even if it is not shown e.g. to save tree state. So
the model of TreeView which keeps a reference to the group must be updated if
the group has changed.

issue7885
review60491002
2019-01-30 10:11:33 +01:00
Cédric Krier c7dfe09cb8 Rely on editing property of renderer to set value
In Python3, the 'remove-widget' is not trigger when the selected row is
changed. This makes the attribute editabletree_entry not reliable. Instead we
should use the editing property of the renderer and manage the editable
reference on the widget (which is a cleaner separation concept). This allows
also to remove duplicate code in set_value by calling on_editing_done.

issue7936
review46711002
2019-01-30 10:10:00 +01:00
Cédric Krier 257978a01f Fix link syntax in documentation 2019-01-30 10:04:52 +01:00
Cédric Krier 224ef0fee1 Raise NotImplementedError instead of NotImplemented
issue8022
review49731002
2019-01-30 10:00:49 +01:00
Cédric Krier 91b8091d5d Connect dict widgets to the right activate callback
On activate of Entry and on toggle CheckButton, the parent must be activate.
The toggled handler must also be blocked when activate the CheckButton by code
to avoid unnecessary callbacks.

issue7987
review49701002
2019-01-30 09:33:51 +01:00
Nicolas Évrard c975fd890c Use record and field properties of widget instead of method arguments
issue8020
review58491002
2019-01-23 16:58:11 +01:00
Cédric Krier 3fcef1f985 Reduce offset when no search result
issue7966
review60461002
2019-01-18 11:17:07 +01:00
Cédric Krier f3565724be Allow to redirect bus request
issue7943
review48691003
2019-01-18 11:01:22 +01:00
Cédric Krier b4ae7cb9ef Use filled login to select profile
The login should not be changed when editing the host or database.

issue7928
review72381002
2019-01-07 21:57:13 +01:00
Cédric Krier 4a11d8ee19 Improve profile edition with empty and similar value
Prevent IndexError when path has been removed.
Clear the db_cache when adding new entry.
Do not remove existing profile when edited with same name than another.

issue7946
review51601002
2019-01-07 21:55:50 +01:00
Cédric Krier 854898a708 Replace value attribute of HTTPStatus by int call
In Python3.4, HTTPStatus are not yet enums but just integers.

issue7945
review54471002
2019-01-02 19:01:08 +01:00
Cédric Krier c37edc62f7 Decode JSON selection data
json.loads accept bytes only since Python 3.6

issue7833
review48691002
2019-01-02 18:59:47 +01:00
Cédric Krier 6c7cedb1f1 Keep column arrow up to date
When an order is set on a One2Many widget and the user reload the form, the
selected order is lost and so the client should no more display those arrow.
For that we update the arrows on each display using the screen order. And we
unset the screen order when the group change as we do not know the order of
this group.

issue7817
review70481002
2019-01-02 18:56:34 +01:00
Cédric Krier 6cc13fd3d4 Do not recycle first record as product result
The value of the field of the first record, which is edited in the list, will
be lost. Because the editable widget is started before the search pop-up and
it override the new default value with its content when the pop-up is closed.
So we can not reuse record create before the pop-up.

issue7941
review49681002
2019-01-02 18:53:18 +01:00
Cédric Krier 0f73879d51 Remove country code from languages
issue7863
review53481002
2018-12-31 15:36:49 +01:00
Cédric Krier 89e35d443d Ensure translate_widget_set is always called with string
issue7922
review56511002
2018-12-30 00:17:57 +01:00
Cédric Krier dc22691801 New API to read related fields
issue7888
review58431002
2018-12-21 23:41:56 +01:00
Nicolas Évrard f78cd43c22 Fix domain inversion of child_of mixing M2O and Reference fields
Domain inversion on Reference field does not work when using the dotted
notation with a M2O field using child_of or parent_of.

To solve this we correctly compute the localization of child_of leaves when
using the dotted notation (which renders the inverse_leaf function useless).
But we must also ensure that the selection used by reference fields restrict
the choice to the right models.

issue7869
review60441002
2018-12-20 18:44:31 +01:00
Cédric Krier d4a26630d7 Fix placeholders in locale 2018-11-17 14:01:46 +01:00
Cédric Krier 7b3ae1d70a Do not reset tree state after save
issue7822
review54411003
2018-10-31 18:52:35 +01:00
Cédric Krier 2e23ae5140 Store in memory the tree state even if save_tree_state option is not set
issue7818
review54411002
2018-10-31 18:29:48 +01:00
Cédric Krier 75bb8f6ddd Set the state on tree view without tree_state
issue7818
review54411002
2018-10-31 18:29:28 +01:00
Cédric Krier d85484ba5f Do not fail on One2Many with only tree mode
switch_view should stop when it does not find the view type.
WinForm should not open if the requested view type can not be set.

issue7824
review45791002
2018-10-31 18:21:31 +01:00
Cédric Krier d8f2a2a1e1 Use right new_order list when calling rows_reordered
rows_reordered takes a list like new_order[newpos] = oldpos

issue7820
review64461002
2018-10-31 18:19:51 +01:00
Cédric Krier 357b309698 Remove custom strftime for year before 1900
The bug has been fixed in Python 3.3

issue7814
review48671002
2018-10-31 18:15:57 +01:00
Cédric Krier 4287ca91bf Wait to be sure about the scheme before construct the bus URL
issue7792
review54401002
2018-10-31 08:30:47 +01:00
Cédric Krier 62ba7b5a02 Fix import of HTTPStatus for Python3.4
issue7812
review70421002
2018-10-30 18:24:23 +01:00
Sergio Morillo 8cb697582c Use gobject to call idle_add instead of gtk
Under Gtk3 and pygtkcompat, gtk module has not the idle_add method.

issue7810
review64451002
2018-10-26 00:18:09 +02:00
Cédric Krier 11838f1dce Add drag & drop support on binary widget
issue7722
review54381002
2018-10-25 21:03:25 +02:00
Cédric Krier 1f2167a7ce Domain with ids are not stringable
issue7788
review74381002
2018-10-21 21:32:18 +02:00
Cédric Krier 6f69b8b7b1 Do not fail on missing attribute when compare tabs
issue7768
review49621002
2018-10-21 21:30:05 +02:00
Cédric Krier 99541190e2 Override send_headers instead of send_content
The send_headers is the hook dedicated to subclassing. So we replace the
Content-Type set by send_request.
We can also remove the custom code for encode_threshold as it is now included
in standard module.

issue7753
review58391002
2018-10-08 16:03:21 +02:00