Commit Graph
5181 Commits
Author SHA1 Message Date
Cédric Krier 572372d3c8 Raise NotImplementedError instead of NotImplemented
issue8022
review49731002
2019-01-30 10:00:49 +01:00
Cédric Krier b34cac78d5 Allow to lock records for update
issue8012
review45901002
2019-01-30 09:45:59 +01:00
Cédric Krier 23c81ec015 Avoid to store in transactional cache former translation value
Translated fields are stored in the transactional cache. Using the instance to
get the source value when it is being set, store the former value into the
cache and the source.

issue7997
review58471002
2019-01-30 09:36:21 +01:00
Cédric Krier 62f175d3d1 Set flavor in SQLite database init and test
Those methods use python-sql to make queries but they can be called with a
simple connection and not under a Transaction.
2019-01-28 10:03:47 +01:00
Cédric Krier 1c4067891e Do not start a transaction to init database
An uninitialized database does not have the ir_cache table so Transaction.start fails.

issue8032
review72391002
2019-01-28 09:15:33 +01:00
Nicolas Évrard ab61459443 Check CORS only when Host and Origin header differs
issue8033
review66531002
2019-01-24 11:06:36 +01:00
Cédric Krier 847cbc5733 Add search and read RPC access to ir.calendar*
Those access are needed by the client to display the selection widget related
to those models. They do not have it by default because they do not inherit
from ModelView.

issue7996
2019-01-22 14:15:31 +01:00
Cédric Krier da24071467 Make Cache transactional
We implement sync, commit and rollback to follow transaction semantic.
When a transaction clears a cache, the global cache is cleared only when the
transaction is committed meanwhile the transaction will use a cache for itself
only.
We remove _nocache option because the sync, commit and rollback operate only
for the transaction.

issue7975
review53521002
2019-01-18 11:57:11 +01:00
Cédric Krier 889b1cc9f8 Allow to search and order on Dict key value
issue7905
review62391002
2019-01-18 11:32:47 +01:00
Cédric Krier cef6ffead0 Allow to redirect bus request
issue7943
review48691003
2019-01-18 11:01:22 +01:00
Cédric Krier 9eb1c2eaaa Compute depends on-demand instead of for all callable
issue7939
review64521002
2019-01-18 00:24:28 +01:00
Cédric Krier 0dc396904f Add extras modules to ModuleTestCase
issue7935
review50661002
2019-01-17 17:22:22 +01:00
Cédric Krier 0cc4f0de2a Remove actual stopped self from the transactions stack
Stopping non-current transaction should not remove the last transaction but
the last itself.

issue7973
review45861002
2019-01-17 17:13:26 +01:00
Cédric Krier 342bc9f13d Correctly rename column with SQLite
The table must be recreated if the target column does not exist.
Also temporary column name should use double underscore as module may use
single underscore.

issue7978
review52591002
2019-01-15 11:30:20 +01:00
Cédric Krier 07c296fc27 Add timeout to Report.convert
issue7972
review50691002
2019-01-15 00:09:38 +01:00
Cédric Krier d80f2bdbe4 Use unique name for _get_language Cache
issue7974
review60481002
2019-01-15 00:02:19 +01:00
Cédric Krier 857cd4cc3f Remove unsupported ja_JP translations 2019-01-08 16:46:14 +01:00
Cédric Krier dde7250537 Correctly test required reference with None and negative id 2019-01-08 10:47:38 +01:00
Cédric Krier c39858aac7 Allow to delete record from XML with noupdate
We set the db_id to None to avoid to link later to a different record.

issue7668
review50671002
2019-01-07 22:08:52 +01:00
Cédric Krier 4679d1c910 Add ir.calendar for month and day
This allows to replace time_locale and use the translation infrastructure
instead. So it can be customized using the translation override or derivative
languages.
This provides also a standard base to modules that needs calendar month and
day.

issue7815
review56451002
2019-01-01 15:47:23 +01:00
Cédric Krier 1faa877295 Remove country code from languages
issue7863
review53481002
2018-12-31 15:36:49 +01:00
Cédric Krier 31dc11cf6d Run tasks at this end of cron execution and with_transaction
issue7781
review68391002
2018-12-30 00:22:41 +01:00
Cédric Krier e5bf50805d Return XML-RPC answer only to XML-RPC request
This prevents to answer an XML-RPC fault to a request which only set xml as
accepted mimetype.

