Commit Graph
44 Commits
Author SHA1 Message Date
Jean Cavallo e6073b7fb8 Properly handle skip_data
First entries of "skip_data" blocks were always imported,
since the call to startElement was done right after setting
the taghandler attribute.

issue5254
review20781003
2016-03-13 21:46:30 +01:00
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier 64d6e4b3ec Test values against bytes instead of str
For Python3 compatibility, the test to decode should be done on bytes because
str in Python3 is already a unicode.

issue5355
review24851004
2016-02-27 23:48:28 +01:00
Cédric Krier e0379a9d5b Log inactivation failure instead of crashing
When a record XML is removed and it can not be deleted, it could also not be
allowed to inactivate it.

issue4964
review17491002
2015-09-21 10:28:53 +02:00
Cédric Krier 7dad87732f Remove hard-coded table name in convert
Use table instance from the classmethod __table__ of each Model.

issue4806
review7231002
2015-06-15 01:19:06 +02:00
Cédric Krier 52ff97b165 Rename ir.module.module* into ir.module*
issue4764
review7171002
2015-05-28 21:02:01 +02:00
Cédric Krier 01a7cc59a8 Remove execfile from setup.py
issue4654
review15131002
2015-03-19 21:25:20 +01:00
Cédric Krier bcd28ca071 Remove safe_eval
We convert all the fields that were storing python code into PYSON.
We add a pyson attribute on field tag to store PYSON value.

issue4416
review6971002
2015-03-09 19:40:41 +01:00
Cédric Krier 20484bb013 Fix formatting in logger calls 2015-03-05 11:32:18 +01:00
Cédric Krier 0ac0990c77 Improve logging
issue4458
review11781002
2015-03-02 23:39:15 +01:00
Cédric Krier 38b59e0329 Remove Pool.object_name_list
This method is inefficient for testing existence of an item, it is better to
ask for forgiveness.

review12761002
2014-12-16 22:02:44 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier 460a38c386 Speed up XML import
- write grouped_model_data only at the end of data tag
- order record by id

issue4079
review10451002
2014-07-31 19:36:16 +02:00
Sergi Almacellas Abellana fd7c510ce4 Add grouped_slice helper and use it.
issue3516
review10301002
2014-07-17 18:53:05 +02:00
Cédric Krier b955ab3070 Allow to sync XML data
- Adds menu entry for ir.model.data
- Remove write access on ir.model.data to administrator group
- Add sync button on ir.model.data
- Change storage format of values to be comparable

issue3918
review8351002
2014-06-13 19:14:48 +02:00
Cédric Krier 5a73f91a6d Add depends attribute to data tag
This is the counterpart of the Pool register of extras_depend modules for the
XML record creation. It allow to create records if some other modules are
installed.

review3041002
2014-02-06 22:30:11 +01:00
Cédric Krier 2ba9526d37 Prevent unecessary update of record when loading XML
review3061003
2014-01-31 22:26:55 +01:00
Cédric Krier f52fe8e45f Use a sequence of records, values in write
issue3499
review1641003
2013-12-19 14:44:01 +01:00
Cédric Krier 41d2aa44ea Ignore "noupdate" attribute when installing a new module
issue2854
review631004
2013-09-20 00:36:00 +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
Cédric Krier 10804d97cf Clear taghandler at closing of the tag
issue3348
review1047003
2013-09-05 11:58:51 +02:00
Cédric Krier e136a7c266 Add new XML attribute "grouped" on data tag
review1005002
2013-09-02 17:34:46 +02:00
Cédric Krier a95ae0dad9 Remove _inherits
review670002
2013-03-20 22:49:16 +01:00
Cédric Krier 5e01f5c068 Fix flake8 2013-02-27 22:50:31 +01:00
Ian Wilson 4790d575b0 Data must be item and not list.
Unpack data into an item from a list to be consistent.

issue3016
review679002
2013-02-25 12:53:32 -08:00
Cédric Krier 00f7400e8c At least make record inactive if delete fails
review665003
2013-02-23 14:32:50 +01:00
Albert Cervera i Areny 30b1403cdc Use a list of dictionaries in create().
issue2358
review266002
2013-01-06 22:18:13 +01:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier be0e5c54a9 Simplify workflow engine
- Remove workflow module
- Add ir.model.button for access rights

review256001
2012-03-25 00:15:17 +01:00
Cédric Krier 2f0d152ff7 Add missing string conversion for values 2012-03-24 23:59:24 +01: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
Albert Cervera i Areny fdad39babc Fix error in convert.py when removing records of a model that no longer exists.
Fix error in convert.py when an upgrade needs to remove records of a model
which no longer exists.

issue2496
review283003
2012-03-17 12:46:56 +01:00
Cédric Krier a01767feeb Force language to en_US when creating/writing XML records 2012-02-02 09:54:52 +01:00
Cédric Krier f1a4414438 Fix default language code
No more need to manage translation in convert.py
Fix set of module via context in ir.translation
Use CONFIG language as fallback in report
2012-01-28 23:27:22 +01:00
Cédric Krier a94ceb4321 Add default database language code
The configuration option defines which translated value will be stored in the
main field.
The methods of ir.translation which were already publicly used are now public.
Setting the main translation mark translations of other languages fuzzy.

review198001
2012-01-27 21:11:06 +01:00
Cédric Krier 54e3189fb6 Keep traceback as str as we don't know the encoding
issue2302
review225001
2012-01-17 13:54:08 +01:00
Cédric Krier 6d3da1ce94 Update Reference fields from 0 to -1
review116001
2011-09-21 12:25:04 +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 7a7e89bb10 Remove support of Many2Many field in record XML
issue1994
review35005
2011-07-03 18:01:47 +02:00
Cédric Krier 54e6a8c2fe Use md5 hash for indexing translation for issue1898 2011-04-09 12:36:01 +02:00
Cédric Krier aefabe7ee3 Merge tree and list views 2011-04-03 15:02:28 +02:00
Nicolas Évrard e5aa890495 Add server-side icon support 2011-03-01 11:19:36 +01:00
Cédric Krier aa5816be0f Move Cache in trytond.cache and convert outside tools for issue1653 2010-08-24 20:54:27 +02:00