Commit Graph
13 Commits
Author SHA1 Message Date
Cédric Krier 6467856e6f Add purchase support to project work using depend on register 2026-05-06 09:04:23 +02:00
Cédric Krier fdc79d7144 Use the EXTRACT function to calculate the cost of the timesheet work 2026-04-07 16:58:15 +02:00
Cédric Krier d5b308ffb3 Add origin reference to work 2026-02-25 15:25:02 +01:00
Cédric Krier 5310b00496 Remove grouped_slice per IN_MAX
The usage of ``grouped_slice`` without size is deprecated since `=
ANY(ARRAY[%s])` is used for PostgreSQL and SQLite is used only for tests.

The ``Database.IN_MAX`` is replaced by ``backend.MAX_QUERY_PARAMS`` which is a
more accurate limit of the backend.
The SQLite limits is indeed SQLITE_MAX_EXPR_DEPTH so we use a empirical value.
2026-03-22 21:05:26 +01:00
Cédric Krier 0da67bce21 Deprecate reduce_ids for SQL_OPERATORS['in']
Closes #12989 #13897
2025-12-26 10:57:44 +01:00
Nicolas Évrard cbdad75620 Remove old-style of super() calls 2025-04-04 00:45:18 +02:00
Cédric Krier ab23b19d4e Round work total with currency digits in get_total
This allows to extend the computation methods without rounding too early.
2024-10-14 18:50:59 +02:00
Cédric Krier 315064677a Extract timesheet cost computation from _get_cost
This allows customization to use different composition of the costs.
2024-10-14 18:39:58 +02:00
Cédric Krier a286726c0c Test if work cost is a timedelta before converting to seconds
Closes #13582
2024-10-09 20:18:37 +02:00
Cédric Krier c32a98f66c Do not try to round or convert list price of project revenue
By using list_price_used we are sure to have a list price in the company
currency so there is not need for conversion.
Also list price of a product can be empty so we should not try to round it.

Closes #13110
2024-04-10 18:06:23 +02:00
Cédric Krier 0bffc1c384 Use defaultdict to compute cost and revenue total of project
Since e35820296f3a, sum_tree is use to compute project total but it requires
to have a default value for parents that are not in the list of instances.

Closes #12305
2023-06-05 12:53:59 +02:00
Cédric Krier b9c4b8230d Return instance in on_change_with methods 2023-03-26 09:49:00 +02:00
Cédric Krier 90f86e2ba2 Prepare migration to monorepo 2022-12-16 16:54:48 +01:00