118 Commits
Author SHA1 Message Date
Cédric Krier 6ff3f7701f Test if the line's origin is an instance of ModelStorage before accessing the record name
Closes #15072
(grafted from c51729392ebd3af4327e55dd7f1c195163f5b1cf)

--HG--
branch : 8.0
2026-09-07 18:01:00 +02:00
Cédric Krier 1fb965a74a Generate a valid domain for the origin invoices via the searcher on the invoice
Closes #15062
(grafted from 3fa1c544b703ac7b134992cd62693cd43b633c45)

--HG--
branch : 8.0
2026-09-04 08:28:54 +02:00
Cédric Krier 945099dc67 Set danger visual on supplier invoice when amount to pay is greater than 0
The amount to pay is always positive so the test must be "greater than 0".

Closes #14925
(grafted from e4e920cb9e7d2a2f3bfa86fad4e8c3025cb78828)

--HG--
branch : 8.0
2026-07-02 16:38:57 +02:00
Cédric Krier acfece868a Check the invoice amounts against the source amounts 2026-03-13 23:53:22 +01:00
Cédric Krier 55da16f6a7 Use party lang Function field to set language for taxes and chat 2026-03-06 10:50:48 +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
Cédric Krier 22df2b5490 Use integer to set invisible attribute on payment means of invoice
The attribute must be an integer according to the RNG schema and not a string.
2026-03-14 10:36:13 +01:00
Cédric Krier 6246ea244a Add payment means to invoices 2026-02-16 12:32:35 +01:00
Cédric Krier 4e3f4055ce Add an origin invoices field to the invoice 2026-01-19 12:15:30 +01:00
Cédric Krier a3af9cdb68 Remove default invoice type using the context
Since 6693e138391b the context keyword is no more used.
2026-01-17 18:12:55 +01:00
Cédric Krier 12aebbcba0 Test if origin id is greater or equals to 0 before accessing the target record name
Closes #13498
2026-01-27 12:01:42 +01:00
Cédric Krier b913230cac Use BIGINT for invoice number digit and limit size to 18 digits
Closes #14534
2026-01-22 17:23:12 +01:00
Cédric Krier 70701c14e4 Add depends on methods of TaxableMixin 2026-01-17 12:54:09 +01:00
Cédric Krier df02ade40e Always return a date for tax date of TaxableMixin
Closes #14486
2026-01-17 12:53:33 +01:00
Cédric Krier 36ab6d1d17 Add supplier and customer code properties to invoice line 2026-01-06 17:41:05 +01:00
Sergi Almacellas Abellana bd28b0a552 Set the invoice date to read-only once the invoice has been validated or posted
Closes #14480
2026-01-18 00:18:32 +01:00
Cédric Krier 72d637cec9 Test if field_names is None instead of empty in ModelStorage hooks
Closes #14382
2025-11-21 11:50:54 +01:00
Cédric Krier 6f26a9cc79 Add chat to operational documents 2025-12-02 16:01:39 +01:00
Cédric Krier 595c553a56 Add e-documents as reports on invoices 2025-10-29 15:55:04 +01:00
Cédric Krier e967e80974 Add payment reference to statement rule 2025-09-30 00:11:08 +02:00
Cédric Krier 7c90b22b75 Add payment references to invoices 2025-09-30 00:11:31 +02:00
Cédric Krier 2e03f6cf94 Set currency field when creating invoice tax via on_change
This is needed to get the client format correctly the field using the currency
as digits.

Closes #14346
2025-11-04 10:25:02 +01:00
Cédric Krier 74ee169c54 Refactor of trytond.config to add cache
This removes the need to store configuration in global variable and so make it
easier to update for example for testing.