issue7913
review66481002
2018-12-30 00:21:39 +01:00
Cédric Krier 55619becda Remove unused ModelFieldGroup
issue7944
review52571002
2018-12-30 00:19:25 +01:00
Cédric Krier 5cab9c3995 Add test ordering of selection field
issue7934
review66491002
2018-12-30 00:14:59 +01:00
Cédric Krier 93e3c0f9df Order selection field with instance method on column
issue7934
review66491002
2018-12-30 00:14:27 +01:00
Cédric Krier 83bf159aef Check foreign key in last on database integrity error
The search is done on a new transaction so it can not find targets that were
created during the main transaction.
2018-12-29 23:28:40 +01:00
Cédric Krier 1738a4ec35 Add ir.message and use custom exceptions
issue3672
review35291002
2018-12-29 14:19:08 +01:00
Cédric Krier b387adc7bc Add check on ModelSQL for positive id
issue7867
review50631002
2018-12-22 00:01:41 +01:00
Cédric Krier d1bb790cb8 New API to read related fields
issue7888
review58431002
2018-12-21 23:41:56 +01:00
Cédric Krier e4e7ae740d Disable sortable and searchable on ModelView only
Those feature depends on the Model having a search method.

issue7878
review56491002
2018-12-17 23:03:19 +01:00
Sergi Almacellas Abellana fc5f906ce5 Do not initiate sql table when table_query is defined
issue7896
review64491002
2018-12-03 11:29:43 +01:00
Sergi Almacellas Abellana 633eb74e1f Remove required on icon, action domain and action view sequence
issue7889
review54451002
2018-11-29 13:19:47 +01:00
Cédric Krier c7f5c54a83 Remove implicit fields names in ModelStorage.read
It is a bad practice to not explicit the fields to read. So we should not
support it.

issue7830
review54421002
2018-11-28 10:05:01 +01:00
Cédric Krier 91df1dcf11 Always commit deleted/inactivated XML record
The transaction must be committed on each iteration in case the next one fails
and the transaction is roll-backed.

issue7884
review66471002
2018-11-28 10:02:50 +01:00
Cédric Krier 011f510dc9 Stop retry to remove session once it succeed
After the removal the loop must be broken and if no session has been removed
it should log an error message.

issue7852
review74421002
2018-11-18 12:07:17 +01:00
Cédric Krier c0510b0ec2 Refactoring test account and include search
issue7766
review50591002
2018-11-12 17:19:24 +01:00
Cédric Krier 1a3ee131fe Check read access on field in search domain
issue7766
review50591002
2018-11-12 17:18:06 +01:00
Cédric Krier 99580a2e6a Ensure to rollback and clean cache on exception
Exception raised in a test decorated by with_transaction should always clear
the cache to avoid leaking to other tests.

issue7829
review64471002
2018-11-07 19:02:34 +01:00
Cédric Krier a97f889228 Fix get access against nullable active group
The group table is in a left join so group.active can be NULL for model/field
access without group. On such case the access values must still be selected.

issue7023
2018-10-31 20:21:04 +01:00
Cédric Krier 39ea946edd 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 75b987233b Re-browse the filtered menus
It is needed to avoid access right errors when filtered records are access
because they share the same local cache.

issue7806
review45771002
2018-10-31 18:13:02 +01:00
Xavier Codinas 8be4976700 Add active field
issue7023
review50411002
2018-10-30 16:31:42 +01:00
Cédric Krier 9ebba6207b Fix argument order to Bus.publish in notify
issue7807
review51571002
2018-10-26 23:24:09 +02:00
Xavier Codinas 18c04da18b Use grouped_slice on load_module_graph
issue7051
review45001002
2018-10-24 17:35:09 +02:00
Cédric Krier 680af38018 Sort keys when dumping data
This ensure stability for future comparison.

issue7761
review45741002
2018-10-21 21:28:43 +02:00
Cédric Krier 394bbd189b Do not fail on SMTP connection error
We just log the error and process the transaction.

issue7775
review49631002
2018-10-15 22:52:52 +02:00
Cédric Krier e115ef92d3 Remove check access to trigger_write_get_eligibles
The triggers returned need to be read without any check access.

issue7764
review68321002
2018-10-15 22:49:51 +02:00
Cédric Krier 9c5bdf2451 Use write mode by default to check create and delete of resources
It is less astonishing for the user and it allows to customize easily the
check to perform per model.

issue7717
review54371002
2018-10-04 13:41:50 +02:00
Cédric Krier 48d894b08c Increase version number 2018-10-01 12:31:00 +02:00