Commit Graph
27 Commits
Author SHA1 Message Date
Cédric Krier 7892f8ae56 Use declarative index definition for ModelSQL
issue5757
review361251002
2022-10-11 00:44:51 +02:00
Nicolas Évrard 2bac806bbd Remove python2 compatibility code from fields.Binary
issue11467
review411111003
2022-05-06 18:18:01 +02:00
Cédric Krier d80325acf3 Add datetime_field, filename and digits to display_depends
issue11134
2022-04-09 00:05:27 +02:00
Cédric Krier a0bfbfa255 Follow isort formatting
issue10928
2021-12-11 17:58:45 +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 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
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
Cédric Krier 7ca7f4c6f0 Allow to store Binary field in filestore
Two options are added on Binary field to define the column to use to store the
filestore id and the prefix to use.
Those options are used for Attachment and are configurable with conservative
default values.

issue5692
review25471003
2016-07-29 10:51:53 +02:00
Cédric Krier 4d58b3a720 Don't remove from context the format of Binary fields
The getter of the Binary field could be called many times in the same
transaction, so popping out the format from the context create a side effect
that changes the requested format.

issue3774
review19981002
2016-03-05 17:26:27 +01:00
Cédric Krier 31e8634bf4 Fix bytes and bytearray usage
- sqlite can not convert bytearray, must use buffer
- binary value could be stored as unicode
- don't dump bytes as base64 in xmlrpclib if bytes is str
2015-03-16 20:13:03 +01:00
Cédric Krier 5cfde31ed2 Use bytes and bytearray for Binary
issue4637
review11091002
2015-03-16 19:28:34 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02: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
Nicolas Évrard 27ccf989a5 Add tests on fields.Binary
review1017002
2013-08-16 11:08:44 +02:00
Nicolas Évrard c1e77c77eb Fix binary size handling migration to Active Record
review1017002
2013-08-16 11:07:44 +02: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 fefd67c3a5 Improve Binary fields
* Support size format in context for Binary fields
* Use buffer for Binary fields
* No more store Binary fields in base64

review74006
2011-09-17 14:43:05 +02:00
Nicolas Évrard 7b62b8465e Added support for file name to BinaryField 2011-02-16 17:50:09 +01:00
Cédric Krier c259187ab7 Add loading attribute on fields 2011-01-07 10:58:43 +01: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 b5fb4d1ef3 Refactoring by validation with pylint 2010-02-18 18:50:35 +01:00
Gour 486d46a405 fix typos for documentation (Model chapter) 2009-09-13 15:37:11 +02:00
Cédric Krier 65d0a9494b Update model documentation.
Use autodoc in sphinx
Add missing and fix docstring
2009-03-01 13:37:31 +01:00
Cédric Krier e28edc4d99 Add model.fields
Use better naming of field attributes
2009-02-03 18:58:25 +01:00