Cédric Krier
17fb714e38
Document that getter function is called with the record context
2024-08-17 17:48:12 +02:00
Cédric Krier
c8caf77630
Document _transaction, _user and _context attributes of ModelStorage
...
They are private attributes to avoid collision with fields but they should be
indeed part of the public API.
2024-08-17 17:47:33 +02:00
Cédric Krier
556858d1a1
Remove documentation about target_search parameter on Many2One
...
a8f355306be5 removed the parameter but not the docstring documentation.
2024-08-19 12:53:53 +02:00
Cédric Krier
ac96da85d6
Use ModelSQL.lock to lock table when validating SQL constraint
...
Since c8771e45b861 locking table must be performed at the start of the
transaction which is managed by the `Transaction.lock_table` method which is
used by `ModelSQL.lock` but not `Database.lock`.
Closes #13626
2024-10-24 15:06:00 +02:00
Cédric Krier
74bfb4af96
Do not force to lock table at the transaction start when updating module
2024-10-24 15:45:40 +02:00
Cédric Krier
5546f5d125
Use proper name for Hidden Recipients in email template help text
2024-10-19 09:39:34 +02:00
Cédric Krier
0721f62c20
Add docker installation options in the documentation
2024-10-15 13:26:28 +00:00
Cédric Krier
f2e064272f
Replace in comparison with equality in ModelStorage copy
2024-09-30 23:15:08 +02:00
Cédric Krier
8efee8823a
Do not copy relational fields with filter
...
Closes #13549
2024-09-30 23:14:36 +02:00
Cédric Krier
6d0270e7d8
Do not enforce implicit NOT NULL on name field of a tree
...
The `not like` operator implicitly requires the field to be not null but
specific implementation of the named field may allow to have NULL values.
Closes #13592
2024-10-11 10:51:04 +02:00
Cédric Krier
f9e13ddc3f
Include NULL value for negative search on nested Many2One and Reference
...
This unify the search behavior on relational fields with NULL value started
with c14f51b77b30.
Closes #13585
2024-10-11 11:24:06 +02:00
Cédric Krier
22f6237085
Always return a string for status bar of user
...
Closes #13579
2024-10-09 20:10:13 +02:00
Cédric Krier
46e9405595
Do not add model name in record name of view without model
...
Closes #13578
2024-10-09 20:07:30 +02:00
Cédric Krier
071c98210d
Do not compute sequence next number if the SQL sequence does not exist
2024-10-09 09:47:15 +02:00
Cédric Krier
cff908ff80
Use Text field for icon content
...
The SVG format can have line break so the field must allow them.
2024-10-08 14:37:07 +02:00
Cédric Krier
799b8dde56
Validate Function fields when running tests
2024-10-08 14:36:13 +02:00
Cédric Krier
6868d72b86
Enforce the type of value for Function fields
...
Closes #13550
2024-09-30 19:13:01 +02:00
Cédric Krier
f1ce119ad4
Document the attributes on the fields
2024-09-30 19:12:04 +02:00
Cédric Krier
f64e38f799
Surround exclude expression with parenthesis
...
Closes #13576
2024-10-09 17:19:44 +02:00
Cédric Krier
ca61f7cc7b
Support range functions and operators in EXCLUDE constraint
...
Closes #7471
2024-10-10 00:34:53 +02:00
Nicolas Évrard
35fb76f754
Add tests on ir.model and ir.model.field write calls on translated fields
2024-09-25 00:12:46 +02:00
Nicolas Évrard
be0e2e691a
Update only the actual ir.model and ir.model.field translations
...
Closes #13546
2024-10-01 16:45:46 +02:00
Cédric Krier
032813a0b8
Support None as default value for xxx2Many fields
...
Closes #13588
2024-10-10 09:38:40 +02:00
Cédric Krier
29de47586c
Test if all columns of SQL constraint are Column before testing their names
...
Closes #13587
2024-10-10 00:48:39 +02:00
Cédric Krier
abb51c5cb3
Test all the SQL constraints name first before testing common column names
...
Closes #13586
2024-10-10 00:44:50 +02:00
Cédric Krier
530b55ac42
Add sparkline chart tools
...
Closes #13548
2024-09-29 12:36:21 +02:00
Cédric Krier
d83bcc784c
Add setup methods to activate_modules
2024-09-10 18:01:29 +02:00
Sergi Almacellas Abellana
da99315a14
Remove duplicated timestamps from history_revisions
...
Closes #13528
2024-09-19 09:49:33 +02:00
Cédric Krier
a091c2b8fc
Order errors by descending id
...
Usually it is the latest errors that are interesting for the user.
2024-09-25 09:56:50 +02:00
Cédric Krier
d13f40521f
Remove print statement in exception handling of cron's run
2024-10-06 12:20:13 +02:00
Nicolas Évrard
6907ea5b7b
Add warning when using implicit rec_name target for relational domain
2024-09-07 00:39:55 +02:00
Cédric Krier
1f0afd17a7
Iterate only once to sort records by order clauses
...
Instead of sorting the list multiple times applying order clause one by one in
reverse order, the list is sorted only once using a key composed of all the
order clauses.
An operator is used to reverse the comparison instead of using the reverse
keyword argument of sorted.
Closes #13525
2024-09-18 13:46:10 +02:00
Cédric Krier
c0077445d0
Check that rec_name is searchable on searchable model
2024-09-10 15:40:19 +02:00
Nicolas Évrard
afd48ab128
Add method to the backend to estimate number of rows
...
Such that each backend can rely on its own statistics.
Closes #13118
2024-09-28 18:02:31 +02:00
Cédric Krier
68ae551752
Add test for fmany2one field
2024-09-19 13:34:15 +02:00
Cédric Krier
f147c94118
Fill the source value of fmany2one in create and write methods
...
We can not rely on the Function field setter to set the value because it may be
too late if the source field is required and for composite key, a partial
update may not be a valid foreign key.
Closes #13522
2024-09-19 13:31:59 +02:00
Nicolas Évrard
5cbedc1afd
Add tests on PYSON default value
2024-09-27 15:30:47 +02:00
Nicolas Évrard
4a8300f0b2
Handle PYSON default value in Eval for repr
...
Closes #13533
2024-09-19 16:16:20 +02:00
Sergi Almacellas Abellana
38dbf23c3d
Remove unexisting model keyword from msg_size_validation catalan translation
...
Closes #13516
2024-09-17 10:42:45 +02:00
Cédric Krier
04f378c503
Add example for connection to PostgreSQL with OS user name
2024-09-24 10:09:46 +02:00
Cédric Krier
3d8fcb97bd
Start PostgreSQL URI path with a '/'
...
Since https://github.com/python/cpython/issues/76960 if the path of the URI
does not start with a '/', the netloc is removed.
Closes #13543
2024-09-24 10:19:57 +02:00
Cédric Krier
62b079225f
Remove $ before series in formatted document URL without base URL
2024-09-03 17:55:42 +02:00
Cédric Krier
effe2f74e2
Do not fail to clean fields from missing model from the pool
...
Closes #13504
2024-09-12 13:17:37 +02:00
Cédric Krier
8f4e926c81
Add setup indexes method to ModelSQL
...
As __setup_indexes__ is always called on all the ModelSQL once they have been
setup in the pool, this ensures that the definition of indexes is
deterministic.
Also it provides a new hook to customize indexes after the default
definitions.
Closes #13299
2024-08-31 21:13:55 +02:00
Cédric Krier
6177198b64
Remove favorite management
...
Since 8976c8708997 user has no write access to any favorites.
But the user can add/remove favorites from the menu entry which is enough for
most of the use case.
Closes #13335
2024-08-27 00:29:10 +02:00
Cédric Krier
a38fc477f5
Remove sequence order on menu favorite
...
Instead we order the favorites of a user by descending id. Such that the last
favorite set is the first from the list. So user can put a favorite back on
top by unset a menu and set it again.
2024-08-27 00:16:24 +02:00
Cédric Krier
50122462ed
Display favorite users on menu form
2024-08-27 00:11:50 +02:00
Adrià Tarroja Caubet
9828450d2f
Display user on menu favorite list
...
Closes #13246
2024-08-27 00:04:46 +02:00
Cédric Krier
b595b68b79
Support getting many sequences at once
...
Closes #13474
2024-08-25 11:02:42 +02:00
Cédric Krier
546247b635
Add sequence_nextval function to Database
2024-08-24 15:44:06 +02:00