Commit Graph
266 Commits
Author SHA1 Message Date
Cédric Krier 0b379c05c0 Ensure inserted record has a valid position
issue9731
review298881002
2020-10-24 13:12:01 +02:00
Cédric Krier ffa00e1f06 Ensure field is loaded before applying changes
For fields like xxx2Many the changed values are operation to apply on the
existing value. So we must be sure to have loaded the value.

issue9730
review314491002
2020-10-21 23:28:09 +02:00
Cédric Krier ac722091f5 Add symbol widget
issue9059
review276871002
2020-10-09 19:09:06 +02:00
Nicolas Évrard 6fcfb943a5 Manage deletable and writable state from ir.rule
issue9357
review290101002
2020-09-23 10:04:19 +02:00
Cédric Krier 86fc6a581a Position copied records based on order
issue9474
review311851002
2020-07-25 00:49:32 +02:00
Sergi Almacellas Abellana c9b5bea7cb Use jQuery.isEmptyObject to test xxx2Many required
issue9416
review317651003
2020-07-04 19:53:31 +02:00
Sergi Almacellas Abellana ee85b855a1 Do not trigger trigger another on_change after setting it's result
issue9212
review311331002
2020-04-19 13:11:48 +02:00
Nicolas Évrard 8bb5ea0923 Use field.set to set value from on_change calls
Setting a reference field with an on_change in an editable list won't set the
correct value for the model selection. We should do like in tryton and call
set.

issue9083
review297071003
2020-04-18 17:20:57 +02:00
Cédric Krier 6239ce291a Add link button
issue9051
review280841002
2020-04-13 12:21:55 +02:00
Cédric Krier 7e9e766c5e Support explicit delete and remove for saving and on_change xxx2Many
issue4140
review291281002
2020-04-12 23:18:15 +02:00
Cédric Krier c250ea3068 Filter leaf before preparing reference domain
We must not prepare reference domain if the clause is not applicable to the
current value.

issue9107
review305231002
2020-04-10 18:32:55 +02:00
Cédric Krier a01cff2273 Pass both domains in a list to concat
issue9201
review297411002
2020-04-10 18:29:17 +02:00
Cédric Krier 08798549ba Call super method with this
changeset 0eafc9f09fd8 did not call properly the super method.

issue9001
2020-01-23 15:58:36 +01:00
Cédric Krier 1e1da5f2a5 Ensure to always store and compare sorted multiselection value
issue9001
review268761002
2020-01-20 11:31:16 +01:00
Cédric Krier 716c39005a Always round numbers after factor operation
issue8668
review282251003
2019-10-24 19:14:23 +02:00
Cédric Krier 1de6685654 Add MultiSelection field
issue7851
review249911002
2019-09-20 11:32:55 +02:00
Cédric Krier 95a150b965 Add drag and drop and manage sequence
issue8240
review265181002
2019-09-07 23:56:25 +02:00
Cédric Krier 4b6176de26 Declare fields from fields_get RPC
issue8621
review272131002
2019-09-07 23:20:50 +02:00
Cédric Krier 68462c0576 Do not expect promise from Record.set
Since issue8482, Record.set does not return a promise anymore.

issue8585
review264081002
2019-08-22 22:44:38 +02:00
Cédric Krier 67285ecbc3 Correctly test empty fieldnames in on_change_with
issue8537
review273661002
2019-08-18 18:55:19 +02:00
Cédric Krier 6b9d63ca46 Add local context to get context without session context
The issue8312 was to strict by its usage of Group._context as it misses the
context_model, the parent context or the _datetime keys.
Instead we introduce a second type of context which provides the same context
but without the session part.

issue8463
review255831002
2019-08-18 18:51:54 +02:00
Cédric Krier 5234481cdc Do not render cell if the record has not changed since last time
Avoiding DOM manipulation speed up the display of the tree.

issue8534
review275781002
2019-08-12 12:48:37 +02:00
Cédric Krier 8a0ab47a64 Save modified record even if value to write is empty
issue8511
review279761002
2019-07-25 10:25:34 +02:00
Cédric Krier 45632015a6 Update button state and title on Wizard
issue8498
review271841002
2019-07-22 23:48:17 +02:00
Cédric Krier 12b60612ea Use synchronous calls for on_change's and Field.set
Those calls can be triggered by event like focus-out. So to ensure a correct
order of the flow, we must defer the processing of the result.

issue8482
review273571002
2019-07-17 22:40:48 +02:00
Cédric Krier 07452ba2dc Reduce number of promises when rendering tree
We preload the first field of the first row if needed. This should ensure that
the following records are also loaded.
And we do not call load if the field is already loaded to avoid to create a
promise.

