Commit Graph
57232 Commits
Author SHA1 Message Date
Cédric Krier 6a06579e13 Use Sphinx book theme for documentation 2023-09-01 09:44:09 +02:00
Cédric Krier 6d4b80cd6d Remove shipment cost method if there is no carrier for web sale
Since 52a777d4e4d0 the shipment cost method is no more removed by on_change's.

Closes #12546
2023-09-02 09:54:06 +02:00
Cédric Krier ea915152a7 Test deferred balance against a range of possible values
Depending of the day of the year, the amount deferred may vary of 2 days.

Closes #12545
2023-09-01 18:15:05 +02:00
Cédric Krier 1e1ee72f65 Use VARCHAR with size in SQL type for SQLite
Without the size the TableHandler creates a schema without size. When the
schema is updated, it raises a warning because it can not resize from no size.
Also even if SQLite does not enforce the size of the schema, at least we have
a correct schema.

Closes #12471
2023-08-14 19:36:28 +02:00
Cédric Krier 23a718ab1d Do not render deactivated actions in completion
The disabled attribute is not enough to prevent the click event.
So it is simpler to not render the action that are not supported like tryton
does.

Closes #12470
2023-08-14 09:56:36 +02:00
Cédric Krier 51b032442d Clean self references before deleting records
When deleting a full branch of a tree, if the number of records deleted is
higher than IN_MAX, the foreign key constraint may prevent the deletion
because the group of records deleted may still be referencing a record in the
next group to delete.
To prevent this failure, we must first clean the values of the column with
foreign key referencing the same table. We use the table id as value instead
of NULL in case the column is not nullable.
2023-08-10 16:42:36 +02:00
Cédric Krier d1779f0430 Reuse get_related_records to search restricted foreign keys 2023-08-10 15:07:37 +02:00
Cédric Krier dfa79b36b6 Simplify foreign key search in ModelSQL delete 2023-08-10 15:05:23 +02:00
Cédric Krier b8e4b5bbc8 Use module name instead of package name in readthedocs configuration 2023-08-12 13:53:38 +02:00
Cédric Krier e3444ecac8 Check modules against template model
Some files in modules should always be the same as the template.
We add a CI task to check those files against a new templated version of the
module.
2023-08-12 13:52:54 +02:00
Nicolas Évrard fbc05e3d22 Use source of translation in the unique_key of Translation objects
Closes #12467
2023-08-11 18:40:32 +02:00
Sergi Almacellas Abellana 9bd694e6bc Add __slots__ to product kit AmendmentLineMixin
Closes #12533
2023-08-29 10:14:53 +02:00
Sergi Almacellas Abellana 9692e052ed Add sale_amendment and purchase_amendment as tests extras 2023-08-29 10:14:04 +02:00
Cédric Krier 804476f318 Remove translations with empty source
It is useless to keep fuzzy translation with empty source.

Closes #12477
2023-08-16 18:24:32 +02:00
Cédric Krier 36ca97d371 Add resource module on readthedocs index 2023-08-14 15:07:41 +02:00
Cédric Krier ad6e147083 Prepend statement journal with Statement 2023-08-05 22:00:10 +02:00
Cédric Krier babedd9246 Prepend payment journal with Payment 2023-08-05 21:59:48 +02:00
Cédric Krier 14bc5d2a6c Use selection widget for journal fields
It is expected to have only a small number of journals.
But also it is uncommon to create of a new journal from a form.
So it provides a better user experience to use a selection widget.
2023-08-06 00:34:16 +02:00
Cédric Krier 5ce06c7d69 Post write-off and exchange moves when reconcile posted lines
Closes #12439
2023-07-29 15:10:59 +02:00
Cédric Krier e862ca836a Run doc tests with different globals
Closes #12441
2023-07-29 15:11:05 +02:00
Cédric Krier 98eeb1727a Remove unused _location_amount from customer shipment
The method was introduced by a3aa9d985589 for the assign_try method but it is
no more used.
2023-08-20 01:18:11 +02:00
Sergi Almacellas Abellana 3ad60ab0dd Create user applications as validated from user preferences
Closes #12376
2023-08-27 11:46:00 +02:00
Cédric Krier 030dce36ac Remove biginteger widget from tryton and sao
Since 73fe133d7a2c trytond does not have anymore a biginteger type.
2023-08-18 20:50:15 +02:00
Cédric Krier 1882caa576 Do not set carrier if no shipment cost is set
Since d7437e620941 the shipment cost can be defined per party. So a party
without shipment cost should not have a carrier set by default.
A carrier should be set by default only if it is required since bf0b2af7700f.
2023-08-11 09:49:22 +02:00
Sergi Almacellas Abellana c9b90a362c Add search context fields to purchase line product depends
They should be added explicity because they are not included in display_depends
nor edition_depends

Closes #12407
2023-07-19 11:46:44 +02:00
Sergi Almacellas Abellana 8cd6e60a52 Add search context fields to sale line product depends
They should be added explicity because they are not included in display_depends
nor edition_depends