Closes #14249
2025-10-07 08:19:57 +02:00
José Antonio Díaz Miralles 8d4b38b339 Include the period in the nested part when searching the invoice party of lines
Closes #14125
2025-08-12 00:15:43 +02:00
Cédric Krier 29e6c6e0c9 Do not copy reference field by default
Closes #14140
2025-08-01 00:10:49 +02:00
Sergi Almacellas Abellana e61ed092f6 Remove debug exception introduced by 2fbe3b55927a 2025-06-12 10:54:46 +02:00
Cédric Krier a4a655b05e Use explicit key when computing taxes and object instead of dict
This defines explicitly the available attribute and unify the use the values as
tax line instead of the keys.
2025-05-30 21:35:55 +02:00
Sergi Almacellas Abellana 637c4112dc Do not skip other invoices when printing an invoice that has a cache
Closes #13968
2025-04-17 00:04:15 +02:00
Cédric Krier 9ba7970f41 Check invoice state only for modified lines with an invoice
Since 6c72b78d92d8 the rewrite of the check did not skip invoice line without
invoice.
2025-04-07 00:23:44 +02:00
Cédric Krier 5aeff66acd Use ModelStorage hooks instead of extending create/write/delete 2025-04-06 00:14:17 +02:00
Cédric Krier 1772caec90 Clean migrations for series before 6.0 2025-01-04 00:19:42 +01:00
Nicolas Évrard cbdad75620 Remove old-style of super() calls 2025-04-04 00:45:18 +02:00
Cédric Krier 424328610a Add tax identifiers to company 2025-01-30 19:10:23 +01:00
Cédric Krier c833195650 Set default integer digits to None 2024-11-25 23:47:12 +01:00
Pedro Nuñez 7b67ad7891 Exclude report revisions from invoice copy
Closes #13698
2024-12-08 00:10:32 +01:00
Udo Spallek 8b252472c4 Replace usage of docstring of Model by __string__ attribute
Closes #8402
2024-11-19 10:09:52 +01:00
Cédric Krier b58bb45544 Remove unnecessary invoice transition from cancelled to posted
cbb381841768 added it but it is not necessary because process use _post method
to set back the invoice to posted.

Closes #13619
2024-10-29 17:09:59 +01:00
Sergi Almacellas Abellana 9a14948fb4 Use Function field to test if invoice has an account move
This prevents to hide the post button if the user has no read access to the
account moves.

Closes #13493
2024-10-11 15:33:51 +02:00
Cédric Krier aab7a7de97 Allow admin users to update invoice tax description and legal notice
Closes #13554
2024-10-01 15:31:05 +02:00
Cédric Krier 3fc39d0433 Reset cancelled invoice to posted when unpaid
Closes #13509
2024-09-13 15:30:26 +02:00
Nicolas Évrard 6907ea5b7b Add warning when using implicit rec_name target for relational domain 2024-09-07 00:39:55 +02:00
Sergi Almacellas Abellana a87099396c Clear employee fields when duplicating invoices
Closes #13471
2024-09-28 15:19:35 +02:00
Cédric Krier 6e798f98fc Test if origin id is greater or equals to 0 before accessing the target record
Closes #13498
2024-09-09 12:46:16 +02:00
Cédric Krier 0d077539bf Store computation of invoice sequence type as cache after numbering
Closes #12080
2024-08-25 13:08:56 +02:00
Cédric Krier b1ba498b87 Group numbering invoices
Closes #12080
2024-08-25 12:42:57 +02:00
Cédric Krier 9dc25266b0 Implement a strategy of O(n) to find the best combination of lines to reconcile
The combination implementation is replaced by strategy that search the
smallest remaining from the order lines by removing the last debit or credit
depending on the remaining sign.

Closes #13451
2024-08-19 23:58:41 +02:00
Cédric Krier a2dfc4455b Refine index definition
- Set low and high cardinality to index usage
- Use Range usage for numerical expression instead of Equality
2024-07-27 18:36:14 +02:00
Cédric Krier 01574e6700 Add searcher to summary fields
Closes #13401
2024-07-18 10:12:04 +02:00
Cédric Krier 48ad8ebb02 Add filtered One2Many fields on sale, purchase and invoice
This allows to create only instances for the lines of type line when only
those lines are needed.
This mainly avoid to compute amount for subtotal lines when accessing the
amount of instance of type line.
2024-06-22 16:50:48 +02:00