issue8199
review265411002
2019-06-03 15:45:06 +02:00
Cédric Krier 6a2163b24b Ensure to execute display before showing the info message
The display must be run before the callback linked to the promise of
save_current. And save_current must return a promise with the same state as
the save promise.
Also save should not reject with the exception to avoid jQuery warning.

issue8338
review265421002
2019-05-13 22:38:11 +02:00
Cédric Krier b3e5ee2a9a Do not send value for readonly Many2Many
In contrary to One2Many, Many2Many can not be modified when they are readonly.
But Many2Many inherit from One2Many so we must exclude them explicitly from
the test.

issue8323
review275371002
2019-05-06 13:37:21 +02:00
Sergi Almacellas Abellana 4bd86b26ec Return rejected promise when creation fails
issue8168
review51631002
2019-05-01 21:58:01 +02:00
Sergi Almacellas Abellana 686d4016be Do not send array keys on on_change_with requests
fieldnames is already converted to an Array so sending it's keys will send
the Array indexes but the server expects the field names.

issue8280
review249291003
2019-04-15 13:46:17 +02:00
Cédric Krier 8e93249ac8 Remove id to on_change calls that are cached
issue8234
review275131002
2019-04-08 10:14:39 +02:00
Cédric Krier 854b4adc73 Improve note button
* Add resources method to ModelStorage
* Support badge on icon
* Display unread and total of notes
* Add two extra colors for icon

issue8122
review70561002
2019-03-22 12:16:36 +01:00
Cédric Krier 438bcc098e Set only fields in _loaded
_loaded is compared with the model.fields so it should only contains existing
field and no pseudo-field like _timestamp.

issue8120
review50771002
2019-02-26 15:58:38 +01:00
Cédric Krier e430058e28 Ensure testing descriptor property of Array object
Object.getOwnPropertyDescriptor fails if the value is undefined and the method
can return null if there is no such property.
So we must ensure that the value is a Group (which means an Array).

issue8136
review53561002
2019-02-25 19:30:05 +01:00
Nicolas Évrard 0bb7ce4af7 Use properties
issue8109
review47811003
2019-02-14 16:31:31 +01:00
Cédric Krier 0deee46c8e Use standard Array.sort and do not update search_count when only ids
The current implementation of Group.sort is not correct because it does not
guarantee to replace all the records if the ordered list does not contain all
the existing records. So it is better to use the standard Array.sort method.
Also the search_count should not be updated when doing a search only for ids
as the number of record does not change.

issue8042
review50731002
2019-02-03 20:29:41 +01:00
Sergi Almacellas Abellana ba6dd84b4c Set skip_target to localize_domain of reference fields
issue7876
review60451002
2019-01-03 11:59:38 +01:00
Cédric Krier e037876bb5 New API to read related fields
issue7888
review58431002
2018-12-21 23:41:56 +01:00
Nicolas Évrard 5798cf5cbc 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
Sergi Almacellas Abellana d6cba041f7 Call group delete instead of model.delete when saving records
The method was moved to group in by changeset 5b4da4e8b70f

issue7786
review56441002
2018-10-18 17:15:23 +02:00
Cédric Krier 4f62e48351 Return null as reference value when id is null
issue7743
review64401002
2018-09-28 22:07:07 +02:00
Cédric Krier 12a4b34967 Move record delete to group to get the group context
issue7733
review53431002
2018-09-28 17:35:05 +02:00
Cédric Krier e72445bf9d Manage exclude_field as group attribute
We can not rely on the screen linked to the group to provide this information
because if the group is the value of a One2Many inside a One2Many, the screen
is shared between multiple records and so only one record is linked to the
screen. So when the top record is validated all the records not linked to the
screen may be considered invalid because the exclude_field will not be
excluded from the validation.

issue7715
review46651002
2018-09-28 17:21:35 +02:00
Cédric Krier de1e636581 Allow to pass parent_context when calling get_context
issue7697
review56381002
2018-09-21 11:02:08 +02:00
Cédric Krier f36930385a Add quick return when evaluate simple expression
issue7696
review49571002
2018-09-19 00:13:59 +02:00
Cédric Krier 080dbb3e81 Set parent_datetime_field on One2Many Group
issue7614
review54301002
2018-08-18 22:58:39 +02:00
Cédric Krier 3f337f0036 Wrong usage of Group.context which should be called
issue7614
review54301002
2018-08-18 22:57:04 +02:00
Cédric Krier e2f0abf2fc Add support of timestamp field on client
issue6463
review50521002
2018-08-01 11:37:09 +02:00
Cédric Krier fdf6ccc46c Reduce number of call to display in set_default
issue7578
review66311002
2018-07-27 17:36:09 +02:00
Nicolas Évrard 7108a224a5 Validate dictionary items
issue7199
review47541002
2018-07-09 12:44:26 +02:00