Closes #12407
2023-07-19 11:46:04 +02:00
Sergi Almacellas Abellana c5bafdb2ed Test searching on move's purchase and sale from kit 2023-08-02 20:37:15 +02:00
Cédric Krier 91fb1e7c24 Use OR-ed domain when composing clauses from exclusive join
When a searcher of a Function field compose a domain using mutually exclusive
joins, the boolean operator must always be OR because only one clause is not
NULL.

Closes #12291
2023-08-02 20:35:13 +02:00
Cédric Krier 855a0aaeab Update origin of outgoing moves for internal shipment
When synchronize moves, the origin of outgoing is updated to point the
new incoming move instead of the original one.

Closes #12272
2023-08-25 18:08:17 +02:00
Maxime Richez f082344b66 Update origin of inventory moves for customer shipment
When synchronize inventory to outgoing moves, the origin of the inventory is
updated to point to the new corresponding outgoing move instead of the
original one.

Closes #12272
2023-08-25 16:34:06 +02:00
Cédric Krier b32eeae46a Store synchronized moves of customer shipment even when quantity is not updated
ed41959390ff added a synchronization on assign to prevent infinite warning
loop on pack if it creates new move without origin.
But 38e2a76db719 refactoring lost this behavior.

Closes #12503
2023-08-18 14:47:39 +02:00
Cédric Krier e2676bcd85 Discard disconnected connection from the pool
When a connection in the pool is disconnected, it stays in the pool and it may
still be served.
Using such connection raise an OperationalError and so the request is retried
but before that the connection is put back to the pool. So we may get it back
again.
It is not possible to distinct between an OperationalError due to a
disconnection or due to a isolation error for example.
So with the current design of Transaction API, an OperationalError always put
back the connection to the pool.
This main that we can only ensure that the connections served are still
connected by executing a simple query. And close connections that are failing.

Closes #12452
2023-08-04 15:59:35 +02:00
Cédric Krier d6a92dc606 Add default price list line to test sale extra
Since d632eee3c4c3 the price list returns None as unit price if no matching
line is found.

Closes #12505
2023-08-21 09:57:28 +02:00
Cédric Krier 2d8cc458fd Convert element joined domains into domain when searching for OR-ed domain
The content of joined domains can be a single clause, so it must be converted
into a domain before calling search_domain.

Closes #12460
2023-08-10 13:55:00 +02:00
Adrià Tarroja Caubet 4fffd30011 Fix pallet typo on docs
Closes #12520
2023-08-24 13:04:02 +02:00
Cédric Krier d706ab7ffa Support GIN index with btree_gin PostgreSQL extension
Closes #12480
2023-08-16 22:03:59 +02:00
Cédric Krier f58582b636 Include Similarity in the indexed expression of BTREE
The Similarity expression increase the score and are supported in BTREE.

Closes #12479
2023-08-16 21:53:32 +02:00
Cédric Krier 318950e03b Filter expressions for BTREE and GIN indexes
IndexMixin is calling the method _get_indexed_expressions instead of
_get_expressions.

Closes #12478
2023-08-16 21:50:05 +02:00
Cédric Krier ac86331140 Use only stock move with cost price for product cost price history
The cost price on stock move is only required by validation so we can not
ensure over time that all the stock moves selected have a cost price.

Closes #12468
2023-08-12 20:10:06 +02:00
EdbO 0e203ba32a Add a warning in documentation for desktop client when switching to SSL/TLS
Make it clear that the host must not exists in the `know_hosts` file and
that the right CA certificate must be in `ca_certs`

Closes #12446
2023-08-03 11:43:21 +02:00
Cédric Krier 9cc5d449bb Add missing new keyword when instantiate DomainInversion
The instantiation was added by changeset 47f8e9433d2d
2023-08-16 09:44:27 +02:00
Cédric Krier de1386328b Update style for flake8 6.1.0
Closes #12475
2023-08-16 11:49:30 +02:00
Cédric Krier 0fe7228d58 Try to post only clearing move of journals from the contextual company
Closes #12453
2023-08-05 00:27:11 +02:00
Cédric Krier 69c88b6a8a Do not apply unaccent when searching on number fields
Closes #12435
2023-08-03 15:54:33 +02:00
Cédric Krier 9c2a9623e4 Delete on cascade account receivable rules
When company, account or journal are deleted, the rules using them should not
prevent the deletion and should be deleted as well.
2023-08-07 11:19:24 +02:00
Nicolas Évrard 71e9eb854e Reset search offset when domain has changed 2023-08-14 22:33:15 +02:00
Nicolas Évrard 82ae036d3a Add a canonicalize function for domains 2023-08-14 22:32:14 +02:00
Nicolas Évrard 99211dd03d Activate EcmaScript 6 compatibility for tests 2023-06-15 22:30:30 +02:00
Cédric Krier bf9735dd5a Remove useless state variable when initialize database 2023-08-14 22:02:09 +02:00
Nicolas Évrard f8de1d23c6 Replace NEXTVAL call by IDENTITY for database initialisation 2023-08-14 21:26:59 +02:00