Commit Graph
59 Commits
Author SHA1 Message Date
Cédric Krier 72fd407fdb Add sql_id method to Reference field and use it for index
issue11788
review447351003
2022-10-12 08:25:20 +02:00
Cédric Krier 7892f8ae56 Use declarative index definition for ModelSQL
issue5757
review361251002
2022-10-11 00:44:51 +02:00
Cédric Krier 38edc41514 Ignore invalid Reference field when reading related fields
issue11484
review449081003
2022-05-19 22:02:33 +02:00
Cédric Krier d891753f56 Clean import 2022-04-09 00:00:16 +02:00
Nicolas Évrard ccd48d320c Send only the required fields when fetching a readonly view definition
issue11134
review380081002
2022-04-08 19:07:14 +02:00
Cédric Krier 655257ec2c Use dictionary as search_order on Reference field
issue11251
review387941002
2022-02-22 23:06:02 +01:00
Cédric Krier 731009e3ab Replace ilike operator by like on Reference
issue11203
review395431002
2022-02-17 00:48:06 +01:00
Cédric Krier 632deb43e5 Use dictionary as domain for Reference field
issue11074
review383911002
2022-02-03 23:05:47 +01:00
Cédric Krier a0bfbfa255 Follow isort formatting
issue10928
2021-12-11 17:58:45 +01:00
Cédric Krier 878e8747df Prevent assign SQL value to record instances
issue10413
review379441002
2021-10-28 09:00:33 +02:00
Cédric Krier 03e2a7f2dc Avoid instantiate set
issue10660
review342911003
2021-09-02 23:56:13 +02:00
Cédric Krier 964fc0a74b Add help for each value to selection and multiselection
issue9649
review320021002
2021-02-14 14:28:55 +01:00
Cédric Krier e11a23deb2 Rationalize import path
We use absolute path when imported module is from a different context.
And we remove unnecessary __all__ definition.

issue9466
review323591002
2020-07-21 14:38:36 +02:00
Cédric Krier 51c99aaa12 Allow SQL expression as value of fields
issue6460
review279431002
2019-06-26 21:56:16 +02:00
Cédric Krier e39129ee3d Add sort and translate options to Reference field
As Reference field uses the SelectionMixin, they could have the same options.

issue8278
review253331002
2019-04-15 16:11:00 +02:00
Cédric Krier 3e9784c8d7 Set context on record instantiated in Field.__set__ and read related
Field may have a context defined so when it instantiate a relational record,
the field should set this context like when the record is read from the
database in ModelStorage.__getattr__.
And when such field is read as related field, the context should also be set.

issue8225
review287171002
2019-04-04 19:06:09 +02:00
Cédric Krier 98bb26a386 Move field definition from Model to Field
issue8037
review74441002
2019-02-13 10:37:40 +01:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier 710c0ab2e9 Rename with_inactive_records decorator
issue7026
2018-04-03 14:55:01 +02:00
Cédric Krier 8c61a67c2b Remove active test in search_domain of Many2One and Reference
As the target is stored on the record, the target is always visible so
searching on it should not add active clause.

issue7026
review41231002
2018-04-03 13:20:37 +02:00
Nicolas Évrard ff5b79819b Add support for search_* attributes on relational fields
issue6081
review25871002
2018-03-21 17:59:55 +01:00
Cédric Krier 9eafd65d2e Add translated descriptor for Reference field
issue5667
review39671002
2017-09-26 01:25:26 +02:00
Nicolas Évrard 5cee718423 Move low level handling of the SQL type to the backend
This changeset defines on the field the (somehow) abstract SQL type a field
should use letting the duty of specifying the real SQL type the database
supports and the conversion to/from the python types to the backend.

issue6351
review33951002
2017-03-31 12:44:22 +02:00
Nicolas Évrard 39c12cf496 Add set_rpc on Field
The __rpc__ attribute is currently filled by method in ModelView. Allowing
fields to define themselves what endpoints should be remotely callable make
this process more flexible.

issue4044
review30991002
2017-02-01 16:11:00 +01:00
Jan Grasnick 1eadd71f98 Add support for datetime_field to fields.Reference
issue4579
review26811002
2016-10-21 12:52:26 +02:00
Cédric Krier 29129855ec Add support for Python 3
issue3211
review7311002
2016-02-07 16:46:16 +01:00
Cédric Krier d7db35c995 Fix selection_change_with
Initialize selection_change_with with en empty set. It must be a set to allow
later fields.depends to update it. The ModelAccess.check_relation must also
manage instance method.

issue4636
review14091002
2015-03-15 16:26:10 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier a2c8111f26 Use context to check model and field access
* Model and Field access checked only if _check_access is set
* Add check_access to RPC
* Add check_access to Wizard and Report

issue4081
review8481002
2014-09-17 21:43:53 +02:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02:00
Cédric Krier 169b41e0b3 Allow to set a tuple model, dictionary for Reference field
issue3902
review9321002
2014-05-10 20:28:58 +02:00
Cédric Krier 6d1be2574b Allow to customize field column and fix numeric search for SQLite
issue3733
issue3648
review4421002
2014-03-18 19:59:04 +01:00
Cédric Krier bc6acd08ee Drop support of Python 2.6
review2691002
2014-01-31 00:02:03 +01:00
Cédric Krier fc6c6cfdda Migration to python-sql
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method

review1001002
2013-09-06 22:32:37 +02:00
Cédric Krier d49fb4318d Add selection_change_with on Selection and Reference fields
review587002
2013-02-05 19:06:16 +01:00
Cédric Krier 10f28ebdec Set lazy loading on Reference field 2012-11-22 22:39:22 +01:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Nicolas Évrard 584d516067 Integer, Numeric and Float allow None as value
NULL value is None and not False

issue2022
review237004
2012-03-23 17:52:36 +01:00
Cédric Krier ad17611e3e Remove change_default on fields
issue2249
review211002
2011-12-22 22:03:15 +01:00
Cédric Krier cc48eb8532 New search widget
- Change select on fields into Boolean
- Change format of search_value on ir.action.act_window

review95002
2011-10-03 09:45:21 +02:00
Cédric Krier 4f4c4b92ad Allow to use negative id in reference as unknown record 2011-09-20 15:40:48 +02:00
Cédric Krier 48ec29ab70 Reference id could be 0 2011-09-20 14:43:17 +02:00
Cédric Krier 852f04dc51 Remove support of Python2.5 and fix py3 warnings 2011-07-12 00:16:15 +02:00
Cédric Krier 550aae8351 Change Pool into a Singleton
review42001
2011-07-03 13:20:58 +02:00
Cédric Krier c259187ab7 Add loading attribute on fields 2011-01-07 10:58:43 +01:00
Cédric Krier cd7ce92be9 Remove priority attribute on fields 2011-01-03 12:39:29 +01:00
Cédric Krier 400817acbb Improve speed for ir.property and reference fields for issue1623 and issue1631 2010-10-06 20:09:01 +02:00
Cédric Krier df1fd283ac New transaction management
Remove cursor, user and context from methods and use Transaction instead
2010-08-19 22:01:12 +02:00
Cédric Krier 483afed26a Catch only Exception according to PEP 352 2010-07-08 19:53:39 +02:00
Cédric Krier 2e2227d795 Improve search on translatable fields for issue1442 2010-03-17 11:50:52 +01:00