Commit Graph
70 Commits
Author SHA1 Message Date
Cédric Krier da9464b39a Clean all create/write fields in create and write of ModelSQL 2009-08-28 16:40:25 +02:00
Cédric Krier 45914073bf Use faster join implementation:
- use generator when possible
- use tuple __mul__
2009-08-26 15:39:53 +02:00
Cédric Krier 8061d6c204 Faster implementation of sub_ids '%s' 2009-08-26 14:09:31 +02:00
Cédric Krier bfc92d0131 Use new iterobject on pool instead of object_name_list for speed improvement 2009-08-20 14:53:45 +02:00
Bertrand Chenal 3ed71f0674 Faster implementation of unique constraint validation 2009-08-12 10:34:49 +02:00
Cédric Krier ecb05626ec Remove wrong order parameter introduced in changeset f8162ed1fce2 2009-08-09 10:30:31 +02:00
Cédric Krier 074e94df72 Remove unnecessary ordered result for some search 2009-08-07 13:33:25 +02:00
Cédric Krier fba7a61651 Don't order search result if order value is [] 2009-08-07 13:09:51 +02:00
Cédric Krier 8235418015 Improve property get to work with a list of property names.
It reduces the number of queries to the database when reading records of
models that have a lot of property fields.
2009-08-05 19:06:52 +02:00
Cédric Krier cb08fdf3ed Fill _create_records just after INSERT to have it for fields with set function 2009-08-04 16:56:45 +02:00
Cédric Krier 79d4364fba Function fields must not be considered required for SQL exception 2009-08-04 16:55:48 +02:00
Cédric Krier 92757863f3 Handle _sql_constraints when database doesn't 2009-07-30 17:02:42 +02:00
Bertrand Chenal 5110236dd7 Fix: added missing space in sql query when searching on translatable fields. 2009-07-27 17:27:39 +02:00
Cédric Krier 225083f177 Add missing sql_format call for WHERE clause values 2009-07-24 17:26:14 +02:00
Cédric Krier b38b7ccd17 Fix typo, rowcount is not a function 2009-07-08 14:47:33 +02:00
Cédric Krier f820d707f5 Remove _sequence on ModelSQL
Add nextid, setnextid, currid, lastid to have a generic way to handle sequence
Add has_lock function to be more database independant
2009-07-07 19:32:31 +02:00
Cédric Krier aabb1fdbe6 Add quote arround field name to prevent use of keywords 2009-07-07 19:28:03 +02:00
Cédric Krier bd02e85cee Don't use hardcoded true/false in SQL queries to be more database independant 2009-07-07 19:22:56 +02:00
Cédric Krier a359c7c0a2 Fix the use of rowcount because it can return -1 or None according to PEP249 2009-07-07 19:14:51 +02:00
Cédric Krier 8067f0aa3a Fix SQL clause for 'not in' with False value 2009-06-23 10:24:32 +02:00
Cédric Krier 640e425a6b Allow to use integer for domain on many2many 2009-06-16 13:17:02 +02:00
Cédric Krier 0e0d72140a Read, write, create, delete permission on record rules 2009-06-15 14:02:11 +02:00
Cédric Krier da04200baa Skip models with table_query for ondelete 2009-06-12 18:42:24 +02:00
Cédric Krier a5d08185ef Read also non active records when creating brother_ids list in _update_tree 2009-06-04 09:23:30 +02:00
Cédric Krier e23c5ef3dd Backed out changeset 669b79e387c3 2009-06-04 09:14:33 +02:00
Bertrand Chenal 3b240300aa Fix: read also non active records when creating brother_ids list in _update_tree 2009-06-03 16:56:44 +02:00
Cédric Krier 655bdecd94 Doesn't append '%' to "like", "ilike" clauses 2009-05-27 19:41:04 +02:00
Cédric Krier 058000852a Don't use value to create inherits model if the field is overridden in model
Like that we have the same behavior then write
2009-05-20 14:04:11 +02:00
Cédric Krier 748ce6ee39 Fix create when inherits field is set for issue878 2009-05-20 10:44:07 +02:00
Cédric Krier cfe69153c7 Simplify code 2009-05-13 19:17:31 +02:00
Cédric Krier 10b144be4e Fix "in" and "not in" clause for boolean 2009-05-13 19:16:48 +02:00
Cédric Krier 88393ba7ee Fix read related fields that uses datetime_field 2009-04-21 10:59:40 +02:00
Cédric Krier 5b3f3d3e3c Fix searching foreign keys when they are created in the transaction for
issue985
2009-04-14 14:50:50 +02:00
Cédric Krier a352575ef0 Catch _sql_constraints and _sql_error_messages in ModelSQL instead of
dispatcher
2009-04-07 18:59:00 +02:00
Cédric Krier 0e5d32cb24 Move check of deleting workflow.instance on ModelWorkflow 2009-04-07 18:33:48 +02:00
Cédric Krier 48d1d2e73c Add better error message for DatabaseIntegrityError for foreign key required
Add delete of foreign keys with ondelete CASCADE
Add write for foreign keys with ondelete SET NULL
2009-04-07 18:25:15 +02:00
Cédric Krier 29ac6aceaf Add better error message for DatabaseIntegrityError for missing foreign key 2009-04-06 12:33:02 +02:00
Cédric Krier 8e74f944c8 Add better error message for DatabaseIntegrityError for fields required 2009-04-06 12:15:32 +02:00
Cédric Krier be62ccda80 Remove create_xxx, write_xxx fields from default value in create function 2009-04-05 18:23:22 +02:00
Cédric Krier cc950957e0 Remove inherit field from result if it is not used 2009-04-05 18:11:18 +02:00
Cédric Krier 00bfaf5199 Don't create inherit record if value is also in base model and if it is a
function field.
2009-04-05 18:10:25 +02:00
Cédric Krier bff08aa243 Fix search domain with child_of on empty list and field with left and right 2009-03-31 13:46:51 +02:00
Cédric Krier b1e07ec438 Use 'OR' for 'IS NULL' clause with 'like' operator 2009-03-30 10:40:40 +02:00
Cédric Krier 68ca60ecd9 Fix "not like" and "not ilike" operator for issue423
Security fix SQL injection
2009-03-30 10:20:31 +02:00
Cédric Krier e4a750d569 Fix the table name of the second join with inherit fields in order_calc 2009-03-27 12:18:12 +01:00
Cédric Krier bef5580bd9 Add missing quote in order_calc 2009-03-27 12:17:32 +01:00
Cédric Krier 76908bc18d Enforce uniq name of table alias in join for order statements 2009-03-27 11:54:34 +01:00
Cédric Krier 7910cc6fff Fix domain on many2one with '.' on fields with search function 2009-03-25 18:24:37 +01:00
Cédric Krier 129f8f8308 Add read_error and write_error message when trying to read/write on records
that don't exist anymore for issue897
2009-03-25 12:51:51 +01:00
Cédric Krier c1a7b5b176 Remove AccessError and use raise_user_error to have translation 2009-03-25 12:18:34 +01:00